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

しかし、ビルド540からMEでコンパイルした場合、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の自宅のPCでも同じ問題が発生。 しかも、コードが変更されているかどうかにかかわらず、たまに発生する、ビルド541

 

ストラテジーテスターでの最適化がうまくいかない?

標準のExpert Advisorで最適化のテストをしているが、すべての実行で結果がゼロになる。

Expert Advisor を最適化すると、パラメータは変わるが、毎回同じ結果が得られる。

テスター

ターミナルビルド 241

 
HIDDEN:

ストラテジーテスターでの最適化がうまくいかない?

標準のExpert Advisorで最適化のテストをしているが、すべての実行で結果がゼロになる。

Expert Advisor を最適化すると、パラメータは変わるが、毎回同じ結果が得られる。

ターミナルビルド 241


オッパ、過去の声・・・。 もしかして、最初のビルドをお持ちではないでしょうか?
 
そのようなビルドはなかった(241)。おそらく541のことだろう。
 
VOLDEMAR:

オッパ、過去の声・・・。 もしかして、最初のビルドをお持ちではないですか?

古いビルドは見つけることができますが、動作する可能性は低いです。

私は5mbでバージョン "1、0、0、1 "を持っています。必要ですか?

:)

 

クラッシュの考えられる原因を教えてください)

OOPでインジケータ内のメインの計算関数を作りました(数日前から勉強しています)。

すべて正常に動作しています(3000barで計算速度が2-3倍になりました)。

しかし、2つのインジケータを実行しようとすると クラッシュし、すべてがクラッシュします・・・・・。

 
ALXIMIKS:

クラッシュの原因として考えられることを教えてください))

OOPでインジケータ内のメインの計算関数を作りました(数日前から勉強しています)。

すべて正常に動作しています(3000barで計算速度が2-3倍になりました)。

しかし、2つのインジケータを実行しようとすると クラッシュし、すべてがクラッシュします・・・・・。

そして、コードがなければ、どうやって助けることができるのでしょうか?