Market exit times

Forums ProRealTime English forum ProOrder support Market exit times

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

    You can write a code line to enter and exit a market at a given time eg 0820 to 1000.

    But if I enter a trade at 0940 the machine will close the trade regardless of where it’s at at 1000.

    Is there a code line that states won’t open a trade after 1000 but if in a trade will let its path run even if this means it closes at  say 1020.

    Ive been stopped out prematurely at 1000 lots of time.

    #142127

    Urs, you can use one of these solutions https://www.prorealcode.com/topic/time-and-day-conditions/

    But that will not close anything, but it seems your last words require this.

     

    #142183

    That’s right. I don’t know if it’s possible but to keep an existing open position past 1000 to conclude naturally. But not open a new position past 1000.

    Inputting traditional times in a code just closes all positions at 1000 regardless

    #142188

    The above link does what you are asking.

    #142366

    I use the codes noted above by Robert, I also have some code to trade between certain times but only trade once and then stop till next day allowing it to look for a single trade beween certain hours. Programming can be very flexible and pro-order can do some quircky things if your code tells it to do certain things depending how you write it and where you write it. I don’t see your code posted, timings for trading should be seperate to code for closing off a trade. If your time codes closes off everything then it’s probably written incorrectly but without the code it cant be commented on further. Use the “Insert PRT Code” button to put your code in.

    Here is the same code written to check at 8pm, I just tell it to check from 7.50pm to 8.10pm and then it will stay in the trade till my rules close it out, it’s running well. You can enter as many times and combinations as you like but its just the code mentioned above. Your code is likely closing your program trade down, but it can’t be commented on as you haven’t posted it.. It’s also possible that what you’ve written the proorder doesnt understand and so it translates the confusion into a trade closure… It can be quircky like that. Post the code if you want some objective comments ..

     

     

     

     

    #142371

    My code is intended to enable or disable trade, no to close existing trades.

    To close any open trade at some time just write:

     

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