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

RE: [amibroker] Need help with degrees from 0 AFL



PureBytes Links

Trading Reference Links

Gernot
The slope of a line is just the difference of 2 points. Because the charts
can be varied on the time scale (X-axis) the slope of the line will change.
Therefor without some sort of reference slope, it would be meaningless. I
suggest maybe you consider 1 price point per day. This will depend on the
point you use of course and may need to vary with the share price.
All that aside you could try this Price/bar as a basis
P1 = ref(EMA(C,4),-1);
P2 = (EMA(C,4),-1);
P3 = ref(EMA(C,9),-1);
P4 = (EMA(C,9),-1);
P5 = ref(EMA(C,20),-1);
P6 = (EMA(C,20),-1);
Slope1 = P2-P1;
Slope1 = P4-P3; 
Slope1 = P6-P5;

Title = Name()+" "+date()+" Slope of EMA4
="+writeval(selectedvalue(Slope1),1.3) +" Slope of EMA9
="+writeval(selectedvalue(Slope2),1.3) +" Slope of EMA20
="+writeval(selectedvalue(Slope3),1.3);

This is not tested, so check for type errors

Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia

-----Original Message-----
From: taotra [mailto:ggoll@xxxxxxxxxxxx] 
Sent: Thursday, 12 June 2003 1:40 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Need help with degrees from 0 AFL

Hello,

I'm using a triple EMA indicator:

Plot(EMA(C,4), "4-EMA", 1);
Plot(EMA(C,9), "9-EMA", 2);
Plot(EMA(C,20), "18-EMA", 4); 

I want to include in the title display of the indicator window the 
degrees from zero (angle) at any given point.  For example, if the 9-
EMA is rising at a 45 degree angle I want the window title to 
display it, same if the 4-EMA is dropping -25 degrees.

Any ideas?

Thanks,
Gernot



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/