Bug in ProRealtime??

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #183911 quote
    reppy123
    Participant
    New

    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

    #183929 quote
    PeterSt
    Participant
    Master

    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) ?

    reppy123 thanked this post
    #183949 quote
    Nicolas
    Keymaster
    Master

    Add a defparam preloadbars = 0, like PeterSt has stated and see what’s happening.

    reppy123 thanked this post
    #184054 quote
    reppy123
    Participant
    New

    Thanks for your ideas! I tried it, but it didn’t change anything. I will send it to the technical support.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Bug in ProRealtime??


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
reppy123 @reppy123 Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by reppy123
4 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/27/2021
Status: Active
Attachments: No files
Logo Logo
Loading...