どんな新人の質問でも、フォーラムを乱雑にしないように。プロフェッショナルは、通り過ぎないでください。Nowhere without you - 6. - ページ 809

 
pycha:

EA起動時に表示される画像を自分のロゴに変更することはできますか?

#property icon "㊞㊞㊞㊞㊞㊞。
 
evillive:
#property icon "㊞㊞㊞㊞㊞㊞。

また、コンパイル後はアイコンファイルが*.ex4ファイルに埋め込まれるため、コンパイル後のアイコンファイルの移動は 必要ありません。
 
ありがとうございます))
 
roymax:
で、何も修正されなかったのですか?

ご覧の通りです。

しかし、最も論理的で簡単なプロキシ方法は、MTウィンドウツールの変更を禁止することです。だから、バグとみなすことを提案します :)

 
私のExpert Advisorは何ヶ月分かのチャートを分析しますが、分足チャートで全履歴を返すチャートもあれば、1ヶ月半以上表示しないチャートもあり、それすら手動でスクロール バックすれば、ある日を過ぎるとスクロールすらしません。
 
pycha:
私のExpert Advisorは、ある月数分のチャートを分析しますが、分足チャートで全履歴を返すチャートもあれば、1ヶ月半以上は返したくないチャートもあり、それも手動でスクロールして戻すと、ある日を超えても手動でスクロールしてくれません。
どの程度の履歴を残すかは、ブローカーが正確に判断します。端末の設定でバーの最大 本数が設定されている場合、チャート上の本数が少ないと、ブローカーはそれ以上の本数を出しません。
 
わかりました、ありがとうございます。
 

こんにちは フォーラムユーザーの皆様。お願いしたいことがあります。どなたか、iEnvelopesOnArray()関数が動作するコードを投稿していただけませんか?これまで私が手なずけようとした試みはすべて失敗に終わっています。開発者のせいではないか?ここでは、その働きを確認するためのインジケータを紹介します。

//+------------------------------------------------------------------+
//|                                            Tester_EnvOnArray.mq4 |
//|     Copyright 2005 г. до нашей эры, MetaQuotes Software Company. |
//|                                              https://www.mql4.com |
//+------------------------------------------------------------------+
#property copyright   "2005 г. до нашей эры, MetaQuotes Software Company."
#property link        "https://www.mql4.com"
#property description "Пример индикатора для проверки работы функции iEnvelopesOnArray()"
#property strict

//--- indicator settings
#property  indicator_chart_window
#property  indicator_buffers 2
#property   indicator_color1  Green
#property   indicator_color2  Red

//--- indicator buffers
double     ExtEnvBuffer[];
double     ExtPriceBuffer[];

//--- bars minimum for calculation
#define  DATA_LIMIT  100

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void OnInit(void)
  {
  IndicatorShortName("EnvOnArr");
  
  //--- 1 additional buffer are used for counting.
  IndicatorBuffers(2);
  IndicatorDigits(Digits + 2);
  
  //--- drawing settings
  SetIndexStyle(0, DRAW_LINE);
  SetIndexDrawBegin(0, DATA_LIMIT);
  
  SetIndexStyle(1, DRAW_NONE);
  SetIndexDrawBegin(1, DATA_LIMIT);
  
  //--- all indicator buffers mapping
  SetIndexBuffer(0, ExtEnvBuffer);
  SetIndexBuffer(1, ExtPriceBuffer);
  
  //--- name for DataWindow and indicator subwindow label
  SetIndexLabel(0, NULL);
  SetIndexLabel(1, NULL);
  }
  
//+------------------------------------------------------------------+
//| EnvelopesOnArray                                                 |
//+------------------------------------------------------------------+
int OnCalculate (const int rates_total,
                 const int prev_calculated,
                 const datetime & time[],
                 const double & open[],
                 const double & high[],
                 const double & low[],
                 const double & close[],
                 const long & tick_volume[],
                 const long & volume[],
                 const int & spread[])
  {
  int    i, limit;
  double prev = 0.0, Deviation = 1;
  
  //--- check for rates total
  if(rates_total <= DATA_LIMIT)
    return(0);
    
  //--- last counted bar will be recounted
  limit = rates_total - prev_calculated;
  
  if(prev_calculated > 0)
    {
    limit++;
    }
    
  //--- price counted in the 2-nd additional buffer
  for(i=0; i<limit-1; i++)
    ExtPriceBuffer[i] = close[i];
                       
  //--- price counted in the 1-st additional buffer
  for(i=0; i<limit-1; i++)
    ExtEnvBuffer[i] = iEnvelopesOnArray(ExtPriceBuffer, 0, 5, MODE_SMA, 0, 1, MODE_UPPER, i);
  
  //--- done
  return(rates_total);
  }
  
