I'm trying to work out why when i perform the following history request the last bar i receive isn't the last minute. E.g. If i do the request at 1PM ET I'm expecting the last bar beceived to be 12.59am ET but instead the most recent bar i seem to receive is a lot older.
The call is simple;
public override void OnSecuritiesChanged ( SecurityChanges changes ) {
foreach ( var change in changes.AddedSecurities ) {
var tradeBarHistory = History<TradeBar> ( change.Symbol, 1000, Resolution.Minute );
If i change the periods to 100 it works okay.
There should not be an issue receiving the last 1000 minute bars ( i'm using IQFeed )
ScalpTrader
I did some debugging and it seems that the class IQLookupHistorySymbolClient has a limit of 500 for the variable _histDataPointsPerSend
That explains why the results are truncated when i request > 500 minutes for data.
Was that logic placed there because the IQFeed service does not allow more that 500 per request?
ScalpTrader
Okay so it was not actually related to the IQLookupHistorySymbolClient but instead there is code in LiveTradingResultHandler::LogMessage that filters messages when the count > 500
public void LogMessage ( string message ) { //Send the logging messages out immediately for live trading: if (Messages.Count > 500) return;
This made it quite confusing when trying to debug on via logs.
Jared Broad
That is only if the number of messages backs up to more than 500, normally the messaging queue would push to the display / view / console faster than that. The 500 is a "just in case" to prevent an explosion of RAM.
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.
ScalpTrader
Okay thanks Jared.
ScalpTrader
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!