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

Back to topics list  | << < 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 To post a new topic, please log in or register
avatar
1
makotoxxx 2014.06.03 04:33 #
 
Hello.
Is it possible to decompile this file?
Thank you for your assistance.


<link removed>

avatar
1211
deysmacro 2014.06.03 05:28 #
 
Not possible.
avatar
26
autoabacus 2014.06.26 21: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.

avatar
9
jhp2025 2014.11.06 05: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.

avatar
1211
deysmacro 2014.11.06 05: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.

avatar
3
krishnap2w2 2014.12.01 13:11 #
 
I have encountered a similar problem with Screen Update. I resolved it. The attachment has the solution with screenshots.
avatar
24
KalebCoberly 2015.03.02 08: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? 

avatar
24
KalebCoberly 2015.03.02 09: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.)
Back to topics list   | << < 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67  

To add comments, please log in or register