Required Algo help

Dear Sir/Madam,

I am sharing a screenshot for your reference (attachment).

This is a five-minute chart. The previous day high is marked in a red circle. The next day price started to go up and touched the previous day high (in a circle) but not crossed and went up, and started fell down/retrace. I want to make a strategy that will give me a short entry as soon as the price starts falling from the previous day high; if the price touched the previous day high in the first one minute and start falling, the short entry will be on the second one minute candle. My stop loss will be the previous day’s high price + 0.20 paisa. The target is 1%. If the target did not meet at @9:25am then I will exit @9:25 am whatever the scenario is…

@Streak

Hello SB6504,
I am not an expert in algo coding but I tried to code your requirements. I am a beginner and trying to learn algo trading.
" I want to make a strategy that will give me a short entry as soon as the price starts falling from the previous day high; if the price touched the previous day high in the first one minute and start falling, the short entry will be on the second one minute candle. My stop loss will be the previous day’s high price + 0.20 paisa. The target is 1%."


Try the above code and check it. Please let me know if it is working or not.
Regards,
Ted.

Hey there, I’m a novice, but I think this could be it… Experts validate.

You can simply do a Close cross below Previous N (High, -1 ,Day)
However, this will not be able to capture the scenario, you pointed in chart since Streak sends signals at the close of a Candle.