The indicator works as intended when I first add it to a chart, but in order to load new data and draw new lines I have to remove the indicator and add it again.
Currently, I have the drawing portion of the code (DrawLines) run when state = State.Realtime. I tried to also add the DrawLines function to the State.Configure, thinking that the user could open the parameters, re-enter the filename and then it would run again (I thought that state triggered when the user opened and closed the UI) - but this did not work.
Initially, I had the DrawLines occurring in OnBarUpdate, and this caused the lines to be re-written over each other for each bar, generating thousands of line objects on top of each other.
What I would like is for the indicator to run once when added and then update (re-read the input file and execute DrawLines) upon a user command - after they have updated the text file and they want to add the new lines.
Thanks for any assistance.

Comment