Midas S/R Line

Updated: Use the updated version here :https://www.tradingview.com/v/UiJRZmpL/
Entering precise date and time is cumbersome. New version is much cleaner and simpler. Use Midas-Bar Number indicator to see the bar number.

Plots MIDAS S/R Line on daily and intraday charts using different price values. MIDAS Support Lines can be created using Low values as priceType and MIDAS Resistance Lines can be created using High values.Hour and minute input is not used on daily and higher Tf charts.
Remove from Favorite Scripts Add to Favorite Scripts
// Akif TOKUZ
// akifusenet@gmail.com
// MIDAS S/R  lines
study("Midas", overlay=true)

sy=input(title="starting year",minval=1980,maxval=2100,defval=2014)
sm=input(title="starting month",minval=1,maxval=12,defval=9)
sd=input(title="starting day of month",minval=1,maxval=31,defval=2)
shour=input(title="starting hour",minval=0,maxval=23,defval=10)
smin=input(title="starting hour",minval=0,maxval=59,defval=0)

priceType=input(title="calculate using 1:hl2 2:high 3:low 4:hlc3",minval=1,maxval=4,defval=1)

start1=iff( year == sy and month == sm and dayofmonth == sd,1,0)
start2=iff( year == sy and month == sm and dayofmonth == sd and hour==shour and minute==smin,1,0)
start = iff (isdwm,start1,start2)

p = iff (priceType==1,hl2,

v = na(volume) ? 1 : volume

cumV = cum(v)
CumPV = cum(p*v)

startV = valuewhen(start,cumV,0)
StartPV = valuewhen(start,CumPV,0)

midas = (CumPV-StartPV)/(cumV-startV)

plot(midas, color=navy,linewidth=2)

EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out