Pause code until tomorrow

Forums ProRealTime English forum ProOrder support Pause code until tomorrow

Viewing 6 posts - 1 through 6 (of 6 total)
  • #99391

    Hello,

    Would someone help me with the code that will make the strategy pause until tomorrow when a target profit is hit. I want to use it in timeframe 5 minutes.
    The system will take trades but when a certain amount of profit is reached, the system will pause for the rest of the day and will continue tomorrow.

    Thank you

    #99395

    Moderation message: Topic moved from “platform support” forum  to the more appropriate “pro order” forum

    #99486

    a certain amount of profit is reached

    You mean profit of the current day?

    #99657

    Yes, I was meaning the current day, something like:

    and the strategy will continue the day after because the todayProfit variable will be reinitialised to zero

    Thank you

    #99659

    Hi Youngus,

    I think you could use this

    In this case, when your operation is closed and your benefit is >=40 (currency, not points) your code will not launch any more orders. It also works for daily losses.

    In order to do that you should include in every BUYING/SELLING order nometrading=0

    I hope it is what you are looking for.

    Regards

    1 user thanked author for this post.
    #99724

    Hello Juan,

    Thanks for the code. I’ll try implement it.

    Cheers

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

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