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
{{ message }}
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
Certain types of indicators require their own historical values from lookback in order to work. One such indicator is Stochastic RSI. This indicator requires its own values from the past in order to calculate new values. Specifically, while %K can be calculated immediately based on lookback price development, %D and %SlowD need past %K values in order to be calculated.
In practice, this means that indicators like these, do not benefit from the preroll that zenbot trade performs. What needs to be added, is that the indicators used by the strategy, are calculated during preroll. I don't quite know how to add this, but I think what needs to happen is that onPeriod() is called during preroll.
Welcome any thoughts on fixing this, so I can fix it.
The text was updated successfully, but these errors were encountered:
Nevermind this. I realize now that I'm meant to use strategy.calculate() to update the indicators. We're doing this in onPeriod because of the large amount of indicators we're using.
System information
Yes, lots of it
macOS 10.15.6 and Ubuntu 18.04
7fb7113
unstable
v14.1.0
No.
Describe the problem
Certain types of indicators require their own historical values from lookback in order to work. One such indicator is Stochastic RSI. This indicator requires its own values from the past in order to calculate new values. Specifically, while
%K
can be calculated immediately based on lookback price development,%D
and%SlowD
need past%K
values in order to be calculated.In practice, this means that indicators like these, do not benefit from the preroll that
zenbot trade
performs. What needs to be added, is that the indicators used by the strategy, are calculated during preroll. I don't quite know how to add this, but I think what needs to happen is thatonPeriod()
is called during preroll.Welcome any thoughts on fixing this, so I can fix it.
The text was updated successfully, but these errors were encountered: