- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
In this second of a three-part series we will compare trailing-stop methods using an average true range (Atr) trailing stop.
The average true range (Atr) was developed by J. Welles Wilder and introduced in his book New Concepts In Technical Trading Systems. The Atr indicator measures a security’s volatility. Wilder defined the true range concept as the greatest value of the:
Like most technical analysis programs, MetaStock has a predefined Atr indicator (Atr (period)). But if you need to calculate it yourself, it can be created as follows:
{Get the required ATR period;}
period:=Input(“ATR Period :”,1,100,5);
{Calculate the biggest difference based on the true range concept;}
diff1:=Max(H-L,Abs(H-Ref(C,-1)));
diff2:=Max(diff1,Abs(L-Ref(C,-1)));
{Use Wilders’ moving average method to calculate the Average True Range;}
Mov(diff2,period*2-1,E)
With this formula you could create an Atr value based on something other than the close, such as an average price.
To create a trailing stop based on the Atr value, you need to calculate the maximum-allowed loss based on the Atr value multiplied by a factor. In Figure 1 you can see the 14% fixed trailing-stop value plotted in red on the chart of Amd. The blue line is the Atr trailing stop based on a five-day Atr average multiplied by a factor of 3.5. Note the Atr trailing buy & sell points on the chart. You would buy (green arrow) when the closing price moves above the trailing stop of the previous day and sell when the closing price falls below the previous trailing-stop value (red Exit sign).
source:
http://traders.com/Documentation/FEEDbk_docs/2009/06/Vervoort.html
The average true range (Atr) was developed by J. Welles Wilder and introduced in his book New Concepts In Technical Trading Systems. The Atr indicator measures a security’s volatility. Wilder defined the true range concept as the greatest value of the:
- Current high less the current low
- Absolute value of the current high less the previous close
- Absolute value of the current low less the previous close.
Like most technical analysis programs, MetaStock has a predefined Atr indicator (Atr (period)). But if you need to calculate it yourself, it can be created as follows:
{Get the required ATR period;}
period:=Input(“ATR Period :”,1,100,5);
{Calculate the biggest difference based on the true range concept;}
diff1:=Max(H-L,Abs(H-Ref(C,-1)));
diff2:=Max(diff1,Abs(L-Ref(C,-1)));
{Use Wilders’ moving average method to calculate the Average True Range;}
Mov(diff2,period*2-1,E)
With this formula you could create an Atr value based on something other than the close, such as an average price.
To create a trailing stop based on the Atr value, you need to calculate the maximum-allowed loss based on the Atr value multiplied by a factor. In Figure 1 you can see the 14% fixed trailing-stop value plotted in red on the chart of Amd. The blue line is the Atr trailing stop based on a five-day Atr average multiplied by a factor of 3.5. Note the Atr trailing buy & sell points on the chart. You would buy (green arrow) when the closing price moves above the trailing stop of the previous day and sell when the closing price falls below the previous trailing-stop value (red Exit sign).
source:
http://traders.com/Documentation/FEEDbk_docs/2009/06/Vervoort.html