Attachments forums

List of attachments posted on this forum.


All files on forums: 159918

Re: MT4 Indicator requests and ideas

太虚一毫, Thu Oct 09, 2025 8:16 pm

mrtools wrote: Fri Sep 26, 2025 8:10 am Hello , kept going around and round with this indicator because of the way the atr minimum and maximum was being done, finally dawned on me this is exactly the same problem as the step stochastic which Mladen fixed. This was his explanation

Since I first saw it, I have always liked the idea of a step stochastic. But every single version I have seen had two very serious flaws:

minimum and maximum average true range are inherited from a previous bar

and thus it makes it depend on the number of bars used in calculations. The rest of the calculations depends on that "inherited" value, and, since with time the minimum and the maximum are just getting bigger (maximum) and smaller (minimum), the "step quality" of the step stochastic is simply lost when big enough number of bars pass. So the step stochastic becomes deformed and is not a "step" stochastic any more on newest bars.

This one solves those issues. The idea is simple — instead of inheriting previous state of ATR minimum and maximums, the minimum and maximum are cheсked in a "Window" number of past bars. That way it is not deformed and is reacting to latest data fairly good. Compared to the "old" ones you will notice that at the beginning they have the same values (since the "old" still did not "deform") but as time passes the differences grow bigger and bigger. That is the effect of not inheriting and in the end of not repainting.

So anyway, used the fixed step stochastic code to make a new non-repainting version. The results are different so posting it here to see if you still want to do the modifications you requested.
There are two algorithms in ! StepMA 3D.mq4: atr_Rng and atr_Atr. The atr_Rng algorithm is ! StepMA_3D_v3.01.mq4. However, in the ! StepMA 3D.mq4 indicator, when atr_Rng is selected, the display effect on the chart is noticeably different from ! StepMA_3D_v3.01.mq4. Could you have a look at ! StepMA 3D.mq4 when you have time to see if it is correct?
All files in topic