Download MetaTrader 5
To add comments, please log in or register
Add our Twitter channel to friends and follow the news!
makoto
3
makoto 2014.06.03 02:33  
Hello.
Is it possible to decompile this file?
Thank you for your assistance.


<link removed>

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.06.03 03:28  
Not possible.
AutoAbacus
24
AutoAbacus 2014.06.26 19:42  
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.

jhp 2025
20
jhp 2025 2014.11.06 04:24  

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.

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.11.06 04:51  

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.

Krishna
6
Krishna 2014.12.01 12:11  
I have encountered a similar problem with Screen Update. I resolved it. The attachment has the solution with screenshots.
Kaleb Coberly
50
Kaleb Coberly 2015.03.02 07:19  

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? 

Kaleb Coberly
50
Kaleb Coberly 2015.03.02 08:37  
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.)
/ /1...6061626364656667
To add comments, please log in or register