To form a profitable trading strategy, it is important to know when to enter and exit the trade. While most traders use several tools to enter a trade, they often fail to comprehend when to exit. A perfect exit point helps traders do their job without added mental pressure as it relieves them from added mental pressure. While many tools and indicators can help you find the exit spot, the Average True Range Trailing Stops, or the ATR Trailing Stops, is deemed one of the best. Traders majorly use it to protect their capital. You can use it for individual trades where it can be used to lock in individual profits. When used alongside a trend filter, it can also be used to find entries.
What is ATR trailing stop?
ATR Trailing Stops or Average True Range Trailing Stop represents the process of setting trailing stops to close positions based on the average true range. Stop loss is determined based on a measure of the degree of price volatility (Average True Range) in order to protect capital and lock in profits on individual trades.
How to Time Exits Using the ATR Trailing Stops
The concept of Average True Range was first introduced in 1978 by J. Welles Wilder. Stock or index volatility is measured using the ATR, and the detailed explanation could be found at the Average True Range. In the initial stages, Volatility Stops that follow trends were used with the Average True Range by Wilder. This experiment later helped in the development of Average True Range Trailing Stops.
ATR Trailing Stop Loss Strategy
You can use the ATR Trailing Stop to identify exit signals for both short and long positions:
- For a long position, the exit position will be a sell position. It would help if you exited when prices cross below the trailing line created by the ATR.
- For a short position, the exit position will be a buy position. It would help if you exited when prices move above the trailing line created by the ATR.
Example
The given graph shows the downtrend, which is highlighted with the ATR’s help. It also has the 63-day exponential MA that has been used here as the trend filter.
According to this graph:
- When the price gets closed below the ATR, but the exponential average remains close, you must go short.
- As soon as the price cross above the ATR trend line, you must exit.
Setting Up ATR Trailing Stops
The ATR time period can be set from 5 to 21 days. While the developer suggests setting it for 7 days for general trading, 21-days for long-term trading, and 5-days for short-term trading. For trailing stops, multiples ranging from 2.5 to 3.5 times the ATR. The lower multiples can get more susceptible to whipsaws.
The default setting is 3X21 day ATR. The Closing Price is also set as default.
The ATR Formula
- Calculate the ATR trailing stop using the following method:
- Average True Range (ATR), a volatility indicator that compares each day’s range to measure commitment, is calculated.
- The result is multiplied by the chosen multiple, 3XATR, in this example.
- If there is an uptrend, the result from step 2 is subtracted from the Closing Price. This will be your stop for the next day.
- The result from step 2 is added to the closing price if the prices close below the ATR stop. This is done to track short trade.
- If the prices do not close below the ATR, keep subtracting 3XATR from every following day. This will continue till the price reverse below the ATR stop.
The Evolution of the ATR Trailing Stops
The ATR stops are susceptible to whipsaws unless the trend is strong. This makes them more volatile than the rest. To avoid this volatility, you must use it with a trend filter. These stops are highly adaptive to changing market conditions than their counterparts, like the Percentage Trailing Stop. However, it yields similar results if you are applying it to stocks. Keep in mind that these need to be filtered for strong trends.
There are two possible weaknesses of Volatility Stops and the original ATR. These are:
- In an uptrend, the stop moves downwards when the ATR widens. A ratchet mechanism can be deployed to deal with this weakness.
- The Reverse-and-Stop mechanism conjectures that you will be switching to a short position as soon as you stop out of a long position. The opposite is true, as well. When you are in a system that follows trends, it is widespread to exit early and get the next entry in the previous trade’s direction. You can deal with this problem by using ATR Bands.
ATR trailing stop EA
Please download ATR trailing stop EA.
This EA, please do not use for trading because trading rules are not defined. However, using this code, you can add entry rules and use ATR trailing stop for trading.
The main idea of ATR trailing EA is this code:
//–
void SendOrder(double _stop,double _take)//Order send module buy/sell
{
//—
atr = iATR(Symbol(), atrTf, atrPer, 0);
atrSL =(atr * _stop / _point);
atrTP =(atr * _take / _point);
//—
switch(Ordertype)
{
case _buy: //Buy order
_mode =OP_BUY;
pricemode = Ask;
col = Green;
_type=”BUY”;
_SL = Ask – atrSL * _point;
_TP = Ask + atrTP * _point;
break;
case _sell://Sell order
_mode = OP_SELL;
pricemode = Bid;
col = Red;
_type=”SELL”;
_SL = Bid + atrSL * _point;
_TP = Bid – atrTP * _point;
break;
}
if(CheckMoneyForTrade(Symbol(),_mode,LotSize()))
Ticket=OrderSend(Symbol(),_mode,LotSize(),pricemode,5,0,0,WindowExpertName(),MagicNumber,0,col);
if(Ticket<1)
{
Print(“Order send failed, OrderType : “,(string)_type,”, errcode : “,GetLastError());
return;
}
else
Print(“OrderType : “,(string)_type,”, executed successfully!”);
if(OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES))
{
if(!OrderModify(OrderTicket(), OrderOpenPrice(), _SL, _TP, 0))
{
Print(“Failed setting TP/SL OrderType : “,(string)_type,”, errcode : “,GetLastError());
return;
}
else
Print(“Successfully setting TP/SL on OrderType : “,(string)_type);
}
}
//–
int Position()//This function prevents this adviser from interfere with other experts you may use on same account
{ // It checks and handle it’s own orders.
int dir=0;
for(int i = OrdersTotal() – 1; i >= 0; i–)
{
if(!OrderSelect(i, SELECT_BY_POS))
break;
if(OrderSymbol()!=Symbol()&&OrderMagicNumber()!= MagicNumber)
continue;
if(OrderCloseTime() == 0 && OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber)
{
if(OrderType() == OP_SELL)
dir = -1; //Short positon
if(OrderType() == OP_BUY)
dir = 1; //Long positon
}
}
return(dir);
}
//–
Conclusion
It is important to use the right tools to spot exit signals. You will be in a better position by using the Average True Range Trailing Stops combined with a trend filter.