refresh chart Comment() once settings are changed.

 

Issue. I have a Comment that I print to the chart displaying some of the main settings of my ea, like so...

   Comment("\n                                           Profit Target = $" + DoubleToString(eqplus,2)+
      ", Lots = " + DoubleToString(iStartLots,2)+
      ", Slippage = " + DoubleToString(iSlippage*10,0)+
      ", Spread = " + DoubleToString(Spread*10,0));

but when i change my settings in the ea properties, this comment does not get updated with the new settings. It works when i delete the ea from the chart and add the ea to chart again, but not when i change any of the settings that are used in the comment.

I have tried adding Comment(" ") to Deinitialise, but that does not fix the problem either. What am I doing wrong?

 
Revo Trades:

Issue. I have a Comment that I print to the chart displaying some of the main settings of my ea, like so...

but when i change my settings in the ea properties, this comment does not get updated with the new settings. It works when i delete the ea from the chart and add the ea to chart again, but not when i change any of the settings that are used in the comment.

I have tried adding Comment(" ") to Deinitialise, but that does not fix the problem either. What am I doing wrong?

You need to call ChartRedraw().
 
Alain Verleyen #:
You need to call ChartRedraw().

doh! of course it had to be simple thing to forget.

Reason: