GetSeries Method does not work: Dangerous for any Multi Timeframe cBot
GetSeries Method does not work: Dangerous for any Multi Timeframe cBot
16 Feb 2016, 18:13
when getting data from other timeframes, the data will be incorrect, and missing. You must Print OpenTime[candle] to see for yourself. This is a very serious problem for any cBot that use data from any GetSeries other than cBot attached TimeFrame marketSeries.
Replies
algoforce
17 Feb 2016, 15:12
Topic can be renamed
It was a misunderstanding of the api reference or out of date reference. - /api/reference/timeseries/getindexbyexacttime
I believe the correct way to use current bar from other timeframes with following code
[Parameter()]
public TimeFrame FractalTimeFrame { get; set; }
public MarketSeries _M1;
protected override void OnStart()
{
_M1 = this.MarketData.GetSeries(Symbol.Code, FractalTimeFrame);
}
protected override void onBar(){
//step 1
var _Index = _M1.Close.Count - 1;
DateTime _current = _M1.OpenTime[_Index];
}
All other examples in forum did not work for me. It would be helpful for a Multi timeframe Price Action robot ( use candle patterns, no indicators) in reference area of Multi Symbol, Multi GetSeries( TimeFrame).
var indexSeries2 = indexSeries2.OpenTime.GetIndexByTime(MarketSeries.OpenTime.LastValue);
@algoforce

Spotware
17 Feb 2016, 14:58
Dear Trader,
Could you please provide us with more information regarding your issue?
@Spotware