MetaTrader 4 Build 529 Beta, Yeni Derleyici ile Yayınlandı - sayfa 48

 
Alexander :
Düzeltildi. Düzeltme bir sonraki derlemede sunulacak. ANCAK! Güncelleme mekanizmasının kendine özgü özelliği nedeniyle, sonuçlar yalnızca derleme yoluyla fark edilebilir (yani, sırayla en yakın derlemeden diğerine güncelleme sırasında).
Mantıken. Teşekkür ederim.
 
Interesting :
Hesap geçmişindeki zaman, bunu ne zaman düzelteceğiz? Eh, zaten en yakın dakikaya kadar tarih izlemekten bıktım ...
Çoktan. Bugünün yapısında, ikinciye doğru olacaktır.
 

509'da derlenen bu kodun bir uzmandan çağrıldığında neden çalıştığını anlamama yardım et

 //+------------------------------------------------------------------+
//|                                                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'da kod şu şekilde çağrılır ve işlenir:

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

ancak kod, derleme 540'tan ME'de derlenirse, EA günlük dosyası şunu yazar:

 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)

ve EA düzgün çalışmıyor veya hiç çalışmıyor.

 
VOLDEMAR :

mesajlarla dolu


Wine 7'nin altındaki bir ev bilgisayarında aynı sorun.Ayrıca, kodun değişip değişmediğine bakılmaksızın her seferinde kendini gösterir 541.

 

Strateji test cihazındaki optimizasyon çalışmıyor mu?

Optimizasyon için standart Uzman Danışmanları test ediyorum, sonuçlar tüm çalıştırmalar için sıfır.

EA'mı optimize ediyorum, parametreler değişse de her çalıştırmada aynı sonucu alıyorum.

test cihazı

terminal yapı 241

 
HIDDEN :

Strateji test cihazındaki optimizasyon çalışmıyor mu?

Optimizasyon için standart Uzman Danışmanları test ediyorum, sonuçlar tüm çalıştırmalar için sıfır.

EA'mı optimize ediyorum, parametreler değişse de her çalıştırmada aynı sonucu alıyorum.

terminal yapı 241


Oppa, geçmişten bir ses.... İlk yapım vakası yok mu?
 
Böyle bir yapı yoktu (241). Muhtemelen 541 anlamına geliyordu.
 
VOLDEMAR :

Oppa, geçmişten bir ses.... İlk yapımdan bir vaka yok mu?

Eski yapıları bulabilirsiniz, çalışması pek olası değildir.

5 mb'de "1, 0, 0, 1" sürümlerine sahibim. İhtiyaç?

:)

 

Kaza için olası bir neden önerin

Göstergede, ana hesaplama işlevini OOP aracılığıyla tasarladım (sadece birkaç gündür çalışıyorum).

Her şey yolunda gidiyor (3000 barda, hesaplama hızı 2-3 kat arttı).

Bu sadece 2 gösterge çalıştırmayı denediğinizde - çöküyor ve her şey düşüyor ......

 
ALXIMIKS :

Kaza için olası bir neden önerin

Göstergede, ana hesaplama işlevini OOP aracılığıyla tasarladım (sadece birkaç gündür çalışıyorum).

Her şey yolunda gidiyor (3000 barda, hesaplama hızı 2-3 kat arttı).

Bu sadece 2 gösterge çalıştırmayı denediğinizde - çöküyor ve her şey düşüyor ......

Kodsuz nasıl yardımcı olabilirsiniz?