Hello
I had a custom indicator that worked in the past –
The idea was when the value of a variable was “0” the value was not to be returned. something like:
if (close > open)
v = close
else
v= 0
return v AS “MY”
this worked well , but now I see that the chart plots a transition from “0”
Is there a way to still not distort the chart by values of “0” ?
Thanks
There you go:
t = 0
v = close
if (close > open)then
t = 255
endif
return v AS "MY" coloured(255,0,0,t) style(line,4)
Hi,
Thanks a lot for you answer !
it helped , but problem is still not resolved –
The way that is is drawn now is you see a line connected between a candle that had “t=0” and a candle with “t=255” .
As you can see in your drawing a transition is plotted (marked in yellow) on the graph .
is there a way to avoid drawing this transition and actually start the drawing from the candle that has “t=255” ?
Thanks,
Lior
I can’t see any yellow line.
I am trying to attach a drawing, but its not uploaded
if you look at the picture you sent out –
there is a transition shown between the candle at 14:00 and the one at 15:00
the candle at 14:00 has t=0 and the one at 15:00 has t=255, so I would expect the drawing to start for the candle at 15:00
why is there a connecting line before the candle at 15:00 (the one joining the candle at 14:00 with the one at 15:00) and is there a way to avoid this ?
Thanks
JSParticipant
Senior
It’s just a simple change in the formula…
t = 0
v = close
if (close > open) and (Close[1]>Open[1]) and Close>Close[1] then
t = 255
endif
return v AS "MY" coloured(255,0,0,t) style(line,4)