TradingView
EsIstTurnt
2022年12月1日下午12點46分

Dynamic Highest Lowest Moving Average 

GOLD (US$/OZ)TVC

描述

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.

發布通知

Overlay = True

發布通知

Cleaned up, fix chart image

發布通知

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
評論
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.
更多