(Req) translate of codes into TS2

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

(Req) translate of codes into TS2

Postby daniel.kovacik » Thu Aug 04, 2016 5:37 am

Hi,

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
daniel.kovacik
FXCodeBase: Initiate
 
Posts: 163
Joined: Thu Jun 12, 2014 9:09 pm




Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 15 guests