Hi all,

I want to plot standar error channel using AFL. After googling, I found  
this: http://www.mail-archive.com/[email protected]/msg29588.html
The problem is there is no "width" parameter in that AFL as we can see in  
Study Drawing Tool.
Any idea how to implement "width"?

Here is my AFL based on msg29588 discussion:



TimeFrameSet( inDaily );
SetBarsRequired(100000,0);
periode = Param("Periode",30,30,50000,1);

bar = BarIndex();
islastbar = bar == BarCount - 1;
isfirstbar = bar == BarCount - periode;

firstbar = LastValue( ValueWhen( isfirstbar, bar ) );

lastbar = LastValue( ValueWhen( islastbar, bar ) );

al = LastValue( ValueWhen( islastbar, LinRegSlope( C, lastbar - firstbar +  
1
) ) );

bl = LastValue( ValueWhen( islastbar, LinRegIntercept( C, lastbar -  
firstbar
+ 1 ) ) );

Lr = al * ( BarIndex() - firstbar ) + bl;

Lr = IIf( bar >= firstbar AND bar <= lastbar , Lr, Null );

se = StdErr(C,lastbar - firstbar);

se = LastValue( ValueWhen( islastbar, StdErr( C, lastbar - firstbar + 1 ) )
);

upper = Lr + se;

Lower = Lr - se;
TimeFrameRestore();
Plot(Lr, "lr", colorYellow, styleThick );

Plot(upper, "upper", colorGreen, styleThick );

Plot(Lower, "lower", colorRed, styleThick );

SetBarFillColor( IIf( C > O, colorBrightGreen, colorRed ) );

Plot(C, "C", colorWhite, styleCandle );

-- 
Regards,

CK


------------------------------------

**** 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/

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> 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