I am looking to create a strategy in which when certain conditions are met, a trade is taken either in buy or sell side. I want to set stoploss as signal’s previous candle’s low or high depending on whether it is buy or sell trade. I tried searching the forums but have had no luck in deploying this. Can someone please help me?
Ex.:
Time frame: 5 mins
if sell signal is initiated in between 9:50-9:55 candle, the stoploss should be high of 9:45-9:50 candle.
Similarly, if sell signal is initiated between 10:25-10:30 candle, the stoploss should be high of 10:20-10:25 candle