only open a 2nd position if the 1st one was a loser?

Forums ProRealTime English forum ProOrder support only open a 2nd position if the 1st one was a loser?

Viewing 3 posts - 1 through 3 (of 3 total)
  • #104757

    Hi all,

    Ive encountered a problem for which I cannot find a solution in the manual or in previous forum posts. If I have a strategy that can only open a maximum of 2 trades per day. How would you stop the 2nd position from being opened if the 1st trade was a winner? I.e. I only want to open the 2nd trade if the 1st attempt was unsuccessful.

    I have tried using the

    function but I don’t think that works because what happens to the very 1st trade of the strategy – i.e. when there is no previous trade to reference?

    Thanks

    Roj

     

    #104760

    Compare STRATEGYPROFIT to STRATEGYPROFIT from the bar before and if it is more then set a flag to not trade. At the end of the day reset the flag.

    Something like this:

     

    1 user thanked author for this post.
    #104765

    Thank you Vonsai. That works a treat. Very smart solution!

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

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