mladen: antisyzygy
I am aware that the current bar calculation does not use those kind of values but as soon as the current bar becomes a "past" bar, it is recalculated and it then uses those future values it had no way to know about. For a comparison, the lower on the picture is the one that does not use any of the future bars (so that is what it is in run-time) but uses the calculation you use for the current bar.

As you can see, difference is significant, and if one uses the zero crosses of the current (or even the first 2 closed bars) as signals, number of false signals is going to be significant

regards

mladen

Thanks for the input. I am going to change it. I thought that perhaps it would be beneficial to use a more accurate calculation, but maybe I should stick to the backward difference method for all bars since it will make the indicator consistent.

yuhu: I think this version would not repaint.
The repainting was caused by the 'minus' ( - ) sign in 'shift-1', which mean the future bar.

Thank you. I believe it works pretty well now. The next step is to use a shorter timeframe, i.e. calculate the derivative on a smoothed 30 minute for use on a 1 hour chart. Maybe we could use some sort of function that approximates the price.

Ok. Now, apparently my way of differentiation is the correct way to do things since we are basically calculating the derivative at endpoints. It has error but what indicator doesnt with the price action being so choppy? We are only interested in the crossings and value of the second derivative, and we dont really need their exact values. We only need their magnitudes relative to eachother to be intact, which I believe they are. I am looking into methods to calculate the derivative at lower timeframes and then use it at higher timeframes. I want to do this in order to smooth out the derivative rather than have such a jagged graph.

mladen:antisyzygy I am aware that the current bar calculation does not use those kind of values but as soon as the current bar becomes a "past" bar, it is recalculated and it then uses those future values it had no way to know about. For a comparison, the lower on the picture is the one that does not use any of the future bars (so that is what it is in run-time) but uses the calculation you use for the current bar. As you can see, difference is significant, and if one uses the zero crosses of the current (or even the first 2 closed bars) as signals, number of false signals is going to be significant

regards

mladenThanks for the input. I am going to change it. I thought that perhaps it would be beneficial to use a more accurate calculation, but maybe I should stick to the backward difference method for all bars since it will make the indicator consistent.

New Differential indicator is attached. Could someone help me make it not repaint?

I will be working on a better differential quadrature rule for the second derivative, but for now it should be a much more consistent indicator.

Its now O(h^2) error instead of O(h^4).

Files:antisyzygy:New Differential indicator is attached. Could someone help me make it not repaint?

I will be working on a better differential quadrature rule for the second derivative, but for now it should be a much more consistent indicator.

Its now O(h^2) error instead of O(h^4).I think this version would not repaint.

The repainting was caused by the 'minus' ( - ) sign in 'shift-1', which mean the future bar.

yuhu:I think this version would not repaint. The repainting was caused by the 'minus' ( - ) sign in 'shift-1', which mean the future bar.

Thank you. I believe it works pretty well now. The next step is to use a shorter timeframe, i.e. calculate the derivative on a smoothed 30 minute for use on a 1 hour chart. Maybe we could use some sort of function that approximates the price.

...

ValeoFX,

You are right about the cause : zero lag is faster than the default ema that is used in MACD and the difference comes from that fact.

antisyzygy,

Yuhu is right, there will be no "repainting" in the last one you posted So now all you have to do is to work even harder

homestudy,

Will be made very soon

Alert

antisyzygy:New Differential indicator is attached. Could someone help me make it not repaint?

I will be working on a better differential quadrature rule for the second derivative, but for now it should be a much more consistent indicator.

Its now O(h^2) error instead of O(h^4).Great indicator antisyzugy. Could someone add signals/alerts according the maximum/minimum rules for improved backtesting?

heikobaer:Great indicator antisyzugy. Could someone add signals/alerts according the maximum/minimum rules for improved backtesting?

Here's the alert!

Files:Ok. Now, apparently my way of differentiation is the correct way to do things since we are basically calculating the derivative at endpoints. It has error but what indicator doesnt with the price action being so choppy? We are only interested in the crossings and value of the second derivative, and we dont really need their exact values. We only need their magnitudes relative to eachother to be intact, which I believe they are. I am looking into methods to calculate the derivative at lower timeframes and then use it at higher timeframes. I want to do this in order to smooth out the derivative rather than have such a jagged graph.

Dear mladen and all those interested,

I was looking for a good ADX indicator that would show me trend strength nicely and found ADX_Filters_sBars fits the profile.

However, when comparing to Wider's DMI book, which uses the original calcs, I do see some discrepancies in its behaviour.

Can someone check and if possible replace the DMI cals in the sBars indicator so that it uses the "correct" Wilders DMI...? That would be fantastic.

Or if someone has any other ideas, please let me know.

What I particularly appreciate about the sBars version is that it shows visually if trend (strength) is:

- increasing (ADX rising = green dots)

- slowing down (ADX dropping = purple area)

- or choppy (yellow dots - no trading).

Files:...

San,

Here you go It needs the "Wilder's DMI book" from your post in order to work

Files: