Latest News

February 4: Follow new BandBreak5 system HERE!!!

Follow my S&P500 and FOREX EUR/USD weekly forecast.

My BBS Trading expert was presented at the 2011 Trading Forum in Denver. More information?

Trade with my DSTfx01 forex robot, (or BandBreak5) watch the VIDEO.

View an excerpt of my last 1st, 2nd and 3rd article about the put/call ratio published in S&C magazine.

MetaStock formulas.

MetaTrader formulas.

Best offer "Capturing Profit with Technical Analysis"!

WINNER "Favorite Article" in the S&C Readers' Choice Award 2010 and 2011. Thank You!

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

My YouTube videos

Sylvain Vervoort

SEARCH Stocata
Book Store

Ttitle, author, item# or ISBN

Capturing Profit with Technical Analysis

WINNER 2010 and 2011 favorite article Readers' Choice Award.

readers choice awards

AXIOM Business Books Awards, bronze medal.

AXIOM award

 

   special offers

  Facebook fan page

 

 


 

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.