Latest News

March 25, 2017: New comments S&P500

BBS Trading Expert is available with the "BAND INDICATORS" DVD! Watch the Youtube BBS video and here is a crude oil trading example

BBS Band Break System trading Sylvain Vervoort

 

Want to know more about "Capturing Profit with Technical Analysis"?

NinjaTrader formulas.

MetaStock formulas.

MetaTrader formulas.

My YouTube videos.

Twice semi-finalist "Favorite Article" in the S&C 2015 Readers' Choice Award. Thank You!

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

Capturing Profit with Technical Analysis

SEARCH Stocata
Book Store

Ttitle, author, item# or ISBN

Favorite articles in 2010, 11, 12, 14 and 2015 S&C Readers' Choice Awards.

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


 
 
Copyright © 2007 Stocata.org, All rights reserved.