//+------------------------------------------------------------------+
ファイル:
 

皆さん、こんにちは。テスト中にエラーが発生するのですが。

2014.12.25 18:04:31.125 2014.11.03 00:00 Test3 EURUSD,H4: OrderModify関数の 無効なチケット。

2014.12.25 18:04:31.125 2014.11.03 00:00 Test3 EURUSD,H4: OrderModify error 4051

何度も再確認しましたが、(私が見る限り)エラーはありません。

プログラムのこの部分で失敗が発生します。

ModifyBuy, ModifySell, SelectBuy, SelectSell - bool型を持つ。

SendBuy, SendSell-int , int TP = 30


while(true)

 {

  

  SPREAD=MarketInfo(Symb,MODE_SPREAD);

  SelectBuy=OrderSelect(OrderTicketBuy,SELECT_BY_TICKET);//buy

  RefreshRates();

  if(NormalizeDouble(OrderOpenPrice()+TP*Point,Digits)<NormalizeDouble(Ask,Digits))

  {

  ModifyBuy=OrderModify(OrderTicket(),OrderOpenPrice(),Bid-(10-SPREAD)*Point,Bid+(30- SPREAD)*Point,0,0); 

  R=1;

  break;

  }//if2

    

  Timen=OrderCloseTime();

  if(Timen>0)

  {

  //--------------------------  

    Stop=StopLevel(Symb);

   StopLong();//значение Long2

   StopLoss_Func();//значение SL

//--------------------------  

   SendBuy=OrderSend(Symb,OP_BUYSTOP,Lote,Ask+Long2*Point,1,Bid-SL*Point,NULL);

   for(i=1;i>OrdersTotal();i++)

  {

   if(OrderSelect(i-1,SELECT_BY_POS,MODE_TRADES)==true)//Проверяем есть ли ордер

    {

     if(OrderSymbol()!=Symb) continue;     

     if(OrderType()==4)

      {

      OrderTicketBuy=OrderTicket();

      break;

      }

      else

      {

      continue;

      } 

     }

    }   

    continue;  

  }//if2

  

  SelectSell=OrderSelect(OrderTicketSell,SELECT_BY_TICKET,MODE_TRADES);//sell

  RefreshRates();

  if(NormalizeDouble(OrderOpenPrice()-TP*Point,Digits)>NormalizeDouble(Bid,Digits))

  {

   

   ModifySell=OrderModify(OrderTicket(),OrderOpenPrice(),Ask+(10-SPREAD)*Point,Ask-(30- SPREAD)*Point,0,0);

   R=2;

   break; //спред

  }//if2

  

   Timen=OrderCloseTime();

  if(Timen>0)

  {

 //--------------------------  

    Stop=StopLevel(Symb);

   StopLong();

   StopLoss_Func();

//--------------------------  

   SendSell=OrderSend(Symb,OP_SELLSTOP,Lote,Bid-Long2*Point,1,Ask+SL*Point,NULL);

    for(i=1;i>OrdersTotal();i++)

  {

   if(OrderSelect(i-1,SELECT_BY_POS,MODE_TRADES)==true)//Проверяем есть ли ордер

    {

     if(OrderSymbol()!=Symb) continue;     

     if(OrderType()==6)

      {

      OrderTicketSell=OrderTicket();

      break;

      }

      else

      {

      continue;

      } 

     }

    }   

    continue; 

  }//if2

}//while1



コード全体が必要な場合は、こちら


ファイル:
test3_1.mq4  15 kb
 
皆さん!ポジションを開くのに十分なマージンがない場合、EAのテストを 停止するコードを教えてください。
ありがとうございました。
理由: