MetaTrader 4 Build 529测试版发布,带有新的编译器 - 页 48

 
Alexander:
固定的。下一个版本中会有一个修复。然而,由于更新机制的性质,结果只有在构建之后才能看到(即在从下一个构建到下一个构建的顺序更新时)。
有道理。谢谢你。
 
Interesting:
我们什么时候能解决账户历史中的时间问题?我已经厌倦了看历史到确切的分钟...
已经有了。在今天的构建中,它将精确到秒。
 

帮助我理解为什么这个在509上编译的代码在从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); 
}

在EA中,代码的调用和处理是这样的。

   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);}

但如果代码是在ME中编译的,从build 540开始,EA的日志文件就写了。

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)

和EA不能正常工作或根本不工作。

 
VOLDEMAR:

淹没在信息之中


我家的WIN 7电脑也有同样的问题,而且无论代码是否被修改,都会偶尔发生,Build 541。

 

策略测试器中的优化没有发挥作用?

我测试了标准专家顾问的优化,但在所有运行中得到的结果为零。

我优化了我的专家顾问,每次运行都得到相同的结果,尽管参数发生了变化。

测试员

终端建设 241

 
HIDDEN:

策略测试器中的优化没有发挥作用?

我测试了标准专家顾问的优化,但在所有运行中得到的结果为零。

我优化了我的专家顾问,每次运行都得到相同的结果,尽管参数发生了变化。

终端建设 241


Oppa,一个来自过去的声音 .... 你不会碰巧有第一个建筑,对吗?
 
没有这样的建筑(241)。可能是指541。
 
VOLDEMAR:

Oppa,一个来自过去的声音 .... 你不会碰巧有第一部作品吧?

可以找到较旧的版本,但它们不太可能工作。

我的版本是 "1、0、0、1",有5MB。需要一个吗?

:)

 

你能告诉我崩溃的可能原因吗?)

我通过OOP制作了指标中的主要计算函数(我已经研究了几天了)。

一切工作正常(在3000巴时,计算速度增加了2-3倍)。

但当我试图运行2个指标时,它 崩溃了,一切都崩溃了 ......

 
ALXIMIKS:

你能告诉我崩溃的可能原因吗?)

我通过OOP制作了指标中的主要计算函数(我已经研究了几天了)。

一切工作正常(在3000巴时,计算速度增加了2-3倍)。

但当我试图运行2个指标时,它 崩溃了,一切都崩溃了 ......

而没有代码,你怎么能帮助?