Error with backtesting "Insufficent Funds"
Forums › ProRealTime English forum › ProOrder support › Error with backtesting "Insufficent Funds"
- This topic has 8 replies, 3 voices, and was last updated 5 years ago by
GraHal.
-
-
01/21/2020 at 11:21 AM #117370
Yesterday I ran a backtest with no complications whatsoever, today though I ran the same test and the backtest showed the “insufficent funds” icon on the equity curve.
As you can clearly see on the picture below the funds are very much sufficent but the test stopped anyway. What has happened here?
01/21/2020 at 12:08 PM #11738101/21/2020 at 12:19 PM #117383Hello Nicolas, I don´t think that´s the problem since I´ve set the maximum position size to a maximum of 4 contracts. And as you can see on the picture the system have been able to take 4 contracts previously without problem.
01/21/2020 at 1:22 PM #11738501/21/2020 at 1:55 PM #117391Instrument: Sverige 30 Cash (20SK)
Timeframe: 15 000 units 5M
Code:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100//ReglerMaximumContracts = 4TooManyContracts = abs(countofposition) >= MaximumContracts//Bollinger Indikator 1BandsPeriod=14BandsDeviation=1.25Chars= 100period = 200dev = 2data = customcloseMA = average[period](data)BolUp = MA+STD[period]*devBolDn = MA-STD[period]*devif barindex>max(Chars,BandsPeriod) thenDev = std[BandsPeriod]*BandsDeviationDev1 = square(Dev / Pointsize)temp=sqrt(average[chars](dev1))*pointsizeif temp<>0 thentemp=dev/tempendifif(temp>0) theniexp=Exp(-2*temp)returnNum= (1-iexp)/(1+iexp)osc= (returnNum)elseiexp=Exp(2*temp)returnNum=(iexp-1)/(1+iexp)osc= (returnNum)endifendif//VariablesDatum = 20200102NewYears = abs(Today)tma = TEMA[21]sma = Average[200]clow = lowdistansb = 1.0001tpl = 22tps = 26st = 10//Villkorif not (NewYears = Datum) then//Standard Longif osc > 0.985 and close>tma and close<BolDn and not TooManyContracts thenbuy 1 contracts at marketset target pprofit tplendif//Standard Shortif osc > 0.985 and close<tma and close>BolUp and not TooManyContracts thensellshort 1 contracts at marketset target pprofit tpsendif//Exit Longif close crosses under sma thensell at marketelseif close crosses under BolDn thensell at marketendifendif//Exit Shortif close crosses over sma thenexitshort at marketelseif close crosses over BolDn thenexitshort at marketelseif (clow/sma) < distansb and close > open thenexitshort at marketendifendifendifendif//Money Managementset stop ploss st01/21/2020 at 2:16 PM #117396Yes I have the same issue, and I can’t explain it now.. Funds are sufficient and equity is good, it should not behaves this way.. I’m asking PRT about that, please do it on your side by sending a tech report with the dedicated tool in the help section menu of the platform, and add the topic URL please.
01/21/2020 at 4:44 PM #11741401/21/2020 at 5:18 PM #117416Thank you very much Nicolas. Now however it seems like the problem has resolved itself since the backtesting is working properly, but perhaps PRT would like to investigate anyway.
01/21/2020 at 5:43 PM #117419it seems like the problem has resolved itself
Yes I tried well over 30 mins ago over 100K bars and my backtest wasn’t stopped.
Maybe PRT fixed it after Nicolas prompted them?
-
AuthorPosts
Find exclusive trading pro-tools on