Need standard error channel AFL for amibroker

#1
Need standard error channel AFL for amibroker software
bcoz in amibroker software only standard regression channel
but in meta stock both are toll available

it can be manual

so pls provide me thx
 
#2
Code:
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;

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 );
 
#3
thx dude for this afl
but i need manual standard error channel tool
min i want to plot this tool manual
previous high to current low then extend right same as opposite side
like as standard regression channel already in ami software
 

soumya_b

Active Member
#4
Regression channels

AmiBroker allows to draw easily 3 kinds of regression channels:

Raff regression channel
Standard error channel
Standard deviation channel
All these channels are based on linear regression trend line.

The Regression Channel is constructed by plotting two parallel, equidistant lines above and below a Linear Regression trendline. The distance between the channel lines to the regression line is the greatest distance that any one high or low price is from the regression line.

Standard Error Channels are constructed by plotting two parallel lines above and below a linear regression trendline. The lines are plotted a specified number of standard errors away from the linear regression trendline.

Standard Deviation Channels are constructed by plotting two parallel lines above and below a linear regression trendline. The lines are plotted a specified number of standard errors away from the linear regression trendline.

You can choose the type of channel by double clicking on the Regression channel study (or choosing Properties from right mouse button menu)
 
#6
thx dude for this afl
but i need manual standard error channel tool
min i want to plot this tool manual
previous high to current low then extend right same as opposite side
like as standard regression channel already in ami software

Then read the f*$!ng manual, dude.
 

Similar threads