mardi 9 février 2021

How do I create a condition with my script using the if statement?

I'm faced with a little challenge with the if statements. I want the codes (plotchar) below to be plotted only if the code (plotshape) is false. If the code (plotshape) is true, then code (plotchar) shouldn't be plotted.

plotshape (show_atr_rule ? atrchecklocation : na, style=shape.circle, location=absolute, size=tiny, color=color.yellow, transp=20)
plotchar(codiff_long, color=color.green, location=location.abovebar, text="BUY", transp=0)
plotchar(codiff_short, color=color.red, location=location.belowbar, text="SELL", transp=0)

Aucun commentaire:

Enregistrer un commentaire