Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
Find Out More Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Breakout Signals for Metastock
maestro
over 6 years ago
Metastock

Rating:
5 / 5 (Votes 1)
Tags:
metastock

Long/Short breakout system signals (similar to the Original Turtles Trading Rules) & Exploration.

By Jose Silva

Indicator / Formula

Copy & Paste Friendly

{ Plots breakout long/short signals }
{ http://www.metastocktools.com }
{ With thanks to Roy Larsen for Init idea }

pds1:=Input("HHV (long) breakout periods", 1,252,21);
pds2:=Input("LLV (short) breakout periods", 1,252,10);
display:=Input("display: signals=1, in-trade binary=2",1,2,1);
x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,4);
delay:=Input("Entry and Exit delay",0,3,0);

x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
In:=x>Ref(HHV(x,pds1),-1);
Out:=x<Ref(LLV(x,pds2),-1);

Init:=Cum(In+Out>-1)=1;
InInit:=Cum(In)=1;
Flag:=BarsSince(Init OR In) < BarsSince(Init OR Out)+InInit;
In1:=Cum(Cum(In))=1;
Out1:=Cum(Cum(Out))=1;

If(display=1,Ref(Cum(Cum(In))=1,-delay),0);
If(display=1,-Ref(Out1 AND BarsSince(In1)>=BarsSince(Out1),-delay),0);
If(display=1,Ref((InInit AND Alert(InInit=0,2)
OR Flag AND Alert(Flag=0,2)) - (Flag=0 AND Alert(Flag,2)),-delay),Flag)

0 comments

Leave Comment

Please login here to leave a comment.

Back