# Selected Exploration

### Binary Trend High

A weekly long only exploration which signals a buy signal when the 12 period Aroon indicator crosses above 99 whilst the MACD is above the zero line, the 3 period exponential moving average is above the 30 period simple moving average, the stochastic is above the 50 level and the closing price is above the closing price noted when the previous occasion that the 12 period aroon indicator crossed the 99 level. A long exit is triggered when either the 3 period exponential moving average drops below the 30 period simple moving average or the stochastic falls below the 50 level whilst the 3 period exponential moving average is below the 30 period simple moving average. Note: The exploration assigns those securities where action has to be taken(either long entry or long exit) with a 1. This exploration is designed for use with weekly data.

#### Exploration Code

(copy and paste into the Metastock Exploration Builder):
Column A: Close
Column B: {Long Entry} Pds1:=10; Pds2:=15; Pds3:=1; {Mov(C,Pds1,E) - Mov(C,Pds2,E);}{MACD} Sig1:=Mov(Mov(C,Pds1,E) - Mov(C,Pds2,E),Pds3,E);{Signal Line} Sig2:= Mov(C ,3 ,E );{EMA3} Sig3:=Mov(C,30,S);{SMA 30} K:=(Sum(C-LLV(L,30),3))/(Sum(HHV(H,30)-LLV(L,30),2))*100;{Stoch} Sig4:=ValueWhen(2,Cross(AroonUp(12),99),C); LE:=Sig1>0 AND Sig2>Sig3 AND K>50 AND Cross(AroonUp(12),99) AND C>Sig4; LX:=(Cross(Sig3,Sig2)AND K<50) OR (Cross(50,K) AND Sig2-1)=1; Tr:=If(BarsSince(I OR LE) Column C: {Long Exit} Pds1:=10; Pds2:=15; Pds3:=1; {Mov(C,Pds1,E) - Mov(C,Pds2,E);}{MACD} Sig1:=Mov(Mov(C,Pds1,E) - Mov(C,Pds2,E),Pds3,E);{Signal Line} Sig2:= Mov(C ,3 ,E );{EMA3} Sig3:=Mov(C,30,S);{SMA 30} K:=(Sum(C-LLV(L,30),3))/(Sum(HHV(H,30)-LLV(L,30),2))*100;{Stoch} Sig4:=ValueWhen(2,Cross(AroonUp(12),99),C); LE:=Sig1>0 AND Sig2>Sig3 AND K>50 AND Cross(AroonUp(12),99) AND C>Sig4; LX:=(Cross(Sig3,Sig2)AND K<50) OR (Cross(50,K) AND Sig2-1)=1; Tr:=If(BarsSince(I OR LE) Column D:
Column E:
Column F:
Filter: colB OR colC