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

Re: [amibroker] Re: Question on R2 indicator



PureBytes Links

Trading Reference Links

To understand what is happening I suggest that you walk through the code line by line and be certain that you understand what each line is doing.  You will find the Users Guide and Help quite helpful for this exercise.
 
To answer your specific question, the red line at -1.066 is the slope of the linear regression line (not plotted - see codes in library if you want to plot) for C over a period of 20 using the syntax found here:  http://www.amibroker.com/guide/afl/afl_view.php?id=84.  Each red/green line is the slope of LRLine(C) over the previous 20 periods.  The y-axis scale for the red/green lines is controlled by styleownscale, rather than the scaling shown for r^2:  http://www.amibroker.com/guide/afl/afl_view.php?id=114
 
Bill
 
----- Original Message -----
From: droskill
Sent: Sunday, July 20, 2008 8:04 PM
Subject: [amibroker] Re: Question on R2 indicator

Sorry - service was down - now back up.

--- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <timesarrow@xxx> wrote:
>
> no picture at link
>   ----- Original Message -----
>   From: droskill
>   To: amibroker@xxxxxxxxxxxxxxx
>   Sent: Sunday, July 20, 2008 5:44 PM
>   Subject: [amibroker] Re: Question on R2 indicator
>
>
>   A picture is worth about $10 - less with inflation but there you go -
>   hopefully this will help in understanding what I'm saying.
>
>   http://dl.getdropbox.com/u/17693/Redline.png
>
>   Thanks!
>
>   --- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <timesarrow@> wrote:
>   >
>   > If it is not the slope how do you interpret
>   "slope=LinRegSlope(C,r2pds);" in the code?
>   >
>   >   ----- Original Message -----
>   >   From: droskill
>   >   To: amibroker@xxxxxxxxxxxxxxx
>   >   Sent: Sunday, July 20, 2008 3:53 PM
>   >   Subject: [amibroker] Re: Question on R2 indicator
>   >
>   >
>   >   Yup - see that - but then what is the value of the Green or
Red?  It's
>   >   not the slope or the R2....
>   >
>   >   --- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <timesarrow@>
wrote:
>   >   >
>   >   > If you are setup as I am then Value is simply the value of the
>   >   cursor on the y-axis scale.
>   >   >
>   >   > Bill
>   >   >   ----- Original Message -----
>   >   >   From: droskill
>   >   >   To: amibroker@xxxxxxxxxxxxxxx
>   >   >   Sent: Sunday, July 20, 2008 1:06 PM
>   >   >   Subject: [amibroker] Re: Question on R2 indicator
>   >   >
>   >   >
>   >   >   Looking at the graph, there is the actual colored graph of
>   green and
>   >   >   red.  When you mouse over the chart at any point in time,
>   you'll see
>   >   >   that there are three parameters:
>   >   >
>   >   >   Value
>   >   >   R-Squared
>   >   >   Slope
>   >   >
>   >   >   The chart appears to be showing the value, but it does not
>   appear in
>   >   >   the upper left-hand corner of the indicator window - just
>   R-Squared
>   >   >   and Slope.
>   >   >
>   >   >   So where is the Value coming from that actually appears on the
>   chart?
>   >   >
>   >   >   In terms of whether it's worth considering - I'm still playing
>   around
>   >   >   with it.  If I can get the value parameter, then I can
>   backtest to see
>   >   >   if holds any merit.
>   >   >
>   >   >   Thanks for responding!
>   >   >
>   >   >   --- In amibroker@xxxxxxxxxxxxxxx, "Joe Landry" <jelandry@>
wrote:
>   >   >   >
>   >   >   > Are you referring to your variable R2 that you can't see?
>   Then I'll
>   >   >   bet your chart background is white.   Try this.  As I move the
>   cursor
>   >   >   it selects the value displays it in my title area.  Or you can
>   use the
>   >   >   function in a title statement selectedvalue( ARRAY )
>   >   >   > Hope this helps JOE
>   >   >   >
>   >   >   > BY THE WAY, is this indicator worth considering?
>   >   >   >
>   >   >   > Plot(r2,"R Squared",colorBlack,1);
>   >   >   >
>   >   >   > Plot(slope,"Slope",IIf(slope<0,4,5),2|styleOwnScale);
>   >   >   >
>   >   >   > Plot(Crit,"",7,1);
>   >   >   >
>   >   >   >
>   >   >   >   ----- Original Message -----
>   >   >   >   From: droskill
>   >   >   >   To: amibroker@xxxxxxxxxxxxxxx
>   >   >   >   Sent: Sunday, July 20, 2008 10:16 AM
>   >   >   >   Subject: [amibroker] Question on R2 indicator
>   >   >   >
>   >   >   >
>   >   >   >   A quick question for the group. There is an indicator
in the
>   >   library
>   >   >   >   called R2 - it displays a graph - but the value of the
actual
>   >   graph is
>   >   >   >   not shown on the chart - I'd like to show it but can't
figure
>   >   out how
>   >   >   >   to do it - the code is below - any thoughts appreciated:
>   >   >   >
>   >   >   >   R2PDS=30; /*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);
>   >   >   >
>   >   >   >   Thanks!
>   >   >   >
>   >   >
>   >   >
>   >   >
>   >   >   ------------------------------------
>   >   >
>   >   >   Please note that this group is for discussion between
users only.
>   >   >
>   >   >   To get support from AmiBroker please send an e-mail
directly to
>   >   >   SUPPORT {at} amibroker.com
>   >   >
>   >   >   For NEW RELEASE ANNOUNCEMENTS and other news always check
DEVLOG:
>   >   >   http://www.amibroker.com/devlog/
>   >   >
>   >   >   For other support material please check also:
>   >   >   http://www.amibroker.com/support.html
>   >   >   Yahoo! Groups Links
>   >   >
>   >   >
>   >   >
>   >   >
>   >   >   No virus found in this incoming message.
>   >   >   Checked by AVG - http://www.avg.com
>   >   >   Version: 8.0.138 / Virus Database: 270.5.3/1563 - Release
Date:
>   >   7/20/2008 12:59 PM
>   >   >
>   >
>   >
>   >
>   >   ------------------------------------
>   >
>   >   Please note that this group is for discussion between users only.
>   >
>   >   To get support from AmiBroker please send an e-mail directly to
>   >   SUPPORT {at} amibroker.com
>   >
>   >   For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>   >   http://www.amibroker.com/devlog/
>   >
>   >   For other support material please check also:
>   >   http://www.amibroker.com/support.html
>   >   Yahoo! Groups Links
>   >
>   >
>   >
>   >
>   >   No virus found in this incoming message.
>   >   Checked by AVG - http://www.avg.com
>   >   Version: 8.0.138 / Virus Database: 270.5.3/1563 - Release Date:
>   7/20/2008 12:59 PM
>   >
>
>
>
>   ------------------------------------
>
>   Please note that this group is for discussion between users only.
>
>   To get support from AmiBroker please send an e-mail directly to
>   SUPPORT {at} amibroker.com
>
>   For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>   http://www.amibroker.com/devlog/
>
>   For other support material please check also:
>   http://www.amibroker.com/support.html
>   Yahoo! Groups Links
>
>
>
>
>   No virus found in this incoming message.
>   Checked by AVG - http://www.avg.com
>   Version: 8.0.138 / Virus Database: 270.5.3/1563 - Release Date:
7/20/2008 12:59 PM
>



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

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html
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:amibroker-digest@xxxxxxxxxxxxxxx
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.5.3/1563 - Release Date: 7/20/2008 12:59 PM


__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html




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

__,_._,___