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

[amibroker] Enhanced H&S pattern, I



PureBytes Links

Trading Reference Links




The previous H&S requirements were:
1. Last peak P3 not more than back=100 bars ago
2. From P1 to P3 not more than inter=200 bars.
3. abs(H1-H3)<0.02*(H1+H3), the difference of the shoulders 
to be less then 1% os the shoulders average
I try to consider two new requirements
4. More than 2 main Volume peaks from P1 up to P2
5. The average of the peaks to be +30% greater than the recent 
[2*inter] lows.[this will imply factor>1.3]
Some results from the n=1 last quotations for N100 [the ^N225 
index is included for comparison] may come from the code
 
// Enhanced H&S pattern , experimental
per = 3;x = Cum(1);back=100;inter=200;s11=H;R=0;/* H & 
S */pR = PeakBars( s11, per, 1 ) == 0;endt1= LastValue(ValueWhen( pR, x, 
R+1 ));medt1=LastValue(ValueWhen( pR, x, 
R+2));startt1=LastValue(ValueWhen( pR, x, R+3 
));dt1=endt1-startt1;C1=x==endt1 OR x==medt1 OR x==startt1;endR = 
LastValue(ValueWhen( pR, s11, R+1 ) );medR=LastValue(ValueWhen( pR, s11, R+2 
) );startR = LastValue( ValueWhen( pR, s11, R+3  
));Filter1=medR>endR AND medR>startR AND 
abs(startR-endR)<0.02*(startR+endR) ANDdt1<inter AND 
endt1>LastValue(x)-back;perc=10; 
M=MA(V,5);Vmax=LastValue(HHV(V,LastValue(x)-startt1));Vpeak=Zig(m,perc)==Peak(m,perc);Pn=Cum((x>startt1 
AND x<endt1+10)*Vpeak) ;HSvol=Filter1 AND 
Pn>2;Cond=(endR+startR+medR)>1.3*LLV(C,2*inter);Filter=Filter1 ;// 
explore for the n=1 last 
quotationsAddColumn(Pn,"Peaks",1.0);AddColumn((endR+startR+medR)/3,"AvgH");AddColumn(LLV(C,2*inter),"Lowest");AddColumn(Column1/Column2,"factor");
 
My thought is to add 
Pn>2;
factor>1.3;
to the basic filter1 condition.
 
I would appreciate your comments on the new 
requirements.Dimitris Tsokakis






Yahoo! Groups Sponsor


  ADVERTISEMENT 









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



Attachment:
enhHS.gif

Attachment: Description: "Description: GIF image"