hallo all, someone could tell me the explanation of @power function?
i cannot find any wiki..
thank you
@power
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: @power
Where do you find this @power function?hallo all, someone could tell me the explanation of @power function?
i cannot find any wiki..
thank you
Re: @power
hi TJ, I found it in Kaufman AMA:
you can see @AbsValue, @Summation, @Power...
as far i understood seems math expression that raise the number to the exponent:
http://www-01.ibm.com/support/knowledge ... POWER.html
Interesting is that MC have some command inside without any explanation in wiki page .
i think i solved anyway.
Code: Select all
[LegacyColorValue = TRUE];
inputs:period(10),price(c);
vars: noise(0),signal(0),difference(0),efratio(0),
smooth(1),fastend(.666),slowend(.0645),AMA(0);
{CALCULATE EFFICIENCY RATIO}
difference = @AbsValue(price - price[1]);
if(currentbar <= period) then AMA = price;
if(currentbar > period)then begin
signal = @AbsValue(price - price[period]);
noise = @Summation(difference,period);
efratio = signal/maxlist (noise,0.1);
smooth = @Power(efratio*(fastend - slowend) + slowend,2);
{ADAPTIVE MOVING AVERAGE}
ama=ama[1]+smooth*(price-ama[1]);
plot1(ama,"ama");
end;
as far i understood seems math expression that raise the number to the exponent:
http://www-01.ibm.com/support/knowledge ... POWER.html
Interesting is that MC have some command inside without any explanation in wiki page .
i think i solved anyway.
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: @power
waldem,
they are documented when you leave the "@" away - except the Summation, which is a function and therefore not included in the help. I am not sure why the reserved words are also working with an "@" in front, as this is not legacy EasyLanguage. So it's probably some idiosyncrasy of the PL Editor.
Regards,
ABC
they are documented when you leave the "@" away - except the Summation, which is a function and therefore not included in the help. I am not sure why the reserved words are also working with an "@" in front, as this is not legacy EasyLanguage. So it's probably some idiosyncrasy of the PL Editor.
Regards,
ABC
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: @power
This must be a very old code.hi TJ, I found it in Kaufman AMA:
you can see @AbsValue, @Summation, @Power...
as far i understood seems math expression that raise the number to the exponent:
http://www-01.ibm.com/support/knowledge ... POWER.html
Interesting is that MC have some command inside without any explanation in wiki page .
i think i solved anyway.
The @ prefix is a skip word.
This is a legacy tradition: Many years ago programmers attach the @ prefix in front of functions to distinguish them from keywords and variables.
(note: the old TS editor was not color coded, reading script was not as easy as today. Adding the @ prefix helps with the reading of the codes. It does not serve any other purposes.)
You can safely remove the @.