PasqualeAntonino

DeMarker indicator

32121 views
7754
Calculate and plot the Demarker indicator
Open-source script

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.

Want to use this script on a chart?
study("DeMarker")
per=input(title="Period",type=integer,defval=13)
demax=high>high[1] ? high-high[1] : 0   
demin=low<low[1] ? low[1]-low : 0
demax_av=sma(demax,per)
demin_av=sma(demin,per)
dmark=demax_av/(demax_av+demin_av)
h1=hline(0.3)
h2=hline(0.7)
fill(h1,h2,color=blue)
plot(dmark)

Comments

What does this stand for?
demax=high>high ? high-high : 0
especially the high-high part
+20 Reply
RogerJBos trader010
@trader010, high > high means if the current high is greater than the previous high (high means previous high) the whole line is an if else statement. if there is a new high, demax will equal the new high minus the previous high (high - high) otherwise demax will equal zero.
Reply
Can someone help on how to interpret this?
+19 Reply
can i install it to ma MT4?
+14 Reply
thx , it works
+6 Reply
this is off and not calculating correctly
Reply
nicely done thx.
Antonino can you add to this one the TD lines ?
Thx.
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out