MetaTrader 4 Build 600 with Updated MQL4 Language and Market of Applications Released - page 67

 
Hello.
Is it possible to decompile this file?
Thank you for your assistance.


<link removed>

 
Not possible.
 
ferenci84:

I have noticed some bugs in the compiler. It sometimes shows wrong line numbers in the include files, so that the error is very hard to find, but I also doubt that there is an error at all, because one error has been eliminated by removing an unused variable and this shouldn't generate any error.


I have noticed that this happens if the file uses non-Windows line feeds i.e. not \r\n but Unix style \n and probably Mac style \r ones also though I have not tested that.

When I had this, the error message line numbers came right after saving the source file with Windows line feeds.

 

Dear Experts,

I as well confused about scripting with this new mt4 build 745.

I put parameter in line 31:

double   BLots,SLots,TLots;

With functions in line 404 till 421 as:

double BOLots() {
  double BLots=0;
  int POS=0;
  bool Term=false;
  while(Term==false) {
    if(OrderSelect(POS,SELECT_BY_POS)) {
      if((OrderSymbol()==Symbol()) && (OrderType()==OP_BUY))  BLots=BLots+OrderLots(); POS++; }
    else Term=true; }
  return(BLots); }
double SOLots() {
  double SLots=0;
  int POS=0;
  bool Term=false;
  while(Term==false) {
    if(OrderSelect(POS,SELECT_BY_POS)) {
      if((OrderSymbol()==Symbol()) && (OrderType()==OP_SELL)) SLots=SLots+OrderLots(); POS++; }
    else Term=true; }
  return(SLots); }

And when I compiled it, the result is always 0 error(s) and 2 warning(s) that I cannot resolve it as:

declaration of 'BLots' hides global declaration at line 31    i-Diana 745.01.mq4    405    10
declaration of 'SLots' hides global declaration at line 31    i-Diana 745.01.mq4    414    10

Would you mind please to explain why it is happening?

Thanks for your kind attention and problem solving.

 

Please use SRC when posting codes.

double   BLots,SLots,TLots;

With functions in line 404 till 421 as:

double BOLots() { 
  double BLots=0; //remove those duplicated declarations
  int POS=0;
  bool Term=false;
  while(Term==false) {
    if(OrderSelect(POS,SELECT_BY_POS)) {
      if((OrderSymbol()==Symbol()) && (OrderType()==OP_BUY))  BLots=BLots+OrderLots(); POS++; }
    else Term=true; }
  return(BLots); }
double SOLots() {
  double SLots=0; //remove those duplicated declarations
  int POS=0;
  bool Term=false;
  while(Term==false) {
    if(OrderSelect(POS,SELECT_BY_POS)) {
      if((OrderSymbol()==Symbol()) && (OrderType()==OP_SELL)) SLots=SLots+OrderLots(); POS++; }
    else Term=true; }
  return(SLots); }

Actually you have already declared the variables. So, it is warning you. Just create another variables or remove the declarations.

If you want to use a variable many times, declare it globally, but if you want to just use it internally, declare it inside a function.

 
I have encountered a similar problem with Screen Update. I resolved it. The attachment has the solution with screenshots.
 

All custom executable EX4 files created by old MQL4 compiler will be automatically moved to the new Navigator directory and will work in the new terminal the same way as before.


Okay, but moving averages can no longer be placed in the indicator window. They only display the moving average of the price. How do I get them to display the moving average of an indicator in the indicator window? 

 
Also, the spread stopped being charted accurately after the new build. It's represented accurately in the new order window, and all trades are executed at accurate prices, but the price chart does not reflect accurate prices, because the spread is off on the price chart. (My broker is FXCM.)
Reason: