FX/Dax Trading Strategy

Forums ProRealTime English forum ProOrder support FX/Dax Trading Strategy

Viewing 4 posts - 1 through 4 (of 4 total)
  • #118272

    I’ve used this strategy on Bloomberg over 30 years of FX data (30 min bars) and it works very well and would now like to add it to PRT but am unsure of if I have coded it correctly and would very much appreciate your feedback.

    To confirm, this is what the strategy is meant to do on FX pairs with 30 min bars:

    1. Enter Long at the Next Open when the 30 min bar Closes < its Open
    2. Exit Long at the Next Open when the 30 min bar Closes > its Open
    3. Enter Short at the Next Open when the 30 min bar Closes > its Open
    4. Exit Short at the Next Open when the 30 min bar Closes < its Open

    A few questions:

    Is the code specified correctly for this Entry and Exit rules listed above ?

    Is the code correct for FX trades ? Also, how could it be modified if it was to be used on stock indices (esp. DAX)?

    Critically of all, is the “timer” condition I have specified at the top of the code correct (I doubt it). Effectively, the strategy I wish to add to PRT should only allow one transaction per 30 min bar (so for example, if a bar closes>open, on the next bar, the strategy should EITHER Exit a Long (if one exists) OR Enter a Short (but not both exit a long and enter a short at the same time).

    Thank you very much in advance for your help.

    #118275

    Replace lines 19-44 with:

    The use of BarCount is useful if you use multiple and lower TFs. On a 30-minute TF no more than 1 trade can occur on the same bar.

     

    1 user thanked author for this post.
    #118283

    Thank you Roberto, really appreciate your help.

    #118286

    Actually my code is logically incorrect, since it does not allow closing open trades when TredeON=0. While this condition should not allow to OPEN new positions, it shouldn’t forbid open positions from being CLOSEd:

     

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login