32121 views
Calculate and plot the Demarker indicator
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
demax=high>high ? high-high : 0
especially the high-high part
Antonino can you add to this one the TD lines ?
Thx.