OPEN-SOURCE SCRIPT

Moving Average Testing

143
Pine Script®
Mode(modeSwitch, src, len) => modeSwitch == 'Hma' ? ta.hma(src, len) : modeSwitch == 'Ehma' ? ma.EHMA(src, len) : modeSwitch == 'Thma' ? THMA(src, len / 2) : modeSwitch == 'SMA' ? ta.sma(src, len) : modeSwitch == 'Ema' ? ta.ema(src, len) : modeSwitch == 'Wma' ? ta.wma(src, len) : modeSwitch == 'Tema' ? ta.tema(src, len) : modeSwitch == 'Vwma' ? ta.vwma(src, len) : modeSwitch == 'T3' ? ma.t3(src, len) : modeSwitch == 'DEMA' ? ta.dema(src, len) : modeSwitch == 'TEMA' ? ta.tema(src, len) : na


Moving Average Testing
ma>ma[1] conditions

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.