close strategy after profit/ number of trades

Forums ProRealTime English forum ProBuilder support close strategy after profit/ number of trades

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 12 posts - 1 through 12 (of 12 total)
  • #192176 Report

    how does one set up the strategy to stop trading after 1 profitable trade/ a certain number of trades?

    #192180 Report

    To stop trading after 1 profitable trade:

    To stop after a certain number of trades:



    #192186 Report

    awesome. thank you

    #193053 Report

    how does one combine these 2 pieces of code so that the maximum number of trades is 2 but the system will stop after 1 profitable trade. So that if first trade is profitable, the second wont happen but if first is a loser then 1 more trade will be allowed


    #193088 Report

    There you go:

    #194309 Report



    thank you for this! i am learning fast!!


    i applied the code to my strategy but it still does more than the maximum of 2 trades per day and it isnt stopping once profitable. have i put it in wrong?


    attached is list of orders and code







    #194327 Report

    It open as many trades as MAXTRADES.  It’s 3 now, but you can change it as needed.


    #194329 Report

    …but on 12th , there were 6 trades, so not sure code is working

    #194340 Report

    This code is working as expected on DAX, 1-min, 5-min, 15-min TFs, etc…

    I suggest that you either post your code, or use mine, simply replacing MyConditions with yours.

    #194374 Report

    amazing!! thank you for your time and patience!




    #194846 Report

    hi roberto


    1 more question……!


    i have 2 strategies that i have made/ am using with a degree of success and they are both good on back testing. I would like another set of eyes to have a look at them and see where i can improve them. Would be happy to pay for that service! is there anyone you could recommend? would you have a look? should i just post them on a forum and see what people say?! alex

    #194847 Report

    You can either post your code or apply for paid services at


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

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