1 short and 1 long per day max

Forums ProRealTime English forum ProBuilder support 1 short and 1 long per day max

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

    Hi, is there a way to limit 1 short trade or 1 long trade per day?

    I know that it is possible to code a strategy by limiting it to 1 trade per day by using and playing around with the “barindex” functions.

    But I specifically only need the strategy to perform a maximum of 1 short trade per day or 1 long trade per day (so in total maximum 2 trades per day),
    and I can’t figure out how to do it, is it possible to do it somehow?

    thanks in advance for the help

    #229458

    There you go:

    you may set MaxTrades to 2, to allow 2 trades for each direction, etc…

     

    #229679

    thx Roberto this should work fine.

    #229688

    hi, I found it also very useful to use below functions, especially if one triggers entries not “at market” but with “stop” (or “limit”):

    if longtriggered = 1 then…

    if shorttriggered = 1 then…

    cheers

    justisan

    1 user thanked author for this post.
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