Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Pine Script Heiken-Ashi problem

guys,

take a look at this code:

study(title = "Yearly High/Low", overlay = true)

is_newbar(res, sess) => change(time(res, sess)) != 0
adopt(r, s) => security(tickerid, r, s)

low_range = valuewhen(is_newbar('12M','0000-0000'), low, 0)
high_range = valuewhen(is_newbar('12M','0000-0000'), high, 0)

down = plot(adopt('12M', low_range), color = green)
up = plot(adopt('12M', high_range), color = red)

fill(down, up, color = red, transp=97)

then take a look at the high for year 2006. seems to work usually except for 2006. what's going on here?

Note: This topic was created from a reply on the Pine scripting language topic.
1 person has
this problem
+1
Reply