1
Votes

Multitimeframe - MarketData.GetSeries Same Behaviour in Backtesting and Optimization needed

Vote  

16 Dec 2016, 11:46Multitimeframe - MarketData.GetSeries Same Behaviour in Backtesting and Optimization needed#1
andi21posts: 101since: 14 Dec 2016

Dear Spotware Team,

in my opinion it would be very nice if MarketData.GetSeries behaves same in backtesting and also in optimization. So for the current timeframe of a bot MarketData.GetSeries gets the same result for both backtesting and in optimization (data also from past the selected period which is good). But in multitimeframe scenarios only in backtesting MarketData.GetSeries gets results (count > 0 for the past of the selected period) for other timeframes than the current one. In optimization it does not receive any data for other timeframes for the past of the selected period (count 0).

So the behaviour and results would be like expected the same in optimization and in backtesting with the optimization-parameters.

That would be really really great and i think this is a must-have.

Thanks in advance and hope to see this improvement.

Best Regards,

andi21

23 Dec 2016, 14:06#2
cTrader Teamposts: 3396since: 23 Sep 2013

Hello andi21, 

Thank you for your detailed suggestion, you point of view is well understood and appreciated. It is something we have always planned to do and hope to acheive that soon. 

We look forward to other users comments in this thread too. 

Regards, 

cTrader Team


TRADERS FIRST™ Vote for your favorite features: http://vote.spotware.com/
28 Dec 2016, 20:06#3
meistereumannposts: 9since: 08 Jul 2016

Has it always been like that? Because i was using multi-timeframe bots ever since and just noticed it while optimizing my latest cBots..

Well so we actually can not optimize our multi-timeframe algos?! Thats idd a serious problem, is there any ETA on when this will probably be fixed?

29 Dec 2016, 07:21The same behaviour for back testing and optimization of Multitimeframe cBots is essential#4
shagarposts: 1since: 29 Dec 2016

I am currently porting my MT5 EA's to cTrader/cAlgo due to a lack of Australian brokers that support MT5 and the fact that i see great potential for cTrader. If I am to be successful in porting my Indicators and EA's, I need to be able to properly backtest and tune them.

Since nearly all of cBots will use multitimeframe indicators, it will be nearly impossible for me to finish the project. The only option I can think of at the moment is to forward test using sereral demo accounts and manually optimising the settings or create my own backtesting tools. This will be very time consuming and I may have reconsider if cTrader is mature enough for me to continue this project.

I sincerely hope that this issue can be resolved soon.

Regards, Shane.

13 Jan 2017, 22:17#5
vito posts: 3since: 13 Jan 2017
I noticed the same issue and was struggling days to find out why optimization gives totally different results to backtesting until I've found this thread. It is very unfortunate that the application does not even indicate that some data is missing and presents incorrect results. Could you please work on fixing this bug with a high priority? I believe that many other traders might be using multi-timeframe algos and get mislead by the simulation. It is really a serious issue. What's the current status and ETA? Thank you!
01 Mar 2017, 12:34#6
meistereumannposts: 9since: 08 Jul 2016

Any news on this issue? Is optimizing multi-timeframe algos now possible??

10 Aug 2017, 00:45#7
lismanb@gmail.composts: 2since: 10 Aug 2017

I've seen that if you select multiple timeframes in optimization, the first time frame is used in all the parallel backtesting.

So for instance if you have something like this:

protected virtual void onBar(){

      Print(TimeFrame);

}

 

in Optimization with all the timeframes selected, you will get "Minute" in the Logs for all of them, no matter the actual timeframe.

10 Aug 2017, 01:10RE:#8
lismanb@gmail.composts: 2since: 10 Aug 2017

lismanb@gmail.com said:

I've seen that if you select multiple timeframes in optimization, the first time frame is used in all the parallel backtesting.

So for instance if you have something like this:

protected virtual void onBar(){

      Print(TimeFrame);

}

 

in Optimization with all the timeframes selected, you will get "Minute" in the Logs for all of them, no matter the actual timeframe.

 

I managed to get the right TimeFrame using MarketSeries.TimeFrame.

17 Aug 2019, 18:55#9
sifneosfxposts: 6since: 22 Oct 2018

Same problem here, please fix!

18 Aug 2019, 11:38#10
sifneosfxposts: 6since: 22 Oct 2018

Best workaround I found sofar is to check if value is NaN. Example:


            if (!double.IsNaN(sma_daily.Result.LastValue))
                { 
                    do not validate sma_daily
                }
           else
               {
                    valildate sma_daily
                }

This way, you will always get same results on optimization and on backtest. You will just