Is it possible inside an EA to detect that the user has changed the parameters of one of the indicators?
My current solution is to embed the parameters in the short name of the indicator and then check every second inside OnTimer(). Is there a better way to detect changes to the indicator parameters?
Is it possible to tell the difference between a chart resize and a change to the indicator's parameters?
The documentation says, "Change of the chart size or modification of chart properties through the Properties dialog."
It does, indeed, fire for either case; but I see no immediate way to tell them apart. The lparam, dparam, and sparam seem to be the same for either size change or properties modification.
You can use the reason code of the OnDeinit() as well
void OnDeinit(const int reason)
if(reason == REASON_PARAMETERS)
but it will also trigger even if you open the input dialog box and click OK without even changing the parameters..
what do you mean? maybe I have misread the question, can you please elaborate more?
You could save the chart template and then parse the tpl.xml file in order to find which params have changed is any.
That seems like a good general solution.
For my current need, I found an easy enough work-around.
I did ask the Service Desk if they would consider differentiating between the two events. I suggested a non-zero value for lparam.