I've had a go, but need help

 

Hi all,

I have had a go at coding this support and resistance indicator. All it does is paint 6 horizontal lines at values I input. There are some things I dont know how to code but want to learn.......

  • I want the lines to end at the period separators instead of going all the way across the chart. For example if I apply the indicator on the 20th June (I only use 30 min chart) I only want the horizontal lines to span from the start to the end of 20th June.
  • I want the 6 lines to stay on the chart even when a new day starts and I enter new inputs for the next day. For example when it is the 21st June I enter new values for the 6 lines for the new day. The lines on the 20th remain where they were and the indicator paints the new lines with new values for the 21st June.I hope this makes sense.
Reason: