I went ahead and started a new thread because this seems to be a theme that comes up often, and the specific answer is elusive, both in documentation and community posts.
The working algo attached below is adapted from this backtest, It works great with SMA, which has only one datapoint.
However, with MACD (or any other multi-point indicator) the question arises: how is the indicator data stored in the rolling window bar? How can it be accessed? With MACD, are all three data points (fast, signal, slow) being stored in the rolling window? If not, how should each be stored when multiple equities are involved?
I've been successful creating a MACD rolling window with only one equity at a time, but running into this snag when trading a larger universe. All help and/or feedback is appreciated!
Grateful Trading
SOLVED!
See updated backtest (working) for complete solution. Hope this helps someone out!
Grateful Trading
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!