How do you clear stop orders?

Forums ProRealTime English forum ProOrder support How do you clear stop orders?

Viewing 7 posts - 1 through 7 (of 7 total)
  • #73382

    Good Day, I am writing a strategy that opens stop orders at specific times but I want them to expire or be canceled if certain conditions are met. The defparam flatafter function will not suffice as it is a 24h strategy.

    So the question is how do I cancel stop orders once placed?

    #73384

    The manual says set the value to zero but it does not work. Which reminds me that Nicolas was supposed to get back with the answer from PRT regarding that!

    You could just put in something like:

    Then the instrument would have to go to zero to hit the stop.

    #73391

    Pending orders expire each bar and, if needed, must be placed again and again.

    So DEFPARAM FLATAFTER/FLATBEFORE do not affect them and CUMULATEORDERS=FALSE doesn’t as well.

    If some conditions arise to cancel them, well… just wait the closing of the current bar (you cannot do otherwise, since any strategy is executed only at that very moment)!

    #73392

    I think we need to clarify whether you are placing your stop orders on the market via a SET instruction or via a SELL at x STOP instruction.

    I’m guessing the former as otherwise as Robertogozzi says they would just be cancelling themselves anyway.

    #73447

    I am aware of the fact that stop orders have to be placed (renewed) on each execution, however, I have found that even after my criteria is no longer met orders are still being triggered.

    I would also love to know how to ‘update’ and ‘cancel’ set stop (stoploss) and set profit (target) levels.

    #73449

    These will last only one bar and then be cancelled. If they are still on the market then it is either that your code has placed them again or you have a problem that you should report to PRT.

    These are on the market until the position has been closed.

    You can change the value at any time but if you are on a limited risk account then you can only move them closer (don’t get me started on the stupidity of this!)

    There are one or two topics on here about the fact that:

    is supposed to (according to the PRT documentation) cancel the SET stop but it does not. People normally see fantastic false results if they use a value of zero.

    Nicolas spoke to PRT about this but he keeps forgetting to pass the info on to us. Hopefully after his weekend of rest he will be able to! 🙂

    It is best to either only use Limit and Stop orders and not put them back on the market if you want to cancel one or if using the SET instruction then do what I said in my first post:

     

    #73450

    Thanks Vonasi! That was crystal!

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

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