Entry And Exit on close to close basis

Hello, Can someone please help me achieve the following-

Timeframe 1Day

{Todays close greater than 20Ema, yesterday’s close lower than yesterday’s 20Ema and Yesterday’s close greater than Yesterday’s 50ema }

I want to enter at today’s close ( after 3.25 ) and exit next day/tomorrow at 3:25.

Can Someone please help me either explain or code it.

Thank You in Advance


Hi @prashant9900,

You can use this condition and run the scanner manually at 3:25 PM
Close(0) higher than 20 EMA and
Close(-1) lower than 20 EMA and
Close(-1) lower than 50 EMA
and exit it accordingly.

This cannot be implemented as a strategy since the daily candle close forms at 3:30 PM which is beyond your entry time.

1 Like