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

[amibroker] Candlestick code



PureBytes Links

Trading Reference Links

Buzz,
The EW patterns are complete on the pink bar.
I added some digits [0 to 8] on the last pattern, to make your study 
easier .

X=BarIndex(); 
p=Param("p",5,5,30,5);
z=Zig(C,p);Plot(C,"C",1,64);
CONDP=PeakBars(C,P)==0;SP=Cum(CONDP);
EP1=ValueWhen(CONDP,C,1);TP1=ValueWhen(CONDP,X,1);  
EP2=ValueWhen(CONDP,C,2);TP2=ValueWhen(CONDP,X,2); 
EP3=ValueWhen(CONDP,C,3);TP3=ValueWhen(CONDP,X,3); 
EP4=ValueWhen(CONDP,C,4);TP4=ValueWhen(CONDP,X,4); 
CONDT=TroughBars(C,P)==0;ST=Cum(CONDT);
ET1=ValueWhen(CONDT,C,1);TT1=ValueWhen(CONDT,X,1); 
ET2=ValueWhen(CONDT,C,2);TT2=ValueWhen(CONDT,X,2); 
ET3=ValueWhen(CONDT,C,3);TT3=ValueWhen(CONDT,X,3); 
ET4=ValueWhen(CONDT,C,4);TT4=ValueWhen(CONDT,X,4); 
ET5=ValueWhen(CONDT,C,5);TT5=ValueWhen(CONDT,X,5); 
// EW definition
EW8=EP3>EP4 AND EP2>EP3 AND EP2>EP1 AND ET4>ET5 AND ET3>ET2 AND 
ET2>ET1 AND ET3>ET4 AND ET4>ET5 AND CONDT;
COLOR=colorIndigo;
PlotShapes(shapeDigit8*EW8,color);
G=Cum(CONDP OR CONDT);
GEW=LastValue(ValueWhen(EW8,G));
PlotShapes(shapeDigit7*(G==GEW-1 AND CONDP),color, layer = 0, 
yposition = Graph0, offset = 15  );
PlotShapes(shapeDigit6*(G==GEW-2 AND CONDT),color);
PlotShapes(shapeDigit5*(G==GEW-3 AND CONDP),color,layer = 0, 
yposition = Graph0, offset = 15 );
PlotShapes(shapeDigit4*(G==GEW-4 AND CONDT),color);
PlotShapes(shapeDigit3*(G==GEW-5 AND CONDP),color,layer = 0, 
yposition = Graph0, offset = 15 );
PlotShapes(shapeDigit2*(G==GEW-6 AND CONDT),color);
PlotShapes(shapeDigit1*(G==GEW-7 AND CONDP),color,layer = 0, 
yposition = Graph0, offset = 15 );
PlotShapes(shapeDigit0*(G==GEW-8 AND CONDT),color);
Plot(EW8,"",colorPink,2+styleOwnScale);
Plot(z,"",colorYellow,styleThick);
Filter=EW8;// explore for all quotations
AddColumn(C,"C");
GraphXSpace=8; 

Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Dimitris Tsokakis" <TSOKAKIS@xxxx> 
wrote:
> The following code will recognize a complete Elliot Wave [according 
to http://www.equis.com/Education/TAAZ/?page=53 ]
> sequence.
> 
> X=BarIndex(); 
> p=Param("p",5,5,30,5);
> z=Zig(C,p);
> CONDP=PeakBars(C,P)==0;
> E7=ValueWhen(CONDP,C,1);T7=ValueWhen(CONDP,X,1);
> E5=ValueWhen(CONDP,C,2);T5=ValueWhen(CONDP,X,2);
> E3=ValueWhen(CONDP,C,3);T3=ValueWhen(CONDP,X,3);
> E1=ValueWhen(CONDP,C,4);T1=ValueWhen(CONDP,X,4);
> CONDT=TroughBars(C,P)==0;
> E8=ValueWhen(CONDT,C,1);T8=ValueWhen(CONDT,X,1);
> E6=ValueWhen(CONDT,C,2);T6=ValueWhen(CONDT,X,2);
> E4=ValueWhen(CONDT,C,3);T4=ValueWhen(CONDT,X,3);
> E2=ValueWhen(CONDT,C,4);T2=ValueWhen(CONDT,X,4);
> E0=ValueWhen(CONDT,C,5);T0=ValueWhen(CONDT,X,5);
> // EW definition
> EW=E5>E3 AND E3>E1 AND E5>E7 AND E4>E2 AND E2>E0 AND E6>E8 AND 
T8>T7 AND CONDT;
> Plot(C,"C",1,64);
> Plot(z,"",colorYellow,styleThick);
> //PlotShapes(shapeDownArrow*CONDP,colorRed);
> PlotShapes(shapeUpTriangle*EW,colorBlue);
> //PlotShapes(shapeUpArrow*CONDT,colorBrightGreen);
> Plot(EW ,"",colorPink,2+styleOwnScale);
> Filter=EW;// explore for all quotations
> AddColumn(C,"C");
> GraphXSpace=8;
> 
> A blue triangle and a pink bar will indicate the 8th EW point.
> [The signs will be placed in the graph as soon as trough E8 is 
recognized as a trough. ]
> I hope it will give a starting point for further analysis.
> Dimitris Tsokakis
> 
> PS1. A 4-year pattern was completed on Oct1998, [p=15, ^NDX], 
before the big movement 
> PS2. A 6-year pattern was completed on Sept2001,  [p=15, ^GDAXI]. 
The expectation [at E5] of an EW behavior
> for DAX would be quite profitable.
> 
> ----- Original Message ----- 
> From: Dimitris Tsokakis 
> To: amibroker@xxxxxxxxxxxxxxx 
> Sent: Friday, June 18, 2004 11:17 AM
> Subject: The Elliot Waves
> 
> 
> In
> http://finance.groups.yahoo.com/group/amibroker/message/65542
> Buzz wrote, among the others
> "I simply wanted some direction to help me determine
> if 'the wheel had been already invented' using AFL ..OR.. if there
> are some coding suggestions, OR cautions, when using AFL for
> programming AB to do the specific job of E.W.-candidate PRELIMINARY
> SCREENING --- that's all. In this regard, Dimitris's commentary has
> been MOST helpful and useful, and I see I have to do more 'homework'
> regarding defining the process and then implementing the
> coding."
> Buzz,
> Let us be creative.
> We will  code EW if we have a clear definition of EW. 
> Else, we will talk till June 2014 [or more] and, to be honest, I 
have better things to do.[suppose the same for you]
> Let us see the first http://www.equis.com/Education/TAAZ/?page=53
> chart.
> Do we agree that
> 01. E0, E2, E4, E6 and E8 are troughs
> 02. E1, E3, E5 and E7 are peaks 
> 11. E5>E3>E1
> 12. E4>E2>E0
> 13. E5>E7
> 14. E6>E8
> 15. E5>E7
> 16. point E8 is *after* point E7
> 
> If positive, the AFL code is coming from the corner.
> If your interpretation for EW sequence is different, please advise 
*before* the code.
> Dimitris Tsokakis



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

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