How to remember new value of extern parameter of custom indicator when its edited/change internally ?
1. I save them to a chart as label objects, and read & delete them on init. I monitor the deinit reason for params-change or indicator detach, those should not save anything
2. I only know of possibility to invoke the reload by ChartSetSymbolPeriod , but it works only on regular charts (not the offline ones)
1. I save them to a chart as label objects, and read & delete them on init. I monitor the deinit reason for params-change or indicator detach, those should not save anything
That's may be the solution. Let me try...
Well, It may not solve the one problem that I forgot to mention; Please check the original post. it also contains a image & sample code.
1.I save them to a chart as label objects, and read & delete them oninit. I monitor the deinit reason for params-change or indicator detach,those should not save anything
That's may be the solution. Let me try...
Well, It may not solve the one problem that I forgot to mention; Please check the original post. it also contains a image & sample code.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am having a custom indicator which accepts 3 extern variables as input (1)Signal_Type, (2)Entry_DateTime & (3)Entry_Price. With the help of these inputs indicator plots some objects on the chart as depicted in image below.
In case 2 on editing inputs, custom indicator perfectly plots objects on chart but it neither raises custom indicator events OnDeinit (with REASON_PARAMETER) & OnInit nor remembers the new set of input parameters forever like in case 1. And whenever we change the timeframe of chart OR restart the MT4 terminal after case 2, the terminal invoke custom indicator either with default parameter values or with the parameter values that were set by using case 1 before the case 2
Well one more thing that I forgot to mention
While editing these parameters using case 2, the chart events return good values of Signal_Type & Entry_DateTime parameters but Entry_Price parameter has approximate nearby values. So whenever I open the input dialog-box to correct this Entry_Price, I found that the input dialog-box contains old values for all three parameters Signal_Type, Entry_DateTime & Entry_Price. It never got updated as depicted in image below