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

Re: [amibroker] X:Y Ration on a Chart



PureBytes Links

Trading Reference Links

It seems the calculations should not be affected by the xy scales. The visual screen certainly is affected greatly, but calculating the angle should not be an issue.
 
Slope = (Yend - Ystart) / (Xend - Xstart)   where X is the bar number
 
This should work OK in any zoom setting, but only in one time frame at a time.
 
Ara
----- Original Message -----
From: ozzyapeman
Sent: Friday, August 08, 2008 3:22 PM
Subject: [amibroker] X:Y Ration on a Chart

Hoping someone can help me figure out how to fix the X:Y plotting ratio on a chart.

For example, if I wanted to find the slope or angle formed by the line drawn through the Last Close to the Close of Five Bars Ago,  that slope or angle would be very different if I was zoomed into the chart or zoomed out.

How can I fix the Y scale against the X scale of a chart in my AFL and make it exact, for the purpose of calculating these angles? I checked the Users Guide and don't see any obvious parameter or option I can set.

Right now, this is what I have at the top of my AFL to plot the chart:

SetChartOptions(0,chartShowArrows|chartShowDates);

_N(Title = StrFormat("{{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
 
Plot( C, "Close", ParamColor("Color", colorBlack ), styleThick | ParamStyle("Style") | GetPriceStyle() );
__._,_.___

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

__,_._,___