MinStopDistance and rejected orders

Forums ProRealTime English forum ProOrder support MinStopDistance and rejected orders

Viewing 3 posts - 1 through 3 (of 3 total)
  • #37455

    Following situation, i buy a security with a minimum stop distance of say 10 points. Then i want to use “set stop ploss 10” to set my stop loss. The commands are right after eachother in my code. Now my bot generate a buysignal to buy at market on the next candle. The bot buys but experience some slippage so the actual candle is trading below the buy-price. Then tries my bot to set the stop loss 10 points below my buy-price but because the current candle trades lower the stop order is rejected because it is closer than the 10 points minstopdistance. This happens 12 times (12 seconds in a row) and the whole trade is canceled.

    How can one approach this problem. We always only get the info from the last candle but not the current that is in the making, am i right? So how can one avoid this rejection-problem. Of course setting a much wider stop would solve the problem but is there a better solution?

    #41930
    Seb

    Do I understand it correctly that you end up in a position that’s designed to have a stop but the stop is missing? Have you tried rebuilding the code of the stop to a section that uses “if longonmarket” and a stop sell order condition (for long)? You can still set an emergency wider stop that meets the minimum stop criterium.

    #41933

    No, you understood me wrong. There is no position opened at all, the order is rejected but forget about it (this was an old post) I decided not to trade the security in question but thanks anyway.

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

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