Hello,
This oscillator is a great one, but I have problems with it.
The signal line's end, wich is calculated by the last candle is not shown, so it always shows red at the present time. When I reset the oscillator it shows good values for a moment with the end of the signal line, but then switches back to red, (even if it has to show green).
What should i do to eliminate this problem?
I've tried to re-debug it but it didn't help.
Greets,
InfiniteDesign
Admin
20504
Center of Gravity J. F. Ehlers:
Center of Gravity actually has a zero lag and allows to define turning points precisely. This indicator is the result of Ehler's study of adaptive filters.
The indicator Center of Gravity allows to identify main pivot points almost without any lag.
The idea of calculating a center of gravity appeared from the investigation of lags of different filters with the finite impulse response (FIR) in accordance with the relative amplitude of filter coefficients. SMA (Simple Moving Average) is a FIR-filter, in which all coefficients have one and the same value. As a result the center of gravity of SMA is an exact center of the filter. WMA (Weighted Moving Average) is a FIR-filter, in which the last price change is weighted through the filter length, and so on.
The values of weighting are coefficients of filters. Coefficients of WMA filters can be presented as contours of a triangle. The center of gravity is on the 1/3 of the triangle base length. Thus WMA gravity center is shifted to the right with respect to the center of gravitation of SMA of the same length, which gives us a smaller lag. For all examples with FIR filters the sum of productions of coefficients and the price must be divided by the sum of coefficients for preservation of original prices.
Author: Nikolay Kositsin