任何菜鸟问题,为了不给论坛添乱。专业人士,不要路过。没有你就无处可去 - 6. - 页 809

 
pycha:

我的问题是:我可以在启动EA时将这个图片改为我的标志吗?

#属性 图标"\\\\Images\\xxx.ico"。
 
evillive:
#属性图标"\\\\Images\\\\xxx.ico"。

而且,在编译后,图标文件将被嵌入到*.ex4文件中,不需要在编译文件后移动 图标文件
 
谢谢你))))
 
roymax:
而它没有以任何方式被修复?

正如你所看到的。

然而,最合理和最简单的代理方式是禁止MT窗口工具的改变。所以我建议我们把它看作是一个错误 :)

 
我的专家顾问分析了若干个月的图表,但有的图表在一分钟的图表上返回整个历史,有的图表不显示超过一个半月,即使是这样,如果 手动向后滚动图表,它甚至不滚动超过某个日期。
 
pycha:
我的专家顾问分析了一定月数的图表,但有的图表在分钟图中返回整个历史,有的图表不想返回超过一个半月的时间,即使是这样,如果你手动滚动图表,甚至超过某个日期也不会手动滚动。
经纪人决定到底要给多少历史。如果在终端设置中设置了最大条数,而图表上的条数较少,那么经纪人就不会给更多。
 
我明白了,谢谢你。
 

亲爱的论坛用户,你们好。我想提出一个请求。有谁能贴出一段有工作的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 的代码吗?
谢谢你!