2

Actually i Made a Pinescript of Plotting resistances but i want the resistances should be greater then the fixed last open. i want for all bars it should be the same last open fixed price

This is My Code

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © amjupvc1234

//@version=5
indicator("ResistancePlotter", overlay=true,max_boxes_count = 50)


var float lastcloseprice = na
// Plot the line on the last close price (Only once)
if barstate.islast
    lastcloseprice := close[1]

RSI = ta.rsi(close, 14)

// Get the last close price
Condition = open[1] < close[1] and close < open and RSI[1] > 50 and RSI > 50 and open > lastcloseprice

if Condition
    HIGH = ta.change(high) ? high : high[1]
    BoxUpBoundary = HIGH
    BoxLowBoundary = open
    box.new(bar_index[1], BoxLowBoundary, bar_index, BoxUpBoundary, #e479bd, 1, line.style_solid, extend.right, xloc.bar_index, color.new(color.red, 90))

0 Answers0