With exactly the same code, I got 2 different results between Probuilder and Probacktest. After hours trying to understand what could be the issue, I finally reloaded the AVERAGE function that was used as input of the code .. and it solved the issue.
I relaoded the AVERAGE function both into Probuilder and Probacktest code so I’m not sure if the issue came from Probuilder or from Probacktest but I think it came from Probacktest.
How can we force Probacktest (and Probuilder) to get the last update of the functions from PRT library ? … other than manually erase and relaod each PRT function ..
NB : by the way, it is strange that AVERAGE function change over time as it is an old and well established function. It makes me think that I should code by myself the function .. but means there is no interest for PRT to pubish function and also the code execution will be degraded.
I’m sorry, i’m not sure to understand how and what you have “reloaded”?
If you found differences in the values for a specific variables, you can try to reduce or expand the preloadbars in your ProBacktest code with:
// disable preload of data
defparam preloadbars = 0
// OR enable maximum of data
defparam preloadbars = 10000
Tks Nicolas. I mean, I had to erase AVERAGE from my code and select again AVERAGE from the PRT function library. So it means that Probacktest (or Probuilder) was still running the AVERAGE function code that I added to my code months ago but not the last AVERAGE available code from PRT library. I’m sure of that because I spent hours and hours trying to understand what was wrong.
FYI, I was using MMS as name of the variable of the Average “MMS = AVERAGE[…….](….)” in Probacktest, and CourbeMMS as variable name in Probuilder. Even if MMS is not a PRT function (description is MMS= (C(t) + C(t-1) + ….. C(t-n+1) )n) and didn’t appeared in Green color text as for functions, may be Probacktest was confusing and misunderstood the syntax ?
Do you think it could be possible ?
MMS is not a restricted expression in PRT.
I understand better now. You mean that when you opened your code and ran ProBacktest again, the values didn’t match the graph display with the ProBuilder indicator. But after retyping the AVERAGE instruction, the values matched, is that right? If so, it’s indeed very strange, and I’ll look into how that can happen! I admit it would be a first for me 🙂
Tk you Nicolas : it’s exactly what happened, and I remember that I had such the same problem more than 1 year ago because I never understood how it could happen and I added a “caution” comment in my code saying that something was bugging and I have to pay attention. FYI, in addition to the perf curb in Probuilder, I also display the “position bar” as done by Probacktest (blue for long and orange for short) so I can check in details if the result of execution are excatly the same or not … and the bars were not exactly the same but when I retyped the AVERAGE function the results were the same.
My code also use inputs such as Exponential average and it never generated any issue. It seems to be relative to AVERAGE. Either it’s due to the name of my variable (MMS) but GraHal said this name is not restricted, either it’s due to AVERAGE call function itself with a mechanism of link to a library which is not updated … ?
It’s tricky and unpredictable .. and worrying because I tell myself that it could also occur for another PRT function and impact live result.
May be going through the mechanism of PRT call function could give a track or an explanation.