Closed bergen288 closed 3 years ago
buy() or sell() you wrote are not triggered because self.signal on next() is a list object, not integer one.
Below is what you need:
def next(self):
index = len(self.data)-1
if self.signal[index] == 1:
self.buy()
elif self.signal[index] == -1:
self.sell()
Great, it works.
Thanks.
@bergen288 If my suggestion resolved your issue then please close this issue.
Expected Behavior
My sample SPY data has a signal column which is generated based on renkon chart:
I would like to backtesting based on my signal:
Unfortunately,, no trades happened. What's wrong with my class MyRenko? Is there a way to back testing customer signal?
Additional info