I’m importing a string that i then turn into an array. i would like to use the date and time values inside the array to draw lines from. The issue seems to be that a const string is expected. Is there a workaround?
//@version=5
indicator("Line Date")
date1 = input.string("2024-06-13","Date")
time1 = input.string("17:25:14","Time")
date2=str.format_time(date1,yyyy--MM-dd)//not working
t1=timestamp(date2)//not working
//t1=timestamp("2024-07-05 17:00:19")// it works with a const string
line.new(t1,close,time,close,xloc.bar_time,extend.none,color.rgb(255,255,0))
New contributor
Karl Laeufer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.