R-square AFL Explain

#1
I FOUND FROM ONE BLOGE> anybody help please for how work this? >>>>>>>>>>>>>>>>1# If the slope is positive AND r-squared is above 0.80 then begins to
turn down, you may consider selling OR opening A Short position.

2# If the slope is Negative AND r-squared is above 0.80 then begins to
turn down, you may consider Buying OR opening A Long position.

3# If the slope is positive AND r-squared is below 0.20 then begins to
turn up, you may consider Buying OR opening A Long position.

4# If the slope is Negative AND r-squared is below 0.20 then begins to
turn up, you may consider selling OR opening A Short position. >> 1#.2#.3#.4# >this 4 lines how much slope values, can u tell me please? also this how can work>>> Number of Periods r-squared Critical Value

5 0.77

10 0.40

14 0.27

20 0.20

25 0.16

30 0.13

50 0.08

60 0.06

120 0.03
 
Last edited:
#2
that's quite a late reply, but still I guess it helps you. Here is the afl (checked and working with Amibroker 5.5 and does not refrence future quotes):

SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )),

ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 )));

_SECTION_BEGIN("R");


R2PDS=20; /*for automatic adjustments to the r2 critical value line use one of
the periods listed above*/

R2=Correlation(Cum( 1 ),C,r2pds)*Correlation(Cum( 1 ),C,r2pds);
slope=LinRegSlope(C,r2pds);

Crit=IIf(R2PDS==5,.77,IIf(R2PDS==10,.40,IIf(R2PDS==14,.27,IIf(R2PDS==20,.20,IIf(R2PDS==25,.16,IIf(R2PDS==30,.13,IIf(R2PDS==50,.08,IIf(R2PDS==60,.06,IIf(R2PDS==120,.03,0)))))))));

Plot(r2,"R Squared",2,1);
Plot(slope,"Slope",IIf(slope<0,4,5),2|styleOwnScale);
Plot(Crit,"",7,1);

Title=WriteIf(R2>Crit,"R2 Values indicate a Trend is in place","R2 Values
Indicate a Trendliess Market")+WriteIf(slope>0,"\n Slope is Positive","\n Slope
is Negative");

"\n \n Interpretation \n r-squared values show the percentage of movement that
can be explained by linear regression. for example, if the r-squared value over
20 days is at 70%, this means that 70% of the movement of the security is
explained by linear regression. The other 30% is unexplained Random noise.\n
while R2 values are interesting on their own they are easier to interpret when
used in conjunction with Slope. When R2 exceeds its critical Value this
indicates the market is Trending, when the indicator falls below its threshold
then a trend less condition may be in place. \n This table shows the values of
r-squared required for A 95% confidence level at various time periods. if the
r-squared value is less than the critical values shown, you should assume that
prices show no statistically significant trend. \n \n R-2 Pds Critical
Value(95%confidence)"+

"\n \n 5 0.77\n 10 0.40\n 14
0.27\n 20 0.20\n 25 0.16\n 30
0.13\n 50 0.08 \n 60 0.06 \n 120
0.03"

+"\n \n You may even consider opening a Short-term position opposite the
prevailing trend when you observe r-squared rounding off at extreme levels. for
example, if the slope is positive AND r-squared is above 0.80 then begins to
turn down, you may consider selling OR opening A Short position. There are
numerous ways to use the linear regression outputs of r-squared AND Slope in
trading systems. for more detailed coverage, refer to the book The New Technical
Trader by Tushar Chande AND Stanley Kroll";

_SECTION_END();
 
#3
klvenkatt bhaiya thanks for afl ,but i want to explan not afl please if u kind!!!!!
how do works/trade with this afl !!!!
 

Similar threads