I am trying to warmup algorithm to run a simple cross over algorithm on Live Zerodha locally. I would like to get last 30 bar from the local folder instead of using Brokerage GetHistory method as Zerodha charges additional for the history data and I dont have the subscription. How can I get this working? I have data already downloaded using the downloader toolbox.
var equity=AddEquity(s, resolution, Market.NSE);
Securities[s].SetFeeModel(new ZerodhaFeeModel());
var bars = History<TradeBar>(equity.Symbol, 30, Resolution.Daily);
StockData sd = new StockData();
foreach (var bar in bars)
{
sd._fast.Update(bar.EndTime, bar.Close);
sd._slow.Update(bar.EndTime, bar.Close);
}
I am using history method to get the the data. Also, I have tried around playing with the history provider in the config but it does not seems to work.
"live-zerodha": {
"live-mode": true,
// real brokerage implementations require the BrokerageTransactionHandler
"live-mode-brokerage": "ZerodhaBrokerage",
"data-queue-handler": "ZerodhaBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler",
//"history-provider": "BrokerageHistoryProvider"
"history-provider": "QuantConnect.Lean.Engine.HistoricalData.SubscriptionDataReaderHistoryProvider"
},
Any guidance or help what I might be missing over here?
Derek Melchin
Hi AmanRay,
We recommend testing with
"history-provider": "QuantConnect.Lean.Engine.HistoricalData.SubscriptionDataReaderHistoryProvider",
In addition, ensure the historical data is placed in the Data folder
Lean\Data\equity\nse
Best,
Derek Melchin
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.
AmanRay
@Derek Thanks for the response but as mentioned in the question I have already tried this settings. Additionally I am putting lean config as live-zerodha. Any other suggestion?
Derek Melchin
Hi AmanRay,
We recommend checking the data that was downloaded from the toolbox. If the latest bar that was saved to the file has a timestamp that's older than 30 days, the History call above won't return anything.
Best,
Derek Melchin
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.
AmanRay
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!