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

Re: [amibroker] HELP: Fractals are not Plotting



PureBytes Links

Trading Reference Links



All those IIF are not needed at all, because boolean conditions result in 1 or 0 results by themselves:
 
So you can REMOVE all those IIFs.
 
FD1 = H > Ref(H,2) AND H > Ref(H,1) AND H > Ref(H,-1) AND H > Ref(H,-2));
FD2 = H < Ref(H, 3 ) AND FD1;
FD3 = H < Ref(H, 4 ) AND FD2;
 
BTW: You are aware that your code looks into the future, aren't you?

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Sunday, April 26, 2009 9:20 AM
Subject: Re: [amibroker] HELP: Fractals are not Plotting

WOW! To the Simplicity of the AFL!!
Thank you very much, sir.

Sent: Sunday, April 26, 2009 3:10 AM
Subject: Re: [amibroker] HELP: Fractals are not Plotting



Change your definitions as follows:
 
fd1 = iif( .... , 1, 0);
fd2 = iif( h > ref(h, 3) and fd1, 1, 0);
fd2 = iif( h > ref(h, 4) and fd2, 1, 0);
 
and the same for fu1, fu2, and fu3
 
Then it will plot OK
----- Original Message -----
Sent: April 25, 2009 5:55 PM
Subject: [amibroker] HELP: Fractals are not Plotting

Can someone please help with the following code. I am not getting the fractal shapes to plot.
THanks in advance.
 

COLOR = IIf(C > O, colorGreen, colorRed);

//SetChartOptions(0,chartShowDates|chartShowArrows|chartLogarithmic|chartWrapTitle);

_N( Title = StrFormat( "{{NAME}} - " + SectorID( 1 ) + " - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " + WriteVal( V, 1.0 ) + " {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );

Plot( C, "Close", Color, styleBar | styleThick | styleNoTitle );

 

_SECTION_BEGIN("F");

//SetBarsRequired(200,0);

FD1 = IIf((H > Ref(H,2) AND H > Ref(H,1) AND H > Ref(H,-1) AND H > Ref(H,-2)),1,0);

FD2 = IIf((H > Ref(H,3) AND H > Ref(H,2) AND H=Ref(H,1) AND H > Ref(H,-1) AND H > Ref(H,-2)),1,0);

FD3 = IIf((H > Ref(H,4) AND H > Ref(H,3) AND H=Ref(H,2) AND H >= Ref(H,1) AND H > Ref(H,-1) AND H > Ref(H,-2)),1,0);

 

FU1 = IIf((L < Ref(L,2) AND L < Ref(L,1) AND L < Ref(L,-1) AND L < Ref(L,-2)),1,0);

FU2 = IIf((L < Ref(L,3) AND L < Ref(L,2) AND L = Ref(L,1) AND L < Ref(L,-1) AND L < Ref(L,-2)),1,0);

FU3 = IIf((L < Ref(L,4) AND L < Ref(L,3) AND L = Ref(L,2) AND L <= Ref(L,1) AND L < Ref(L,-1) AND L < Ref(L,-2)),1,0);

 

PlotShapes( IIf(FD1 OR FD2 OR FD3, shapeSmallCircle,0) , colorOrange,0,H,10);

PlotShapes( IIf(FU1 OR FU2 OR FU3, shapeSmallCircle,0) , colorLime,0,L,-10);

_SECTION_END();



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___