Limiting losses during spikes – must use Stop Orders

Something I noticed today while investigating loss trades in my backtesting results.

Suppose our strategy will automatically close out the position if on some condition, say either we have lost a certain amount of pips, or some lines cross signaling an exit. However, the strategies logic is only executed per update of the instrument. Let’s say we are using an hourly chart, we cannot always afford to wait for the hour to end and the bar to update to decide if we want to close the trade or not.

In the example below, the MACD type strategy opened a buy trade and then the market spiked down leading to quite a big loss. In that spike hour the statistics are also shown below. That was a 117.4 pip spike down in that hour.

Assuming the strategy’s stop price should be hit when the market moves naturally, an emergency stop order is supposed to stop against sudden price changes that will probably retrace anyway. So let’s assume my strategy’s stop loss was 100 pips away, but we don’t expect prices to move more than 30 pips an hour (based off historical range?), so if the price moves more than 30 pips in a few minutes against us, something significant has gone down and it may be safer to close the position.

We need to use the Stop Orders, which are immediately executed as they are tied to the position, to implement this and prevent unnecessary losses during spikes. However, this poses another interesting problem if our strategy has some fixed price/pip-loss in mind as an exit. We cannot set two stop orders per position unfortunately… so the strategy will have to keep track of its own one internally.

Also, of course, we would have to re-adjust the stop value whenever there is a new bar, and re-base it off the open price of this bar, until it exceeds the strategy’s internal stop price then we can set it to that price.

Posted in Backtesting, Money Management, Research and tagged , , , , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *