• Happy Independence Day! Take $40 off VIP Membership with code JULY4. Sign up here.

DeMarker Indicator for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
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.

If the indicator value is over 0.5, the period is suited for buying, if less - for selling. The farther is the value from 0.5, the stronger are the trend dynamics. If the value is within 0.5, the trend is either flattening or going to revert.

Source: https://www.multicharts.com/support/base/miscellaneous-gt-demarker/

DtjR0ks.png


thinkScript Code

Code:
# DeMarker Indicator
# Assembled by BenTen at useThinkScript.com
# BenTen also added 0.5 line to the script and removed paintbars
# Converted from https://www.tradingview.com/script/11QwfOay-DeMarker/

declare lower;

input per = 13;
input HV = .4;
input LV = .6;
input MD = .5;

def demax = if high>high[1] then high-high[1] else 0;  
def demin = if low<low[1] then low[1]-low else 0;
def demax_av = simpleMovingAvg(demax, per);
def demin_av = simpleMovingAvg(demin, per);
def dmark = demax_av / (demax_av + demin_av);

plot DeMarker = dmark;
plot upper_line = LV;
plot lower_line = HV;
plot middle = MD;
 
Last edited:

borntostun

New member
Lifetime
Do you think it would be possible to code into Demarker 1 his concept of Excessive Duration Zones?


“The ideal condition for a meaningful reversal is when an excessively oversold zone, then return to the neutral zone, followed by a mild return into the oversold zone (less than 13 price bars in this zone). When this behavior is concurrent with a longer-term indicator like Sequential or Combo this will enhance the probability of a meaningful reversal.”
 

mbarcala

Active member
VIP
This another DeMarker Indicator from TradingView converted to TOS. Enjoy!
Original TradingView Link: https://www.tradingview.com/script/6IfZOozU-ETS-DeMarker-Reversals/

Upper indicator: https://usethinkscript.com/threads/break-keltner-bands-bkb-for-thinkorswim.11220/


script
Code:
# DeMarker Reversals converted to TOS by mbarcala
# link: https://www.tradingview.com/script/6IfZOozU-ETS-DeMarker-Reversals/
#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// © EasyTradingSignals

#//@version=4
#study(title="ETS DeMarker Reversals", shorttitle="ETS DM Reversals")
#//Thanks to scarf's "DeMarker with Highlights" which this is based on

declare lower;

input length = 20;

def demax = (high > high[1]) + (high - high[1]);
def demin = (low < low[1]) + (low[1] - low);

def demax_av = ExpAverage(demax, length);
def demin_av = ExpAverage(demin, length);

plot dmark = ExpAverage(demax_av / (demax_av + demin_av) * 100, 3);
dmark.SetDefaultColor(Color.YELLOW);
dmark.SetLineWeight(2);

plot ml = 50;
ml.SetStyle(Curve.SHORT_DASH);
ml.SetDefaultColor(Color.GRAY);
ml.SetLineWeight(2);

plot hm = 75;
hm.SetStyle(Curve.SHORT_DASH);
hm.SetDefaultColor(Color.DARK_GRAY);
hm.SetLineWeight(1);

plot lm = 25;
lm.SetStyle(Curve.SHORT_DASH);
lm.SetDefaultColor(Color.DARK_GRAY);
lm.SetLineWeight(1);

plot h1 = 55;
h1.SetStyle(Curve.SHORT_DASH);
h1.SetDefaultColor(Color.DARK_GRAY);
h1.SetLineWeight(1);

plot h2 = 45;
h2.SetStyle(Curve.SHORT_DASH);
h2.SetDefaultColor(Color.DARK_GRAY);
h2.SetLineWeight(1);

AddCloud(dmark, hm, Color.RED, CreateColor(27, 27, 27));
AddCloud(dmark, lm, CreateColor(27, 27, 27), Color.GREEN);
 
Last edited by a moderator:

cswu1211

Member
VIP
This another DeMarker Indicator from TradingView converted to TOS. Enjoy!
Original TradingView Link: https://www.tradingview.com/script/6IfZOozU-ETS-DeMarker-Reversals/

Photo


script
Code:
# DeMarker Reversals converted to TOS by mbarcala
# link: https://www.tradingview.com/script/6IfZOozU-ETS-DeMarker-Reversals/
#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// © EasyTradingSignals

#//@version=4
#study(title="ETS DeMarker Reversals", shorttitle="ETS DM Reversals")
#//Thanks to scarf's "DeMarker with Highlights" which this is based on

declare lower;

input length = 20;

def demax = (high > high[1]) + (high - high[1]);
def demin = (low < low[1]) + (low[1] - low);

def demax_av = ExpAverage(demax, length);
def demin_av = ExpAverage(demin, length);

plot dmark = ExpAverage(demax_av / (demax_av + demin_av) * 100, 3);
dmark.SetDefaultColor(Color.YELLOW);
dmark.SetLineWeight(2);

plot ml = 50;
ml.SetStyle(Curve.SHORT_DASH);
ml.SetDefaultColor(Color.GRAY);
ml.SetLineWeight(2);

plot hm = 75;
hm.SetStyle(Curve.SHORT_DASH);
hm.SetDefaultColor(Color.DARK_GRAY);
hm.SetLineWeight(1);

plot lm = 25;
lm.SetStyle(Curve.SHORT_DASH);
lm.SetDefaultColor(Color.DARK_GRAY);
lm.SetLineWeight(1);

plot h1 = 55;
h1.SetStyle(Curve.SHORT_DASH);
h1.SetDefaultColor(Color.DARK_GRAY);
h1.SetLineWeight(1);

plot h2 = 45;
h2.SetStyle(Curve.SHORT_DASH);
h2.SetDefaultColor(Color.DARK_GRAY);
h2.SetLineWeight(1);

AddCloud(dmark, hm, Color.RED, CreateColor(27, 27, 27));
AddCloud(dmark, lm, CreateColor(27, 27, 27), Color.GREEN);
Could I ask what is the study that you have on the upper chart?!
 

Similar threads

Top