Hi everyone,
I am new to QC and I am trying to create an algorithm that goes long the most liquid NQ contract when the daily RSI > 50 and there is a MACD bullish crossover using 15 minute bars and goes short when the daily RSI < 50 and the 15 minute MACD crossing bearish. I have been using Logs to compare the values of RSI and MACD with other platforms to see if they are at least similar. The 2 main problems I am having are after looking through many forums and githubs are:
- the daily RSI value is way off until we get 9 days in, which is the length of the RSI indicator. I assume this is because the indicator didn't warm up properly. Futures data seems to be handled differently than others, so I am not sure which method and area to warm the indicator in.
2. The MACD values are completely different than the values you would find on ToS or SSE. I even tried comparing the 15m and 1m values to see if the consolidator wasn't working, but it is only placing trades on 15m intervals. I created this 15m MACD consolidator based of the forum below. Do I need to use the Update() method to create the consolidator?
Thank you in advance!
Alexandre Catarino
Hi Critical.Error ,
I have written an example using the SymbolData pattern. We use this pattern when handling dynamic universes,
The AddFuture method creates a dynamic universe of Futures contracts that are added and removed according to the Filter. When new contracts are added or removed, OnSecuritiesChanged is triggered and we can use it to create indicators. When we create them, we need to register to consolidators and warm them up with historical data.
Best regards,
Alex
Critical.Error
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!