However, my indicator additionally allows sub session volume histograms to be triggered and displayed within a session. I accomplish this by modifying variables in the indicator's properties window. I use a boolean flag to specify a secondary session and a DateTime variable to indicate the time (bar) at which to start drawing the sub session histogram.
All of this works fine when using the indicator's property panel and applying the changes manually. The values specified in the properties indicator appear to take
precedence over the defaults specified in the indicators #variables region as they should do.
My problem is that I have added a simple toolstrip button to do the same thing. The button sets the boolean flag and captures the desired bar to set the timestamp.
My problem is that, unlike applying changes from the indicator's properties panel which apparently re-initializes and redraws the chart using the values from the indicator's property window, I get no changes when using the toolstrip button.
I have tried calling ChartControl.ChartPanel.Invalidate() and ChartControl.Refresh() from OnMarketUptate() and within the button click routine to no avail to refresh the chart.
I have tried manually reloading (F5) the indicator also, but the state captured by the toolstrip button seems to be lost after the operation.
I would greatly appreciate any advice that sheds light on the sequence of events that are triggered when an indicator's properties are manually changed and how to initiate those changes programmatically in a manner that is consistent with the simple update of an indicator.
Thanks in advance and I apologize if I am posting a redundant thread. I have not found the answer yet.
Comment