No new order until next day

Forums ProRealTime English forum ProBuilder support No new order until next day

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

    Hi, I needed help with a script that doesn’t make a new buy until the nextday. If it makes a sell, it doesn’t matter if it’s a profit or loss. So after 00.00 it’s fine for it to go into buy again. If it doesn’t make a sell, I want it to continue running until it gets a signal to do so.

    #252205

    Use the variable OTD as defined at https://www.prorealcode.com/topic/help-with-limiting-strategy-to-one-trade-per-day/ (post #143705 ).

    1 user thanked author for this post.
    #252206

    Hi,you can handle this easily by checking when a new day starts and using a variable to mark whether a trade has already been made during the current day.
    Here’s a working example that does exactly what you described:

    2 users thanked author for this post.
    #252208

    The link above seems not to work, here is the code:

     

     

    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