USDT (TRC20): TH29EEXa19vfwZNYvxdUuMxoFY5QDYLcWG
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
//////////////////////////////////////////////////////////// // Copyright by HPotter v1.0 03/07/2014 // Demarker is an indicator similar to DM+ developed by Welles Wilder. // The DM+ (a part of Directional Movement System which includes both // DM+ and DM- indicators) indicator helps determine if a security is // "trending." The differences between the indicators are in the somewhat // different calculation methods. //////////////////////////////////////////////////////////// study(title="Demarker", shorttitle="Demarker") Length = input(13, minval=1) nValue1 = sum(iff(high > high , high - high , 0), Length) nValue2 = sum(iff(low > low, 0,low - low), Length) nValue3 = sum(nValue1 + nValue2, Length) nVal1Avr = nValue1 / Length nVal2Avr = nValue3 / Length nRes = nVal1Avr / nVal2Avr plot(nRes, color=blue, title="Demarker")