EXIT TRADING UNTIL TOMORROW – HOW TO CODE

Forums ProRealTime English forum ProOrder support EXIT TRADING UNTIL TOMORROW – HOW TO CODE

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

    Hi Guys

    Anybody know how best to code an ‘exit for today’ / Exit Trades until Tomorrow please?

    I’ve got as far as below, but can’t think how to code the line EXIT MARKET UNTIL TOMORROW

    Many Thanks
    GraHal

     

    #19764

    Hi grahal. I’m on the phone txting so it will be short. Try and look at my last post and how I count intradaybarindex perhaps you can reuse some ideas there. IF intradaybarindex>X then exit or somerhing

    cheers Kasper

    1 user thanked author for this post.
    #19766

    Save the current Date when closing your orders, and test if the current Date is different from this saved variable when you want to launch new orders.

    1 user thanked author for this post.
    #19832

    Mmm sounds easy when you say it Nicolas 🙂

    I’ve spent some time thinking and trying, but how do I Save the current Date when closing orders please.

    Thank You
    GraHal

    #19834

    You can do it easily with your previous code:

    And then when you want to initiate new orders, put a condition to verify if the current Date is not the previously saved one:

    It may be not the next day (tomorrow as you refer to it), but not the same day as your last closure. Don’t know if it’s important or not.

     

    #19877

    Embarrasingly easy when watching the Master 🙂  I was over-complicating the Date<>SaveDate.

    Results confused me at first. I worked on it (using GRAPH Function) until it made sense. Profit (optimised) almost same as without Date<>Savedate, but profit profile not as good … bigger drawdown.

    I’ll run Bot on Demo and if proves good I’ll put on here.

    Many Thanks Nicolas
    GraHal

     

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