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
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:

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Top