TradingView
EsIstTurnt
1 dic 2022 12:46

Dynamic Highest Lowest Moving Average 

GOLD (US$/OZ)TVC

Descrizione

Similar to my last script, although this one uses the RSI value of
(highest high - price) / (price - lowest low)
to feed into the the logic creating the dynamic length. Choose how the length curve works by selecting either Incline, Decline, Peak or Trough.
Lastly select the moving average type to filter the result through to smoothen things out a bit
to find something that works for your strategy. This is useful as an entry/exit indicator along with other moving averages, or even just a standalone if you play with the settings enough.

Note di rilascio

Overlay = True

Note di rilascio

Cleaned up, fix chart image

Note di rilascio

Added more thorough explanation of how we arrive at the average.
Added ability to change the coeficcient, in how different each step up/down will be
Added option to include the current, or former price in the averaging of the highest/lowest values
Commenti
Omni-Trading
I looks behind.. Shouldnt the curve be over the top bar? why is it lagged?
EsIstTurnt
@OmniTekTrading, Lag is most likely due to the inherent nature of moving averages, but could be mitigated by shortening the "smoothlen" and/or "maxHigh" and "maxLow" parameters.
Altro