Stop orders rejected because too close to current price

Forums ProRealTime English forum ProOrder support Stop orders rejected because too close to current price

  • This topic has 7 replies, 3 voices, and was last updated 5 years ago by avatarBC.
Viewing 8 posts - 1 through 8 (of 8 total)
  • #152932

    Yes, in backtesting everything works fine and looks great. But when it comes to live trading some parameters change.

    So my strategy enters a trade using STOP orders. And I am struggling at the moment with the situation, that somethings the algo calculates the levels of the STOPs to close to the current price, so that IG rejects the STOP orders and the strategy stops.

    Any idea how to prevent this? How can I identify what the minimal distance of points to the current price must be on financial instrument level?

    Thanks

     

    #152934

    There’s no way to know what that distance is at runtime and it changes when there’s high volatility or news.

    You should check what it is with IG, then use this code to make sure your SL is not below:

    this will not guarantee your strategy will never be stopped again when exceptions occur, but most of the times it will.

    1 user thanked author for this post.
    #152939

    Thats a helpful snipped of code – Grazie

    #152955
    BC

    Thanks Robertogozzi

    Some of my algo which use pending stop order also affect by IG conditions (too close to market price).

     

    Any command can read the current price so that I use your syntax?

    #152970

    You need to apply that code whenever you place an order, be it a SET STOP LOSS or a PENDING LIMIT/STOP order (not AT MARKET).

    Before you place the order make a difference between the current price (CLOSE) and your desired entry price, then check that it’s not less than the required distance:

    in this case say you want to enter LIMIT at LOW[1] on a raising market, so you want to make sure that the entry price is at least within DISTANCE pips from the current price (CLOSE) at the very moment you place the order.

    Obviously you will have to check with IG what is the correct value for DISTANCE (if any).

     

     

    #152975
    BC

    Thanks for your suggestion, Robertogozzi.

     

    But actual syntax is as below:-

     

    So I wondering what command can replace the CurrentPrice?

    #152980

    CLOSE is the current price.

    In strategies it’s the last price of the most recently closed candle since currently forming candles cannot be accessed, while in indicators and screeners it’s the last price of the candle being formed.

     

    #153041
    BC

    Yes, I should use Close to detect current price.

    Million thanks Robertogozzi.🙏🙏

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