[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

H&S Formation



PureBytes Links

Trading Reference Links


Use the following code in AA and exploreallstocks 
for the last day of your data.Use the same code for Indicator 
builder.You will find 3 yellow candles where the3 peaks of most recent 
H&S appeared.Give me back some comments if per=5 
issatisfactory.
 
/*H&S Research Code*/
 
x = Cum(1);per = 5;s11=H;pR = PeakBars( 
s11, per, 1 ) == 0;endt1= LastValue(ValueWhen( pR, x, 1 
));medt1=LastValue(ValueWhen( pR, x, 2 ));startt1=LastValue(ValueWhen( 
pR, x, 3 ));C1=x==endt1 OR x==medt1 OR x==startt1;endR = 
LastValue(ValueWhen( pR, s11, 1 ) );medR=LastValue(ValueWhen( pR, s11, 2 ) 
);startR = LastValue( ValueWhen( pR, s11, 3 ));Filter=medR>endR AND 
medR>startR AND 
abs(startR-endR)<0.02*(startR+endR);Graph1=C;Graph1Style=64;graphxspace=5;Graph1BarColor=IIf(C1 
AND 
Filter,7,1);NumColumns=3;Column0=startR;Column1=medR;Column2=endR;Column0Name="START";Column1Name="MED";Column2Name="END";
 
Dimitris 
Tsokakis