_ms = MarketData.GetSeries(TimeFrame);

Created at 29 Jan 2016, 14:14
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
NO

Nobody

Joined 14.01.2016

_ms = MarketData.GetSeries(TimeFrame);
29 Jan 2016, 14:14


Hello,

When i backtest mybot i get this ""Crashed in OnStart with NotSupportedException: Tick timeframe is not supported in GetSeries"

But whil running on live account i don't have this problem, is it normal or a bug ?

Here is my code : 

  protected override void OnStart()
        {
             _ms = MarketData.GetSeries(TimeFrame);

}

Thanks a lot in advance


@Nobody
Replies

Spotware
04 Feb 2016, 12:52

Dear Trader,

The GetSeries method retrieves tick-data series, only when it's on current timeframe and not in Backtesting mode.

A workaround is shown in the following code snippet.

  protected override void OnStart()
        {
            _ms = MarketSeries;

}

@Spotware