# Black-Scholes delta of a barrier (knock-out or knock-in) option

I'm trying to calculate the Black-Scholes delta of a barrier option given the following information:

1. Whether it is knock-out or knock-in
2. Barrier price
3. Strike price, $$X$$
4. Current stock price, $$S$$
5. Number of days to expiry, $$\tau$$
6. Whether it is a call or a put
7. Implied volatility, $$\sigma$$
8. Risk-free rate, $$r$$
9. Note: there is 0 dividend yield

I know the formula for the delta of a basic call option is the following: $$N(d_1)\text{ where}$$ $$d_1 = \frac{ln(S/X)+(r+\sigma^2/2)\tau}{\sigma\sqrt{\tau}}$$

Is there a similar formula for a barrier option?