AkifTokuz

Midas

487 1 62
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
United States
United Kingdom
India
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
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
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out