Latest News

July 24: The S&P500 and FOREX EUR/USD Update.

Latest YouTube video fast average crossings part2.

chart template updated

My book "Capturing Profit with Technical Analysis"
best offer!

(DUTCH) Nederlandstalige versie hier.

MetaStock formulas.

MetaTrader formulas.

Over 300 items on sale,
and FREE Shipping in July!

WINNER "Favorite Article" in the Readers' Choice Award 2010. Thank You!

AXIOM business books awards, bronze medal for my book! Thank You!

Part 2 of "Smoothing The Bollinger %b Indicator" in the June issue of S&C.

Visit the TradersLibray blog.

Sylvain Vervoort

SEARCH Stocata
Book Store

Ttitle, author, item# or ISBN

Capturing Profit with Technical Analysis

WINNER favorite article
Readers' Choice Award.

readers choice awards

AXIOM Business Books Awards, bronze medal.

AXIOM award

beurswinst

   special offers

 

 

 


 

MetaStock Formulas

HOME   Back to MetaStock Formulas Overview

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

 

Special offer: "Capturing Profit with technical Analysis"
Trailing atr stop chart

 

Using your own trading method finding entry points you most probably would like to have this trailing stop available from your own entry date.

So, this is the MetaStock® formula  for an ATR trailing stop long position from a starting date. Please make sure that the date you select is an existing date in the data series.

SVE_StopLong_Trail_ATR_Date

{SVE_StopLong_Trail_ATR_Date - ATR trailing stop Long from date}
InpMonth:=Input("Month",1,12,1);
InpDay:=Input("Day",1,31,2);
InpYear:=Input("Year",1800,2050,2009);
InitStop:=Input("Initial Stop Price",0.1,10000,10);
atrper:=Input("ATR period :",1,100,5);
atrfact:=Input("ATR multiplication :",1,10,3.5);
loss:=atrfact*ATR(atrper);
EntryLong:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
EntryLock:=If(Ref(EntryLong,-1)=0 AND EntryLong=1,1,PREV);
support:=C-loss;
TrailStopLong:= If(EntryLock=0 OR EntryLong=1,InitStop,
If(support>Ref(Support,-1),Max(support,PREV),PREV));
TrailStopLong

 

Search the Internet

And this is the MetaStock® formula  for an ATR trailing stop short position from a starting date. Please make sure that the date you select is an existing date in the data series.

SVE_StopShort_Trail_ATR_Date

{SVE_StopShort_Trail_ATR_Date - ATR trailing stop Short from date}
InpMonth:=Input("Month",1,12,1);
InpDay:=Input("Day",1,31,2);
InpYear:=Input("Year",1800,2050,2009);
InitStop:=Input("Initial Stop Price",0.1,10000,10);
atrper:=Input("ATR period :",1,100,5);
atrfact:=Input("ATR multiplication :",1,10,3.5);
loss:=atrfact*ATR(atrper);
EntryLong:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
EntryLock:=If(Ref(EntryLong,-1)=0 AND EntryLong=1,1,PREV);
support:=C+loss;
TrailStopShort:= If(EntryLock=0 OR EntryLong=1,InitStop,
If(support>Ref(Support,-1),Min(support,PREV),PREV));
TrailStopShort

Very cheap books

 

HOME   Back to MetaStock Formulas Overview


 
Find a Stock ticker symbol, enter the ticker and find a chart, news, fundamentals and historical quotes here.

 

Enter Ticker Symbol:



 

 

 
Copyright © 2007 Stocata.org, All rights reserved.