Yousufkhodja Sultonov: Give this example with the MA-scheme. Keep working with it and we'll try something else.
I don't work with her, MA. Not for a long time now. So, try the derivative of MA - there are three lines of code. Can be the difference of 2 MAs - I forget what it's called, I think it's a standard one.
in your calculation table, the period equals the sequence number
increases by 1 each time ???
this point is not clear
How many you take the number of last history bars to calculate, this will be the period. My table uses all the data, so the period is 47 (for the last point). For previous points, you are correct, the period is decreased or increased by 1. The period issue can be solved by analogy with MA calculation.
or should the calculation be done in reverse order ?
first bar equal to period and so on to zero bar ?
For example, we want to get an indicator with period of 20. We take 20 price values from the current time to the depth of the history and get one point. We obtain the previous point from 20 bars, ignoring the last bar. Thus, we draw a continuous line of the indicator deep into the history data. By changing the period, we obtain different, distant from each other, lines. Is it clear now?
Yousufkhodja Sultonov: Can a variant for MT4 be made?
MT5 is a great thing to work with, with more features than MT4. And frankly I'm too lazy to remake it on MT4. Or you cannot run the indicator on MT5 and analyse in it?
or should the calculation be done in reverse order ?
first bar equal to period and so on to zero bar ?
similar to ma
The K values turned out to be negative - it shouldn't be like that, K is always a positive value, according to Cauchy's theorem. Also, the values themselves are too large. Check the calculations, please, using test (table of first post).
Is it?
Even looked at it again.
Zy A derivative from MA would have given the same thing. Even still predicted the direction as well).
Can't see anything, except what you can see without indicators.
M1 period. It's written in the left corner).
Give this example with the MA-scheme. Keep working with it and we'll try something else.
I am attaching the requested indicator.
It is based on Custom Moving Average from the folder with examples of indicators.
SMA calculation function without changes.
GMA is calculated in a separate function.
At the end we calculate their difference.
in your calculation table, the period equals the sequence number
increases by 1 each time ???
this point is not clear
How many of the last bars of history you take to calculate is the period. My table uses all the data, so the period is 47.
for bar zero will be period 1
for bar one period 2
for the second 3
.......
for n it will be n+1
?
or should the calculation be done in reverse order ?
first bar equal to period and so on to zero bar ?
similar to ma
for bar zero will be period 1
for bar one period 2
for the second 3
.......
for n it will be n+1
?
or should the calculation be done in reverse order ?
first bar equal to period and so on to zero bar ?
Can a variant for MT4 be made?
Or you cannot run the indicator on MT5 and analyse in it?
for bar zero will be period 1
for bar one period 2
for the second 3
.......
for n it will be n+1
?
or should the calculation be done in reverse order ?
first bar equal to period and so on to zero bar ?
similar to ma