Trailing Stop Minimum Distance

Forums ProRealTime English forum ProOrder support Trailing Stop Minimum Distance

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

    I am just starting to integrate a trailing stop loss into various long only strategies that I use by placing a SELL STOP order at the close of each candle at the calculated trailing stop price. I’ve not managed to watch a stop loss live in this situation yet so my question is what happens to SELL STOP orders if the level calculated is too close to the close price of the candle (i.e. under the minimum stop loss level allowed for the instrument). Do they just get rejected and leave you with no stop loss at all? Do I need to include something in the code to ensure that trailing stop levels are always bigger than the minimum stop distance allowed?

    #60184

    From my experience on the IG demo account, both the buy and stop orders are rejected if the stop does not meet minimum distance criteria. That means you don’t enter the market at all. Not entierly sure about how to tackle it, I guess a check to see if the stop is too close is enough.

    I’d be curious to know if anyone else has some other experience and solution though.

    #60190

    From my experience on the IG demo account, both the buy and stop orders are rejected if the stop does not meet minimum distance criteria. That means you don’t enter the market at all. Not entierly sure about how to tackle it, I guess a check to see if the stop is too close is enough. I’d be curious to know if anyone else has some other experience and solution though.

    Thanks for your reply. I would already be on the market with a previous BUY AT MARKET so entry is not an issue. At each candles close there is then a SELL AT STOP order which is the stop loss. and my concern is that if this level is less than the minimum stop distance allowed then it will be rejected and then the trade is running with no stop loss. It sounds like from what you have said that this is a possibility. I guess the best thing is to add a simple line or two of code to ensure the stop loss value is never too low and then it is guaranteed to not be a problem unless the broker decides to change the minimum stop distance.

    #60198

    When the stop is below the minimum distance (e.g., 4 points in DAX), IG sets the stop exactly to this minimum distance (from current price) and corrects it later to your desired value, in case the price should move farther away from the stop again. Not sure when this will happen, intrabar or at the end of a bar only. I think I have seen it happen after a few seconds within a bar, too.

    #60203

    Thanks for your reply verdi55 – unfortunately it adds further confusion to my already muddy waters.

    So if a SELL STOP order is put to the market but it is too close to market price you are saying that the SELL order is put in at minimum stop distance and then changed later during that candle if price moves so that minimum stop distance is no longer an issue. If this is the case then that is fine but I would love some clarification on this from someone at PRT.

    Also I assume that in backtesting the minimum stop distance is not known and so any orders are just placed at whatever price is selected – which once again means that backtesting is completely inaccurate if very close to market STOP prices are ever used.

    #60205

    You are right that the backtest does not know this problem. Or, you’d have to code it : Set a stop loss only to a precise value at the end of a bar when it is outside the minimum stop distance, otherwise set it to the minimum distance. And / or correct this later intrabar, and use the corrected stop intrabar when  triggered. All levels of complexity available here.

    Due to my experience, this does not have huge effects, it is kind of an additional slippage, and it is relevant only on short time scales, e.g. 1 minute.

    I would call IG, and they can tell you what exactly happens.

    #60207

    I’ m not using fixed stop losses close to the current price on short time scales anymore, because it turned out that checking for the closure of a position after every bar gives statistically better results. So, I have only an emergency stop loss far away which is almost never triggered and decide after every bar whether the position should be closed, for example at break-even. In many systems, this improves results because you avoid sharp spikes through the stop that immediately reverse.

    #60214

    Yes I too have found that fixed stops and take profits are less profitable than just making a decision at the close of each bar so we are on the same wavelength there. I learnt that lesson at the Brexit vote when I got hit for a big loss only to watch the markets instantly recover. However I am testing out a new style of trailing stop loss that closes in on price and so eventually a SELL STOP level close to price will have to happen – hence my question. I also agree that once you are at the minimum stop level then any difference can really be considered as slippage – but I do like to have as realistic back testing as is possible and removing this element of inaccuracy is quite simple to do so why not I think.

    At the moment I am in communication with both PRT and IG over another issue and will wait until that is completed before adding any chance of confusion with a different question. Maybe if Nicolas has five minutes free he could ask on our behalf what the exact situation with STOP and LIMIT orders and minimum stop distances is.

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