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

how to get angle by degree from line.new in pinescript?

I’ve create a line by line.new() in pinescript. now I want to know how much is my line angle by degree? how can I get the angle of my line1 ? //@version=5 indicator("line.new") var line1 = line.new(0, low, bar_index, high, extend=extend.right) >Solution : We can calculate the angle of a line using line.new() in PineScript:… Read More how to get angle by degree from line.new in pinescript?

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?

Show/Hide Barcolor from Input Settings

how to make checkbox option to Show/Hide in Input Settings (so we don’t need go to input style tab to show/hide it) for bar coloring with conditional below? //Conditions L_adx = DIPlus > DIMinus and ADX > th S_adx = DIPlus < DIMinus and ADX > th BAR_COLOR_ADX = L_adx ? color.lime : S_adx ?… Read More Show/Hide Barcolor from Input Settings