Author's dialogue. Alexander Smirnov. - page 33

 
Well yes, Candid, the native iMA () is hardly calculated recursively. All without taking into account the preceding values, by a straightforward formula.
 
Mathemat:
Well yes, Candid, the native iMA () is hardly calculated recursively. All from scratch, by a direct formula.
No, iMA() is even faster than direct implementation in MQL. Nothing prevents counting recurrently, just the same code can be written in C and compiled together with terminal.

P.S. I just needed to write the numbers in a different order.
 
Ah, there it is. Sorry, misunderstood you.
 
to Mathemat
Cleaned indices. M_qRMA requires a compiled M_qWMA
P.S. I have some doubts about the consistency of the six. Maybe it's easier to cycle the calculation as it happens? (see f-la in the comments)
Files:
m_qrma.mq4  3 kb
 
I'm surprised at the window, Someone's not catching two files at a time,
Files:
m_qwma.mq4  3 kb
 
Mathemat:
Ah, there it is. Sorry, misunderstood you.
You could have disavowed the paranoid thing, too :)
 
Mathemat:

What is HMA, pisara?

P.S. Found it: 'HMA'. What's the idea behind it?

HullMA formula, standard LWMA method:

halvedLength:= = if((ceiling(length/2) - (length/2) <= 0.5), ceiling(length/2), floor(length/2));
sqrRootLength:= if((ceiling(sqrt(length) - sqrt(length) <= 0.5), ceiling(sqrt(length)), floor(sqrt(length));
Value1:= 2 * mov(price,length,method);
Value2:= mov(price,length,method);
HMA:= mov((Value1-Value2),sqrRootLength,method);

here is a variant without colours
Files:
hma.mq4  4 kb
 
lna01 писал (а): You could have disavowed the paranoid thing, too :)

Okay, I'm disavowing it. You're not paranoid. It's a normal measure to ensure the purity of the experiment.

2 Korey: the six is absolutely correct, if everything is counted accurately. It results from the summation of the squares of natural 1 to N. The sum is N(N+1)(2N+1)/6. Direct software summation will give the same result, just a bit longer.

You calculate the normalizing k-value incorrectly, you don't need to subtract one from the sum there. And you have a formula which is commented out wrong: not

k=1./( N*(N+1)*(2*(N+1)) );

а

k=6./( N*(N+1)*(2*N+1) );
 
Mathemat, how do you calculate the RMS in your approach?
 
Through the muwings? :)
Reason: