Overall profit limit/target per day

Forums ProRealTime English forum ProOrder support Overall profit limit/target per day

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

    Hi all, i am new to this forum and still rather new to coding automated strategies.

    I was wondering if it was possible to set a profit/target limit for each day of trading.

    For example within a day i may have numerous trades but do not want to open any more trades once a certain total pipcount/profit or loss is reached. however i do not want to have to restart the program every day. (So that i can use as back test and also have running if i am away, which i am a lot)
    Is this possible and could one of you kind folk show me how.

    many thanks

    #14411

    Example:

    This will count only closed positions. To count running positions, you need to add the check to you selling conditions, and change ‘strategyprofit’ to ‘strategyprofit+positionperf(0)’. I have not tested this code, but tell me if it works or not.

     

    #14441

    That’s perfect thankyou. I will test it out and let you know the results. Thanks again

    #14474

    @Wing

    Thanks, I’ll add this in the blog, since it is commonly requested and your code is great.

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