The ability to detect a divergence between the price and an indicator is really a powerful one. I personally have noted many situations where divergences results in good trades (It does fail from time to time as well). It would be good to have a divergence detector as a generic component that takes in a Source and an Indicator and detects bullish, bearish, hidden bullish and hidden bearish divergences. Example: https://www.tradingview.com/script/sxZRzQzQ-Divergence-Indicator-any-oscillator/
Can you provide some simple example on rust/go/python/c/js? TV scripts is not so easy to read. For now I don't understand what it should be.
It is also better to give some mathematical information about.
The ability to detect a divergence between the price and an indicator is really a powerful one. I personally have noted many situations where divergences results in good trades (It does fail from time to time as well). It would be good to have a divergence detector as a generic component that takes in a
Source
and anIndicator
and detects bullish, bearish, hidden bullish and hidden bearish divergences. Example: https://www.tradingview.com/script/sxZRzQzQ-Divergence-Indicator-any-oscillator/