set different stop loss

Forums ProRealTime English forum ProOrder support set different stop loss

Viewing 8 posts - 1 through 8 (of 8 total)
  • #102821

    Hello,

    I’m working with stop orders in order to open  new positions in my automated strategies. I have an issue with my SL however. My idea is to:

    1.  set a first stop once the position is open, just below the previous candle low/high
    2. For the next bars, I would like to use another stop, a bit further, which is then fixed through the trade

    The issue I have is that when used separately the code for point 1 and 2 works fine, but when combined only point 1 is working. So in the code the instruction “set stop loss” seems to prevail over “sell/existshort at stop”.

    Does someone know why?

     

    #102831

    Whenever LONG = 1 or SHORT = 1 then the STOP LOSS order will be read and placed. The following should work as long as you are not wanting to use accumulating positions:

     

    #102835

    thx Vonasi, but actually I already used the “not onmarket” function, I just cut it wrongly when I copy paste the code here.

    So no, on my charts, it still doesn’t work

    #102838

    Sorry my mistake. A SET STOP LOSS order need only be sent once and is then on the market until it is either cancelled or the value changed. Setting it to zero is supposed to cancel them but it did not use to work (maybe it does now?) An alternative is to use SET STOP %LOSS 100.

     

    #102840

    An alternative is to just use pending stop orders and not use SET STOP orders.

     

    #102854

    Thx very much Vonasi ,

    your trick with SET STOP %LOSS 100 seems to be working! Testing the code on my strategy, it improves a bit the profit factor, which was the goal, as I noticed that sometimes, the market moves directly against you (meaning in the same bar when you took the trade), and it’s best to cut directly.

    #102856

    So I’m guessing that SET STOP pLOSS 0 is still not cancelling any set stop orders then?

    #102867

    works also, at least on backtest

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

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