Pause trading till next open when stop loss hit

Forums ProRealTime English forum ProOrder support Pause trading till next open when stop loss hit

Viewing 11 posts - 1 through 11 (of 11 total)
  • #137001

    Hi, Please can somebody point me in the right direction,  I would like code to pause the system till next open when a loss is booked after a stoploss is hit, Thanks.

    #137006

    There you go:

     

    1 user thanked author for this post.
    #137175

    Hi Robert,

    I made an attempt at inserting the code but it is not performing as expected still multiple losses on same day. D2 is the original equity curve before code was inserted please take a look at the code thanks.

     

    #137179

    You asked to wait 1 bar, that’s what it’s doing.

    If you want to pause the whole  day then replace line 2 of my code with

    Please, always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.

    Thank you 🙂

    1 user thanked author for this post.
    #137261

    Hi Robert, Thanks I made the suggested replacement and I am still getting subsequent trades opening that day, thanks for your help.

    #137262

    You did not add TradeON to your conditions (line 10 and 15 in my code).

    Add it to your lines 67 and 75.

    My first code was made to wait ONE bar, while my next suggestions was to wait ONE day (till new day opens).

     

     

     

    1 user thanked author for this post.
    #137464

    The code still dont work.

    #137469

    It’s beacause STRATEGYPROFIT (like ONMARKET, etc…) take a bar to be able to update its status, so when you do Stop & Reverse ProOrder can’t know whether there was a gain or a loss.

    To achieve the correct result you should add

    to your conditions to enter a trade.
    In case you want to do Stop & Reverse you need to take note of that and accept that you will probably suffer TWO losses before there’s a temporary stop.

    At line 52 and 57 you always use BUY both for long and short conditions, is that intentional?

     

     

    #137586

    Ok Roberto, el código es bueno, thanks.

     

    But, other problem.

    If cumulateórders = true, the Code no function.

    #137589

    If you use and Not OnMarket it will not work!

    #137658

    UPS… Thanks.

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

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