Stoploss not put in place

Forums ProRealTime English forum ProOrder support Stoploss not put in place

Viewing 15 posts - 1 through 15 (of 37 total)
  • #225513

    I’ve above code in an algo and short trade just got executed. It set the profit but not stoploss. It has done both in the past so wondering how such msgs between IG and PRT get lost or not fired by PRT. You can see in the attached images.

    #225518

    Does it work correctly with …

     

    #225520

    In general, it works with

    SET TARGET PLOSS sDistance

    I will change to

    SET STOP PLOSS sDistance

    but the same issue can happen randomly. I am not sure if it is related to TARGET instead of STOP but as I said, it works generally.

    #225547

    I think you could send a technical report to PRT :

    – As soon as you encounter the issue, go to the “Help” menu on the ProRealTime toolbar.
    – Please assure that the window concerned by this issue is open.
    – Click on “Help center”, then on “I have a technical problem”
    – Choose the category “Automatic trading”
    – Give the name of the code you are referring to.
    – To benefit from a technical help, it i necessary to authorize the access to the crypted code. To give them a temporary access, please check the box “I authorize the decryption of the codes (…)”
    – Give as many details as possible, explain the issue you are having in the text box and mention
    – Click “Send report”

    #225563

    Is there a way to enable tracing in the product or have a look at the logs without contacting PRT support?

    #225567

    hi, I did not know that one can place an order for limiting the losses with a “set target ploss” command, it must be something relatively new. yet I was now opening the programming manual and wow – in fact this possibility is offered.  but I think one needs to read the description very carefully, it tells:

    It is also possible to limit losses with a target order when a position is currently losing. The limit is then placed in the direction of the loss of the position:
    SET TARGET LOSS x: A limit is placed at x units from the position entry price.

    so, it might be very important – that hint to “when a position is currently losing…” – that could mean that corresponding order is issued not at the same time when position is opened, but “later” – at the time when open position runs into losses. I did not test it, it’s only my thinking/guessing.

    1 user thanked author for this post.
    #225568

    …while with the command “set stop loss” the stop loss order is really always placed at the time of position opening. at least myself I really never experienced a case after (thousands of trades executed) that it was not placed…

    1 user thanked author for this post.
    #225572

    Thanks. I am testing both (SET TARGET PLOSS & SET STOP PLOSS) to see the results.

    #225579
    Wim

    There is also the effect that the LAST “set target x y” cancels the previous “set target a b”. As far as I know it’s always the last “set stop…” or “set target…” that’s active. That explains to me why in your first example the stop wasn’t active (any more).

     

    #225583

    As far as I know it’s always the last “set stop…” or “set target…” that’s active.

    Wim, do you mean that a set stop will cancel a set target and vise versa ?
    (this is not really clear and I like to know, not having the experience this time)

    #225589
    Wim

    Nope. A “set stop” cancels the previous “set stop”, and you need another “set target” to make forget the previous “set target”. It’s like fratricide 🙂

    I almost always use a combination of a set stop and a set target, works flawlessly.

    2 users thanked author for this post.
    #225594

    So you’re telling me below code must leave an order with target profit and stop loss

     

    I am not sure it is doing all the time. I am still testing. My understanding any time above code gets executed, it must leave an order with stop loss and target profit limit and should not leave just an order without stop loss and target profit limit because it can adverse effects when the market moves fast.

     

    #225595

    I’ve below code running since yesterday. It left an order earlier in the day without stop loss and profit:

     

    Please see attached

    #225601
    JS

    According to your screenshots, the order is still “pending”…

    If your order has not been executed, there is no associated Stop Loss and Take Profit…

    I tried your code and after the order was executed, the Stop Loss and Take Profit were immediately placed…

    (Protection Stops and Target orders are linked to an open position and valid until the close of that position)

    #225607

    I get your point regarding the sequential nature of the steps. But if I leave a guaranteed order, it shows stop loss and target profit evening in pending state. Same is true for manual order placement but why not for algo order without guaranteed stop. Why it is not an anomaly? It guarantees slippage in news related movement where a second difference between 1st order placement and then stop loss placement can cause big losses.

Viewing 15 posts - 1 through 15 (of 37 total)

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