AkifTokuz

Midas

438 1 58
Draws MIDAS S/R lines from given starting bar. To be able to determine the bar-number of starting bar, use Midas-BarNumber indicator.
Remove from Favorite Scripts Add to Favorite Scripts
// Akif TOKUZ
// akifusenet@gmail.com
// MIDAS S/R  lines

study("Midas", overlay=true)

startBar=input(title="Starting Bar Number",minval=1,maxval=100000,defval=20)
priceType=input(title="calculate using 1:hl2 2:high 3:low 4:hlc3",minval=1,maxval=4,defval=1)


start = (n==startBar-1)

p = iff (priceType==1,hl2,
            iff(priceType==2,high,
                iff(priceType==3,low,hlc3)
            )
        )


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)

Great indicator, I know from prior use!
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out