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

Re: [amibroker] Re: Regression Line Slope



PureBytes Links

Trading Reference Links

They work for all charts, including price charts. So it will work OK
as long as you use the code in the chart.

However if you run it from Automatic Analysis - it won't - as there is no "Y axis" in AA
and no chart dimensions because there is no chart.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "bilbo0211" <bilbod@xxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, December 16, 2007 2:35 AM
Subject: [amibroker] Re: Regression Line Slope


> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> wrote:
>>
>> If you want to see correspondence between what you see ON SCREEN -
> i.e. the "visual angle" (which is NOT constant)
>> you need to perform FACTOR calculations based on
>> a) PIXEL dimensions of chart window
>> b) number of bars currently displayed
>> c) Ymin/max range of Y axis
>> 
>> PixelFactor = Status("pxheight")/Status("pxwidth"); 
>> XYFactor =
> (Status("axismaxy")-Status("axisminy"))/(Status("lastvisiblebarindex")-Status("firstvisiblebarindex"));
> 
>> 
>> FACTOR = PixelFactor / XYFactor; 
>> 
>> ANGLE=atan(FACTOR*(Y1-Y0)/(X1-X0)); 
>>
> Hi Tomasz,
> 
> I am trying to use the slope of a regression line to indicate strength
> of trend. As you point out, when the chart gets rescaled, the slope
> changes so I cannot trust my eye to gauge the slope. 
> 
> The solution I came up with is similar to what you posted here. I
> tried to divide the regression line slope by what you call the
> XYFactor to come up with a reference number that won't change when the
> chart is rescaled.
> 
> I can't get past calculating your XYFactor because Status("axismaxy")
> and Status("axisminy") return zero for the price chart, apparently
> they only work correctly in indicator windows.
> 
> Is there a solution to this problem?
> 
> Bill
> 
> 
> 
> 
> 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
> 
> 
> 
> 
>


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/