0

I would welcome help with my code. I am beginner and dont know how to plot lines on filled dojis and unfilled dojis. In picture you can see what I would like to do with my script, unfilled dojis with green line and filled wont be seen (for purpose to see what I mean I made them red).

image

Here is my code:

//@version=5
indicator("My script", overlay = true)

Precision = input.float(0.15, minval=0.0001, title="Doji's Max Body size")

dojiup=(math.abs(open - close) <= (high - low) * Precision ? 1:0)
dojidown=dojiup

plotshape(dojidown, title="Doji",style = shape.xcross,location = location.abovebar, color=color.red)
plotshape(dojiup, title="Doji",style = shape.xcross,location = location.belowbar,color=color.rgb(34, 67, 255))

Thank you for your help

Adriaan
  • 17,741
  • 7
  • 42
  • 75
  • you write 'unfilled dojis with green line and filled wont be seen' ... On your drawing, there are green lines and red lines.... What do you wan't to acheive ? – G.Lebret Nov 24 '22 at 12:15
  • I would like to code indicator that show lines of the dojis, untaken will be green, taken will be red, if the high or low of the doji will be taken out by further price action it will be red, until it is taken it will have green line – gree_trades3 Nov 25 '22 at 13:09

0 Answers0