You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was backtesting a gap based strategy where target profit is hitting at the open of next day candle but sl is hitting at the predefined level which i placed in my code.
if self.signal1==1 :
sl1 = self.data.Close[-1] + slatr
tp1 = self.data.Close[-1] - tpatr
self.sell(sl=sl1, tp=tp1, size=self.mysize)
sl2 = self.data.Close[-1] - slatr
tp2 = self.data.Close[-1] + tpatr
self.buy(sl=sl2, tp=tp2, size=self.mysize)
lets say my sl is 50 points and target is 150 points , and next day market opens 150 points gap down , than sl hitting at midway 5 points where no price tick available. and tp is hitting at 150 points which is alright.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was backtesting a gap based strategy where target profit is hitting at the open of next day candle but sl is hitting at the predefined level which i placed in my code.
if self.signal1==1 :
sl1 = self.data.Close[-1] + slatr
tp1 = self.data.Close[-1] - tpatr
self.sell(sl=sl1, tp=tp1, size=self.mysize)
sl2 = self.data.Close[-1] - slatr
tp2 = self.data.Close[-1] + tpatr
self.buy(sl=sl2, tp=tp2, size=self.mysize)
lets say my sl is 50 points and target is 150 points , and next day market opens 150 points gap down , than sl hitting at midway 5 points where no price tick available. and tp is hitting at 150 points which is alright.
Beta Was this translation helpful? Give feedback.
All reactions