Help in creating strategy

@Streak I’m trying to code a simple strategy such that if the last 2 hour’s % change is above certain threshold then take an entry.
Basically
((Last to previous hours close -current hours close) / current close) is higher than let’s say 1% then take an entry

Exit on the close of next to next hours candle’s close i.e after 2 hours of taking an entry.

I tried playing around but I can’t seem to make it work like I want it to.

Anyone here that can help?

Hi @NikhilKochrekar

We have shared conditions as per your requirements based on our understanding. Refer to the image below:

The above condition will take an entry when the difference between the close and open of the last two 1-hour candles is more than 1%.

Note: The condition to exit after 2 hours of entry cannot be implemented.

Hope this helps.