rvaidyamath
New member
Hello all
Here is the strategy :
cond1 = ema 50 > 200
Cond2 = close crosses above 20 ema and 20 EMA > 50
Buy = cond1 and cond2
Close buy : price crosses below 20 and price < ema50
Reality : Price can go and buy, but as per above condition is true ; what if the price was not below 50EMA ; so the position is not closed; this time it will give buy condition when clsoe crosses above 20 EMA ; as there is already position open; i dont want this buy signal ; having trouble in lookback period to check was there any buy trigger happened here or not; same reverse applies for sell condition and close sell as well ....
Thanks
Raj
Here is the strategy :
cond1 = ema 50 > 200
Cond2 = close crosses above 20 ema and 20 EMA > 50
Buy = cond1 and cond2
Close buy : price crosses below 20 and price < ema50
Reality : Price can go and buy, but as per above condition is true ; what if the price was not below 50EMA ; so the position is not closed; this time it will give buy condition when clsoe crosses above 20 EMA ; as there is already position open; i dont want this buy signal ; having trouble in lookback period to check was there any buy trigger happened here or not; same reverse applies for sell condition and close sell as well ....
Thanks
Raj