Hi,

In onData you can search for the symbol with the data[symbol].
But I created my own LocalData set how do I slice it there?
I saw that there is something like TradeBars but how or where do I tell OnData to use my custom TradeBars if that would be the way to go?
Also when I would manage to have like my "LocalDataSet[symbol]" how can I add all the indicators nicely foreach of the data I am pulling?

public override void Initialize() { SetStartDate(2015, 1, 2); SetEndDate(DateTime.Now.Date.AddDays(-1)); SetCash(100000); AddData<LocalData>(_brentCrudeOil, Resolution.Daily); AddData<LocalData>(_vix, Resolution.Daily); sma = SMA(_brentCrudeOil, 10, Resolution.Daily); ema = EMA(_brentCrudeOil, 50, Resolution.Daily); } public void OnData(LocalData data) { if (!sma.IsReady || !ema.IsReady) { return; } }

 

Author