Please share back test codes for zerodha pi.
Buy - 3rd candle open is higher than 2nd candle open and 2nd candle open is higher than first candle open, also 3rd candle close is higher than 2nd candle close, and ema 20 is greater than ema 40.
Exit long - 3rd candle open lower than 2nd candle open and 2nd candle open is lower than first candle open, and 3rd candle close is lower than 2nd candle close.
Sell - 3rd candle close lower than 2nd candle close and 2nd candle close is lower than first candle close, and 3rd candle open is lower than 2nd candle open, and ema 40 is greater than ema 20.
Exit Short - 3rd candle close lower than 2nd candle close and 2nd candle close is lower than first candle close, and 3rd candle open is lower than 2nd candle open.
I I I
1st candle 2nd candle 3rd candle
Time move from left to right…