MetaTrader 4 Build 529 beta released with new compiler - page 48

 
Alexander:
Fixed. A fix will be available in the next build. However, due to the nature of the update mechanism, the results will only be visible after the build (i.e. on an update from the next build to the next in order).
Makes sense. Thank you.
 
Interesting:
When will we fix the time in the account history? I'm sick and tired of looking at the history to the exact minute...
Already. In today's build it will be accurate to the seconds.
 

help me understand why this code compiled on 509 works when called from an EA

//+------------------------------------------------------------------+
//|                                                FlatIndicator.mq4 |
//|                        Copyright 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+

#property indicator_separate_window
#property indicator_minimum 0.0
#property indicator_buffers 3
#property indicator_color1 Silver
#property indicator_color2 FireBrick
#property indicator_color3 Lime

extern int ATR_peroids1 = 13;
extern int StdDev_peroids1 = 30;
extern int ATR_peroids2 = 40;
extern int StdDev_peroids2 = 100;
extern double extValue_1 = 1.4;
double extValue_2 = 0.5;
bool suppressor = TRUE;
double bufer_1[];
double bufer_2[];
double bufer_3[];

int init() {
   SetIndexStyle(0, DRAW_LINE);
   SetIndexBuffer(0, bufer_1);
   SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 4);
   SetIndexBuffer(1, bufer_2);
   SetIndexStyle(2, DRAW_LINE);
   SetIndexBuffer(2, bufer_3);
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   int shift_val;
   double locValue_1;
   double locValue_2;
   double locValue_3;
   double locValue_4;
   double locValue_5;
   double locValue_6;
   double locValue_7;
   double locValue_8 = 0;
   int countBars = IndicatorCounted();
   if (countBars < 0) return (-1);
   if (countBars > 0) countBars--;
   int CalcBars = Bars - countBars;
   int MaxBars = MathMax(ATR_peroids2, StdDev_peroids2);
      if (CalcBars > MaxBars + 5){shift_val = CalcBars - MaxBars;}
         else{shift_val = CalcBars;}
      for (int shift = shift_val; shift >= 0; shift--) {
         locValue_1 = iATR(NULL, 0, ATR_peroids1, shift);
         locValue_2 = bufer_3[shift + 1];
         locValue_3 = bufer_3[shift + 3];
         locValue_4 = NormalizeDouble(locValue_1, Digits);
      if (suppressor){ locValue_8 = locValue_1 / iATR(NULL, 0, ATR_peroids2, shift) + extValue_2 * (locValue_2 - locValue_3);}
         else{locValue_8 = locValue_1 / iATR(NULL, 0, ATR_peroids2, shift);}
         locValue_5 = iStdDev(NULL, 0, StdDev_peroids1, 0, MODE_LWMA, PRICE_TYPICAL, shift);
         locValue_6 = NormalizeDouble(locValue_5, Digits);
         locValue_5 /= iStdDev(NULL, 0, StdDev_peroids2, 0, MODE_LWMA, PRICE_TYPICAL, shift);
         locValue_7 = extValue_1;
         locValue_7 -= locValue_5;
      if (locValue_8 > locValue_7) {
         bufer_3[shift] = locValue_8;
         bufer_2[shift] = -1;
      } else {
         bufer_3[shift] = locValue_8;
         bufer_2[shift] = 0.10;
      }
      bufer_1[shift] = locValue_7;
   }
   return (0); 
}

in EA, the code is called and handled like this:

   FlatIndi = 0.0;
   FlatIndi = iCustom(Symbol(), 0, "FlatIndicator",ATR_peroids1, StdDev_peroids1, ATR_peroids2, StdDev_peroids2, extValue_1, 1, 0);   
   if (FlatIndi >= 0.0){ return(0);}

but if the code is compiled in ME from build 540 then EA log file writes:

17:47:53.221 MetaTrader 4 at FOREX.com build 540 started (XXX)
17:47:56.331 'xxxxx': login
17:47:57.972 'xxxxx': login
17:47:58.554 'xxxxx': previous successful authorization performed from xx.xx.x.xxx
17:48:03.538 Expert 007 ea ,: loaded successfully
17:48:13.821 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.821 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.821 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.821 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.837 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.837 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.837 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.837 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.837 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.837 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.837 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.837 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.852 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.852 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.852 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.852 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.852 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.852 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.852 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.852 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.852 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.852 Not enough memory for custom indicator FlatIndicator EURUSDFXF,M5
17:48:13.868 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.868 Not enough memory for indicator Average True Range (EURUSDFXF,M5)
17:48:13.868 Memory handler: cannot allocate 1286704 bytes of memory
17:48:13.868 Not enough memory for indicator Average True Range (EURUSDFXF,M5)

and EA doesn't work correctly or doesn't work at all.

 
VOLDEMAR:

Inundated with messages


Same problem on my home computer with WIN 7. And it happens every once in a while whether or not the code has been changed, build 541

 

Optimisation in the strategy tester is not working?

I test standard Expert Advisors for optimization, but get zero results in all runs.

I optimize my Expert Advisor, I get the same result in every run, although the parameters change.

Tester

Terminal build 241

 
HIDDEN:

Optimisation in the strategy tester is not working?

I test standard Expert Advisors for optimization, but get zero results in all runs.

I optimize my Expert Advisor, I get the same result in every run, although the parameters change.

Terminal build 241


Oppa, a voice from the past .... You wouldn't happen to have the first build, would you?
 
There was no such build (241). Probably meant 541.
 
VOLDEMAR:

Oppa, a voice from the past .... You don't happen to have the first build ?

Older builds can be found, they are unlikely to work.

I have versions "1, 0, 0, 1" at 5 mb. Need one?

:)

 

Can you tell me the possible cause of the crash?)

I made the main calculation function in the indicator through OOP (I've been studying it for a few days now).

All works fine (at 3000 bars calculation speed has increased 2-3 times).

But when I try to run 2 indicators it crashes and everything crashes ......

 
ALXIMIKS:

Can you tell me the possible cause of the crash))

I made the main calculation function in the indicator through OOP (I've been studying it for a few days now).

All works fine (at 3000 bars calculation speed has increased 2-3 times).

But when I try to run 2 indicators it crashes and everything crashes ......

And without the code, how can you help?
Reason: