エキスパート: EA_MALR

 

EA_MALR:

MALR指標に基づいて描画されたエキスパートアドバイザー。トレーリングストップ、ロットの増加、平均および反転機能が用意されています。

作者: Alexander Puzikov

 
Automated-Trading:

EA_MALR

著者:Im_ hungry

こんにちは、私の意見ではちょうど素晴らしいEAです。少なくとも視覚的に、テストでは良いです。私は今のところそれをテストしています。質問です。ポジションオープン時のラインのクロスは、ローソク足のクローズ時に考慮されるということでよろしいでしょうか?それとも、ローソク足の期間内であってもクロスは考慮されるのでしょうか?
 
こんにちは!MetaTreider 5でEAをすぐにダウンロードできるようにしてください。
 
なぜかフクロウが動かない((
 

よく書かれたEAの一つである、

よく書かれたコードに飢えている人がいるなら、これを持っていればいい、

作者に心から感謝する、

私はまだ不思議に思う、なぜ他の人はこのEAにコメントしない。

 
mql5 の新しいバージョンでいくつかのエラーが発生しました。
void OnTick()
  {
   bool pos=PositionSelect(Symbol());
   if(!pos || (pos && (use_Averaging || Position_overturn)))
     {
      datetime Now_time[1];
      int coptTime=CopyTime(Symbol(),NULL,0,1,Now_time);
      if(Now_time[0]>_time && coptTime!=-1)
        {
         int type=-1;
         double propn=0,prev_lot=0;
         if((use_Averaging || Position_overturn) && pos)
           {
            prev_lot=PositionGetDouble(POSITION_VOLUME);
            type=(int)PositionGetInteger(POSITION_TYPE);
            if(type==0 && prev_open!=0) propn = prev_open-SymbolInfoDouble(Symbol(),SYMBOL_ASK);
            if(type==1 && prev_open!=0) propn = SymbolInfoDouble(Symbol(),SYMBOL_BID)-prev_open;
           }
         ArrayInitialize(high_extr,0);
         ArrayInitialize(low_extr,0);
         int cop1 = CopyBuffer(handle_MALR,3,1,2,high_extr);
         int cop2 = CopyBuffer(handle_MALR,4,1,2,low_extr);
         if(cop1==2 || cop2==2 || high_extr[0]>0 || high_extr[1]>0 || low_extr[0]>0 || low_extr[1]>0)
           {
            double close[2];
            int copy_close = CopyClose(Symbol(),NULL,1,2,close);
            if(copy_close==2)
              {
               if(high_extr[0]<=close[0] && high_extr[1]>=close[1])
                 {

                  if(Position_overturn)
                    {
                     if(type==0)
                       {
                        if(close())
                          {
                           if(!open(1,prev_lot,3)) return;
                          }
                        _time=Now_time[0];
                        return;
                       }
                     if(!use_Averaging && pos)
                       {
                        _time=Now_time[0];
                        return;
                       }
                    }
                  if(use_Averaging)
                    {
                     if(type!=-1)
                       {
                        if(type==1 && propn>=loss_forAveraging*point && propn!=0)
                           if(!open(1,prev_avlot,2)) return;
                       }
                     else if(!open(1,0,1)) return;
                     _time=Now_time[0];
                     return;
                    }
                  else
                    {
                     if(!open(1,0,1)) return;
                    }
                 }
               if(low_extr[0]>=close[0] && low_extr[1]<=close[1])
                 {
                  if(Position_overturn)
                    {
                     if(type==1)
                       {
                        if(close())
                          {
                           if(!open(0,prev_lot,3)) return;
                          }
                        _time=Now_time[0];
                        return;
                       }
                     if(!use_Averaging && pos)
                       {
                        _time=Now_time[0];
                        return;
                       }
                    }
                  if(use_Averaging)
                    {
                     if(type!=-1)
                       {
                        if(type==0 && propn>=loss_forAveraging*point && propn!=0)
                           if(!open(0,prev_avlot,2)) return;
                       }
                     else if(!open(0,0,1)) return;
                     _time=Now_time[0];
                     return;
                    }
                  else
                    {
                     if(!open(0,0,1)) return;
                    }
                 }
               _time=Now_time[0];
              }
           }
        }
      else return;
     }
 
63839348 配列アクセス

close()をClose()に変更。先頭を大文字にする。

別のエラーもあるが、サポートされていない充填型エラー。