- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
SVE_Stop_Trail_ATR
ATR was developed by J. Welles Wilder and introduced in his book, “New concepts in technical trading systems” (1978). The Average True Range (ATR) indicator measures a security's volatility.The basic ATR trailing stop trading method formula will switch from support to resistance and visa-versa when breaking support or resistance. For the ATR trailing stop method we calculate the maximum allowed loss based on the basic ATR function multiplied by a factor.
Additionally I am showing you the formula to use an ATR trailing stop from a start date for either a long or a short trade.
It is clear that the trailing stop based on ATR is a dynamic stop related to the higher or lower volatility in price action.
You can make the ATR trailing stop more or less sensitive by using different multiplication factors. Apply the ATR trailing stop at past data to find the best fitting value and apply this value for future data.
This is the basic formula switching on stop breaks:
SVE_Stop_Trail_ATR
atrper:=Input("ATR period :",1,100,5);
atrfact:=Input("ATR multiplication :",1,10,3.5);
loss:=atrfact*ATR(atrper);
trail:=
If(C>PREV AND Ref(C,-1)>PREV,
Max(PREV,C-loss),
If(C<PREV AND Ref(C,-1)<PREV,
Min(PREV,C+loss),
If(C>PREV,C-loss,C+loss)));
Trail
kaynak:
stocata