Drawing the straight line - page 2

 
djarturos #:
Thanks for answer. price levels from HIGHs and LOWs and objects are not stored, just created from OnCalculate function. I can't add this function to the button second time. In other words, I can't assign this function to the button. 
And I can't use code somewhere else than OnCalculate cause it uses it too (there are many input and referencje values).
I have these lines and arrows on the chart too. But these objects, like I said above, are not stored anywhere.

I have also separate settings in indicator's panel like showSupports, show Resistance etc. But I understand these are only initialization parameters. It means if I set up this value to "false", no lines on the chart, then I can press button On/Off like I want. And after I close mt4 and open it again, this internal value should be on "false" as before. 

But button is the main problem. 

I see , so one way to go about it would be to find where it creates those lines and wrap a system to store them . Then you can have instant access to where and how the lines are

 
Lorentzos Roussos #:

I see , so one way to go about it would be to find where it creates those lines and wrap a system to store them . Then you can have instant access to where and how the lines are

Thanks for answer. I will be working on it. I was more interested with function which could "refresh" the indicator after I press the button. In case of future problems, I'll ask again here, and if I'll find the solution, I'll inform as well.