To code a strategy using Keltner chanel?

Sir,

Thank you for taking out time to ready and solve my query.

I am using keltner chanel to enter my trades, i would like to see buy sell signals for the following :

Buy when price touches lower band of keltner and sell the moment it crosses 20 ema and if it closes above 20 ema again but till the time price touched upper band.

for above condition

Buy Script:

CLOSE < KCT(15, EXPONENTIAL, 1.3)

Evaluates to true when the close closes above the Keltner channel bottom

Sell Script:

CROSSOVER(KCT(15, EXPONENTIAL, 1.3),EMA(CLOSE,20)) 

Evaluates to true when the  Keltner channel crossover ema 20

Hi AlgoGeek,

Appreciate if you could help me in coding this:

I want KC = 20 Period and Multiplier 2

  1. Price comes down from top channel line of KC to bottom channel line of KC.
  2. Price now moved up from bottom KC to middle line of KC.
  3. Sell at this middle line.

I am very poor at coding and will really appreciate your help in this.

CLOSE > KCT(20, EXPONENTIAL, 2) … check this code. this is for Buy signal (Keltner Upper band )