Title, I was plotting an ema chart when the price was vastly different than it should be according to other data sources (not a couple of dollars, we are talking 100s of dollars on an NQ future), double checked the contract against other charting systems and all was equal, even the order filled in the backtest at correct price range that is actually accurate.
Not sure if you can see in the attached backtest but the price on these days started low 15000s and rose to maximum 15500 ish, which the order data backs up, but the price chart is starting the data around 15450 with highs above 15900s.
Any idea why this is?? same issue with emas as price and it is obviously causing a problem
Mia Alissi
Based on the information provided in the extracts, it's not immediately clear why you're observing such a significant discrepancy in the plotted prices. However, there are a few things you could check or try to resolve this issue:
Data Source: Ensure that the data you're comparing against is from the same source. Different data providers might have slightly different prices due to factors like exchange fees, data cleaning methods, etc.
Data Resolution: Make sure you're comparing data at the same resolution. If you're comparing minute data with daily data, for example, there could be significant differences.
Data Handling: Check how you're handling the data in your algorithm. For instance, are you using the correct field (Close, Open, High, Low) when plotting and comparing prices?
Contract Selection: In futures trading, different contracts (even for the same underlying asset) can have different prices. Ensure you're comparing prices for the same contract.
Here's a snippet of your code:
In this part, you're plotting the closing price of the consolidated bar. If you're comparing this with another source, make sure that you're also looking at the closing price in the other source.
If you continue to observe significant price discrepancies, I would recommend posting a detailed question on the QuantConnect forum with specific examples. The community there may be able to provide further insights.
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.
Ashutosh
Hey Jeremy Fouladian
For future securities, we trade the contracts for which the prices are not normalized. Only continuous future contracts have normalized prices.
The discrepancy you are seeing with fills and price chart is because in the code future contracts are traded at raw prices (not normalized) and the price plot plots the price of the continuous contract at normalized prices.
You can set the data normalization to raw to see the correct price data on the plot
Let me know if this helps or if you have any more doubts.
Best,
Ashutosh
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.
Jeremy Fouladian
Thank you Ashutosh, that fixed my problem
Jeremy Fouladian
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!