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
when supertrend is greater than open and no position present it should take trade
Actual Behavior
random trade are being taken.
Steps to Reproduce
Include attached strategy.
run on data
classSupertrend(Strategy):
definit(self):
self.sup=self.I(Z.closefn,self.data.df.ST)
self.ope=self.I(Z.closefn,self.data.Open)
defnext(self):
if ((self.ope>self.sup) and ((self.position.is_long) or (self.position.is_short))) :
self.position.close()
elif ((self.sup>self.ope) and ((self.position.is_long!=True) or (self.position.is_short!=True)) ) :
self.sell(size=50)
Additional info
I'm new to backtesting.py if i am mistaking anything let me know
OS: Linux
The text was updated successfully, but these errors were encountered:
Expected Behavior
when supertrend is greater than open and no position present it should take trade
Actual Behavior
random trade are being taken.
Steps to Reproduce
Additional info
I'm new to backtesting.py if i am mistaking anything let me know
The text was updated successfully, but these errors were encountered: