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

[amibroker] Re: Horizontal Line drawing - suggestion - Tomasz?



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "aequalsz" <aequalsz@xxxx> wrote:
> Accolades to Mr. DIMITRIS TSOKAKIS for his Oblique Fibonacci Line
> code.
> 
> Made two tiny mods to the code that might help some.
> 
> YP=LastValue(Highest(SU/SU)*H);  ->  YP=LastValue(Highest((SU/SU)*H));
> 
> Just for cosmetic purposes.
> 
> And,
> 
> DIST=ValueWhen(H==YP,H-SU);  ->   DIST=LastValue(Highest(H-SU));
> 
> Just a slight variation to catch the extreme value.
> 
> 
> Once again, good work, Mr. Tsokakis.
> 
> Aequalsz

Found some exceptions for the previous version.  Here is a simplier one.  

A


// Oblique Fibonacci Lines, by D. Tsokakis, June 2004
//
//  Modified by Aequalsz 6/11/2004

SU=Study("SU",GetChartID());
Plot(C,"C",colorBlack,styleBar);
b=BarIndex();
X1=ValueWhen(Cum(IsTrue(SU))==1,b);
Y1=ValueWhen(b==X1,SU);
X2=LastValue(b);
Y2=LastValue(SU);
SLOPE=(Y2-Y1)/(X2-X1);

Dist = LastValue(Highest(H-SU)); 
HL=  SU + Dist; Plot(HL,"",colorGreen,styleLine);
HL = SU +0.382*(DIST); Plot(HL,"\n0.382",colorRed,1);
HL = SU +0.500*(DIST); Plot(HL,"\n0.500",colorRed,1);
HL = SU +0.618*(DIST); Plot(HL,"\n0.618",colorRed,1);


GraphXSpace=2;







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/