Hi,
I have some very strange behaviour with PRT in the following code for automated trading:
StartTime = 010000
if date<20211221 then // No trades before 21.12.2021
StartTime=9999999
endif
Step = 25
StartTrigger= 15400
Nr = 1
Trigger = StartTrigger + (Nr-1) * Step
IF close crosses over Trigger - Step and time >= StartTime THEN
buy 1 contract at market
ENDIF
Nr = 2
Trigger = StartTrigger + (Nr-1) * Step
If you start this in DAX M5 and then delete the last two lines of the code and start it again, the results are different from the first run. This should not happen because the last two lines only change variables that are overwritten in the next iteration, so they should not have any effect.
However, deleting the last two lines changes the results altough this should not be possible.
Do you have an idea what happens here?
Best regards
I don’t. … I would put a defparam preloadbars = 1 (or 0) at the first line and see if it makes a difference.
If it remains unsolved, send a Technical Report to PRT (via the Help menu – Help Center) ?
Add a defparam preloadbars = 0, like PeterSt has stated and see what’s happening.
Thanks for your ideas! I tried it, but it didn’t change anything. I will send it to the technical support.