Need help not working
//@version=5
indicator('Table', overlay=false)
var table atrDisplay = table.new(position.top_right, 1, 1)
t = input.symbol(defval='AMEX:SPY')
arrH = request.security_lower_tf(t, '30', not(session.ismarket) ? high : na)
arrL = request.security_lower_tf(t, '30', not(session.ismarket) ? low : na)
maxH = array.max(arrH)
minL = array.min(arrL)
var price10 = 0.0
price10 := (hour== 10 and minute == 0) ? close : price10
DayOpen = request.security(t, "D", open)
check_trend1 = price10 > DayOpen ? color.green : color.red
check_trend2 = price10 > maxH ? color.green : color.red
check_trend3 = price10 < DayOpen ? color.green : color.red
check_trend4 = price10 < minL ? color.green : color.red
var table my_Table = table.new(position=position.middle_center, columns=5, rows=5)
table.cell(my_Table, 0, 0, "Ticker", text_color=color.white, bgcolor=color.gray, height=5)
table.cell(my_Table, 0, 1, "Open Price", text_color=color.white, bgcolor=color.gray, height=5)
table.cell(my_Table, 0, 2, "Pre market", text_color=color.white, bgcolor=color.gray, height=5)
table.cell(my_Table, 0, 3, "10 AM" , text_color=color.white, bgcolor=color.gray, height=5)
table.cell(my_Table, 1, 0, syminfo.ticker(t), bgcolor=color.white)
table.cell(my_Table, 1, 1, text="$" + str.tostring(math.round(open)), bgcolor=color.white)
table.cell(my_Table, 1, 2, text="$" + str.tostring(math.round(price10)), bgcolor=check_trend3)
table.cell(my_Table, 1, 3, text="$" + str.tostring(math.round(maxH)), bgcolor=check_trend3)`
I am trying to put the price10, and MaxH in the table thank you, appreciate any help i can get
New contributor
bellevue Resident is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.