I am trying to code the H&S pattern into Amibroker. I want to have 
it recognized on the CCI. I coded it, but cannot get it to recognize 
properly. Here is the code, if anyone can help, I would appreciate 
it.

thanks,
Dennis



z= CCI(14);

Plot(z,"",colorSkyblue,styleLine);

Plot(z,"",colorLime,styleHistogram);

Plot(0,"",colorRed,styleLine);

//---------------------------------------------------

// Head and Shoulders Pattern:  to use with CCI(14) with zero line 

// calculate left shoulder

LStop= z== HHV(z,(BarsSince(z<0))) AND z>=0 ; //left shoulder top

LSbot= z==LLV(z,BarsSince(Lstop))AND z>=0  ; //left shoulder bottom

LeftShoulder= LSbot; //left shoulder


// calculate head

HeadTop= z==HHV(z,BarsSince(LSbot)) AND z>=0; //head top

HeadBot=z== LLV(z,BarsSince(Headtop)) AND z>0; //head bottom
 
Head= headbot;  //head


// calculate right shoulder

RStop= z==HHV(z,BarsSince(Headbot)) AND z>0; //right shoulder top

rsbot= z==LLV(z,BarsSince(RStop)); // right shoulder bottom

RightShoulder= rsbot; //right shoulder bottom

//------------------------------------------------------------

// Plot numbers for refernce to aid in testing

PlotShapes(IIf
(Leftshoulder,shapeDigit1,shapeNone),colorTurquoise,0,0,-15); // 
left shoulder bottom

PlotShapes(IIf(Head,shapeDigit2,shapeNone),colorTurquoise,0,0,-
25); //head bottom

PlotShapes(IIf
(rightshoulder,shapeDigit3,shapeNone),colorTurquoise,0,0,-35); // 
right shoulder bottom






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to