Download MetaTrader 5

compile does not reset variables

To add comments, please log in or register
wertop
13
wertop  

Does anybody face the problem, that after compile external values are not "reset" to the ones in EA? 

Here is an very simple example:

 

#property copyright "Copyright 2014, MetaQuotes Software Corp."

#property link      "https://www.mql5.com"

#property version   "1.00"

#property strict

//--- input parameters

extern string   Comment="Test12";

//+------------------------------------------------------------------+

//| Expert initialization function                                   |

//+------------------------------------------------------------------+

int OnInit()

  {

//---

  Print(Comment); 

//---

   return(INIT_SUCCEEDED);

  }

//+------------------------------------------------------------------+

//| Expert deinitialization function                                 |

//+------------------------------ 

 

After compile  I change the value to "Test1" in the code, compile again, it still prints   "Test12".

What is wrong?? 

wertop
13
wertop  
Nobody has a suggestion? Am I doing something not right?
Keith Watford
Moderator
10568
Keith Watford  

Already discussed

https://forum.mql4.com/62975 

wertop
13
wertop  
Thank you. That is what I was looking for!
To add comments, please log in or register