Same problem as everyone here. Backtesting has become tediously slow. Never had this problem with 10.3.
I have one for you which takes 8 seconds in PRT-IB-V11. It takes 1:34 (one minute and a half) in PRT-IG-V11.
Interesting comment, thank you. The first thing that come to mind is the servers loads, since automatic trading is only possible with IG, most people are doing their backtests on IG accounts / servers. But, yes that’s almost 12 times longer, that’s why we need more examples and codes in order to precisely find where is the bottle neck and how we could make things better.
The backtest speed seems to have improved by now. Attached is a trading system (the famous RSI2 by Larry Connors for the S&P – I programmed it for a 1h-chart, but it uses MTF to get the daily values for indicators – I had noticed that MTF strategies were slower than others). This strategy was extremely slow this past weekend (several minutes to load), still slow on Mon and Tues, but much faster today, almost as fast as it used to be in PRT10.3 times. I hope the speed issues got resolved and it stays like this also during weekends (as it used to be in PRT10.3 times).
Thanks again for your efforts, Nicolas!
This is indeed a result of our investigations. Thanks also for your reports, we have found “small” things that can lead here and there to limit the backtests results to come faster or at least the same way that they did in previous version.
More improvements will come also after this first step, they need more kernel modifications of the backtest engine, but we should not wait too much I think.
Backtesting taking over 10min…. Maybe it dosent do well with loop code?
@Monochrome
Please provide a sample code in order to understand why! 😉
I tested without this code, it loaded in seconds. With this code…minutes.
Dindex = ((exponentialaverage[10](close)-exponentialaverage[100](close))/exponentialaverage[100](close))*100
IF DINDEX CROSSES OVER 0 THEN
FLAG1 = BARINDEX
ENDIF
IF DINDEX CROSSES UNDER 0 THEN
FLAG1 = 0
ENDIF
IF DINDEX > 0 THEN
A1 = HIGHEST[max(1,BARINDEX-FLAG1)](DINDEX)
ELSE
A1 = 0
ENDIF
a20 = barindex-flag1
flag2 = 0
for a = 0 to a20-1
if dindex[a] = a1 then
flag2 = barindex[a]
break
endif
next
IF DINDEX > 0 THEN
A1A = LOWEST[max(1,BARINDEX-FLAG2)](DINDEX)
ELSE
A1A = 0
ENDIF
Hope its resolved soon.
Thank you
FYI, a new build has been pushed live yesterday for IG accounts, it should improve the backtests speed. I’d like to get your feels about it, could you please give here your feedbacks please? Thanks!
PaulParticipant
Master
Optimisation crashed…Started last night and was a heavy one but running strong. Come back the the computer 6 hours later and everything was gone. Lost my new created strategy.Made saves in between but still…not enough.
Made saves in between but still…not enough.
Commiserations, but how did you (try) and save … so we all know how not to do it?
Backtest is at a standstill for me currently and I am only testing 40 combinations over 100k bars!
I presume he just means Ctrl-S, which should save all your changes inc algos and optimizations … but of course it doesn’t. Export is the surest option, but that often causes crashes. Copying to Notepad has saved me a few times, but it’s a bore to have to do it.
Personally I find backtests to be running a bit faster today.
Backtest is at a standstill for me currently
Mmm Quit PC No 1 and logged into PC No 2 and the 40 x 100k bars backtested ran in a few seconds (as I would expect).
I had completed about 10 or so backtests on PC No 1 and they were getting slower each new backtest I did.
My hypothesis is that processes are not being fully shut down / exited on the PRT server and so these hanging processes build up to some level which prevents further work!?
My workaround is going to be – File > Quit > Save and Exit – after every 3 backtest until the above hanging is no longer experienced.
Ooops I omitted red text in above …
As a trial I entered fixed value = 34 into the Definition of Variables (DoV) window, closed the DoV window, closed the Code Editor, then did Ctrl+S, then did File > Quit > Exit without Saving.
good to know ctrl-s works at least some of the time 😁