I want to trigger a function when two prices have the same value. Unfortunately, I can’t do this.
Apparently the prices are not quite the same and I can’t run the function. How can I solve this problem?
I tried it with a real-time candle and unfortunately it doesn’t work:
<code>if close == mywert
label.new(bar_index, na, ""+ str.tostring(close), color=#f377ed, textcolor=color.black, style=label.style_label_up, yloc=yloc.belowbar, size = size.normal)
</code>
<code>if close == mywert
label.new(bar_index, na, ""+ str.tostring(close), color=#f377ed, textcolor=color.black, style=label.style_label_up, yloc=yloc.belowbar, size = size.normal)
</code>
if close == mywert
label.new(bar_index, na, ""+ str.tostring(close), color=#f377ed, textcolor=color.black, style=label.style_label_up, yloc=yloc.belowbar, size = size.normal)
I would also be happy if the function was triggered in this price range, but how could I do this?