Horizontal lines failing to plot

How can I draw a horizontal line at the price level when my condition is triggered ? (version#4) plotshape(crossUp_red ? rvi : na, title="Up Arrow", style=shape.arrowup, location=location.abovebar, color=#109c3f, size=size.small, text="crossUp_red") // plots arrow However I’m having trouble plotting a line at the price where ‘crossUp_red’ is triggered. trigger_price = valuewhen(crossUp_red, close, 0) plot(trigger_price, title="line_crossUp_red", color=color.green,… Read More Horizontal lines failing to plot

Get the value of 2 lines line.new crossing each other – pinescript

I have 2 lines: line1 = line.new(bar_index[25], high[25], bar_index, low) line2 = line.new(bar_index[25], low, bar_index, high[25]) Now you can see that 2 lines will cross each other. The crossing point may be somewhere between them and maybe between 2 consecutive bars in the history. How to get the value of the crossing point ? >Solution… Read More Get the value of 2 lines line.new crossing each other – pinescript

how to use security function without delay in pinescript?

I’m using security function like below: indicator("My script" , overlay = true) mystate = close[0] >= open[0] and close[1] >= open[1] and close[2] >= open[2] and close[3] >= open[3] and close[4] >= open[4] transtate = request.security(syminfo.tickerid, "30", mystate) plotshape(transtate, size=size.small, style= shape.triangledown, color=color.red, text = ‘this’, textcolor=color.red) it means plot the candle when 5 green… Read More how to use security function without delay in pinescript?

How to ignore my white soldiers signals whenever a previous candle produces a signal?

Trying to bound or limit my 3 white soldiers candle indicator so it doesn’t paint these signals back to back ever. You’ll see on July 5th my code painted 3 days of this signal in a row. I would like to ignore painting the signal after a signal already is painted on the previous candle.… Read More How to ignore my white soldiers signals whenever a previous candle produces a signal?