if anybody know how and of course it doesnt take too much time, can you translate these codes into TS2 please?
- Code: Select all
study("Dynamic S&R",overlay=true)
length = input(100,"Number of bars back")
hhigh = highest(high,length)
chigh = highest(close,length)
llow = lowest(low,length)
clow = lowest(close,length)
mhl = (hhigh+llow)/2
mc = (chigh+clow)/2
phh = plot(hhigh, 'hHigh',color=blue)
pch = plot(chigh, 'cHigh',color=blue)
fill(phh,pch,blue)
pmhl = plot(mhl, 'mHL',color=black)
pmc = plot(mc, 'mMC',color=black)
fill(pmhl,pmc,black)
pll = plot(llow, 'lLow',color=purple)
pcl = plot(clow, 'cLow',color=purple)
fill(pll,pcl,purple)
- Code: Select all
study(title = "Dunnigan Bars", overlay = true)
colr = iff(high > high[1] and low > low[1], green,
iff(high < high[1] and low < low[1], red,
iff(high < high[1] and low > low[1], black,
iff(high > high[1] and low < low[1], yellow, na))))
barcolor(colr)
In this code is little issue... when theres same High or Low it shows like inside candle... could there be different colour of bars for this? If same high and Low and if same low and HH, so two new possiblity of new colours...
Thanks
Regards,
DK