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_Trends_trail

The basic trailing stop trading method formula will switch from support to resistance and visa-versa when breaking support or resistance. The percentage and ATR trailing stops allow sufficient price reaction that makes them most effective for medium term trend trading. Using lower percentages or a smaller multiplication factor for the ATR trailing stop will mostly result in too many losing trades. If we want a short term trailing stop it will have to move much closer to the price action. So, for the creation of TR&NDS we will look directly at the price movement. The most reliable reference is price support and resistance and the main item here is price turning points.

Additionally I am showing you the formula to use the TR&NDS trailing stop from a start date. TR&NDS is used only for an up move. During the down move we use the ATR trailing stop method.

 

This is the formula:

SVE_Trends_trail

{SVE_TRENDS_Trail trailing stop function}
atrfact:=Input("ATR multiplication :",1,10,2.8);
period:=Input("ATR Period :",1,100,10);
HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
diff1:=Max(HiLo,Href);
diff2:=Max(diff1,Lref);
ATRmod:=Wilders(diff2,period);
loss:=atrfact*ATRmod;
resistance:= C + loss;
support:=If(L>=Ref(L,-2) AND Ref(L,-1)>=Ref(L,-2) AND Ref(L,-3)>=Ref(L,-2) AND Ref(L,-4)>= Ref(L,-2),Ref(L,-2),
If(L>Ref(H,-1)*1.0013,Ref(H,-1)*0.9945,
If(L>PREV*1.1,PREV*1.05,
PREV)));
trends:=
If(H>PREV AND Ref(H,-1)>PREV,
Max(PREV,support),
If(H<PREV AND Ref(H,-1)<PREV,
Min(PREV,resistance),
If(H>PREV,support,resistance)));
trends

 

Special offer: "Capturing Profit with technical Analysis"
 

trends trailing 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. IMPORTANT! The TR&NDS trailing stop is broken only when broken by the high price!

So, this is the MetaStock® formula  for TR&NDS from a starting date in an uptrend. Make sure that the selected date exists in the data series. For the downtrend, use the ATR trailing stop method!

SVE_Trends_Trail_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);
Support:=If(L>=Ref(L,-2) AND Ref(L,-1)>=Ref(L,-2) AND Ref(L,-3)>=Ref(L,-2) AND Ref(L,-4)>= Ref(L,-2),Ref(L,-2),
If(L>Ref(H,-1)*1.0013,Ref(H,-1)*0.9945,
If(L>PREV*1.1,PREV*1.05,
PREV)));
EntryLong:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
EntryLock:=If(Ref(EntryLong,-1)=0 AND EntryLong=1,1,PREV);
Trail:= If(EntryLock=0 OR EntryLong=1,InitStop,
If(support>Ref(Support,-1),Max(support,PREV),PREV));
TrailBreak:=If(EntryLock=1 AND H<Trail,0.95*Trail,Trail);
TrailBreak

 

Search the Internet


Very cheap books

 

HOME   Back to MetaStock Formulas Overview


 
 
Copyright © 2007 Stocata.org, All rights reserved.