初学者的问题 MQL5 MT5 MetaTrader 5 - 页 900

 
Sile Si:

毫无疑问,附属于si的顾问修改了vtbr

如果你把一个EA附加到vtbr上,它不会修改si,它只在自己的工具上工作。


你对此有什么解释吗?

除了这个,代码中没有任何修改。

附上显示修改的日志行(不要放过任何一行--从顶部和底部取+3)。


已添加。

并显示OnInit()。

 
Vladimir Karputov:

附上显示修改内容的日志行(不要放过这些行--在顶部和底部取+3)。


已添加。

并显示OnInit()。

情况:我手动删除了T/R,EA又把它放了进去。

新民主党

int OnInit()
  {
   if(!MQLInfoInteger(MQL_TRADE_ALLOWED))
     {
      //Alert("Automated trading is forbidden in the program settings for ",__FILE__);
      return(false);
     }
   входить=входить_;
   handle_iCustom=iATR(Symbol(),ATRtimeframe,ATRper);
   if(handle_iCustom==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iCustom indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }

//
   handle_iCustom_2=iATR(Symbol(),ATRtimeframeStep,ATRperStep);

   if(handle_iCustom_2==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iCustom indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//

   handle_iMA=iMA(Symbol(),Time_Frame_MA,Period_MA,0,MODE_SMA,PRICE_CLOSE);
//--- if the handle is not created 
   if(handle_iMA==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  Symbol(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }

   m_hline_name_buy=Symbol()+" "+m_hline_name_buy;
// m_hline_name_sell=Symbol()+" "+m_hline_name_sell;

   HLineCreate(0,m_hline_name_buy,0,0.0,clrLime,2);
//---
//---
   if(InpLot<=0.0)
     {
      Print("The \"Lot\" can't be smaller or equal to zero");
      return(INIT_PARAMETERS_INCORRECT);
     }
//---
   if(!m_symbol.Name(Symbol())) // sets symbol name
      return(INIT_FAILED);
   RefreshRates();

   string err_text="";
   if(!CheckVolumeValue(InpLot,err_text))
     {
      Print(err_text);
      return(INIT_PARAMETERS_INCORRECT);
     }
//---
   m_trade.SetExpertMagicNumber(m_magic);
//---
   if(IsFillingTypeAllowed(SYMBOL_FILLING_FOK))
      m_trade.SetTypeFilling(ORDER_FILLING_FOK);
   else if(IsFillingTypeAllowed(SYMBOL_FILLING_IOC))
      m_trade.SetTypeFilling(ORDER_FILLING_IOC);
   else
      m_trade.SetTypeFilling(ORDER_FILLING_RETURN);
//---
   m_trade.SetDeviationInPoints(m_slippage);
//--- tuning for 3 or 5 digits
   int digits_adjust=1;
   if(m_symbol.Digits()==3 || m_symbol.Digits()==5)
      digits_adjust=10;
   m_adjusted_point=m_symbol.Point()*digits_adjust;
   ExtZeroLevel=InpZeroLevel*m_adjusted_point;
   ExtTrailingStop=InpTrailingStop*m_adjusted_point;
   ExtTrailingStep=InpTrailingStep*m_adjusted_point;
//-
   ExtTakeProfit=TakeProfit*m_adjusted_point;
   ExtSL=StopLoss*m_adjusted_point;
   ExtStep=InpStep*m_symbol.Point();
//---
   return(INIT_SUCCEEDED);
  }
 
Sile Si:

情况:我手动删除了T/P,EA又被打开了。

请提供信息:EA的全文,你在哪个服务器上连接,有多少余额,终端是什么结构。我想检查一下。

只有一件事:如果你不是在MetaQuotes-Demo上测试,而是在Exchange服务器上测试--这里没有我。

 
Vladimir Karputov:

请给我一些信息:EA的全文,你连接到哪个服务器,余额是多少,终端的哪个版本。我想检查一下。

只有一件事:如果你不是在MetaQuotes-Demo上测试,而是在交易所服务器上测试,这里没有我。

这就是FORTS。而如果问题只发生在一个地方和一个特定的期货,也许通过调试器会更容易?对不起,我弄糊涂了。似乎调试器对专家顾问系统不起作用。

 
Sergey Savinkin:

这就是FORTS。而如果问题只发生在一个地方和一个特定的期货,也许通过调试器会更容易?

 
Sile Si:

情况:我手动删除T/P,顾问把它放回去。

请运行以下代码:ListPositions.

检查仓位类型(买入或卖出)和符号名称是否匹配。还需要指定交易服务器的名称和终端的BILD。

 
Vladimir Karputov:

请运行以下代码:ListPositions.

检查仓位类型(买入或卖出)和符号名称是否匹配。还需要指定交易服务器名称和终端的BILD。

结果。

rn

公开交易商 建立最后,1881年。在vtbr上设置T/R=0,在别人的仪器si上,设置T/R,这应该是在vtbr上。

弗拉基米尔-卡尔普托夫:。在交换服务器上 - 这里没有我。

针对谁?

 
Sile Si:

结果。

开放式经纪商 最后建立。

我应该与谁联系?

我在FORTS bx有一个账户。你能把EA和它的设置发给我吗?如果你不想 "点亮 "EA的逻辑,你可以给我发送任何切割版本,只要你能模拟出一个错误。而堡垒将在两小时后关闭。

并详细介绍了如何模拟出错的情况。
 
Sergey Savinkin:

我有一个FORTS bx账户。你能把EA和设置发给我吗?如果你不想让EA的逻辑变得 "轻巧",你可以抛出任何切割版本,只要你能模拟出错。而Forts将在两小时后关闭。

隐瞒什么,入口处由MA,平均)看看PM,请。

里面有很多多余的东西,是在对冲账户上工作时留下的。

 
Sile Si:

结果。

公开交易商 建立最后,1881年。在vtbr上把T/P=0,在别人的工具si上把T/P放在vtbr上。

我应该与谁联系?

谢谢你的澄清。

如果你使用的代码与我的例子非常相似,请把你的EA发给我。我现在正在更详细地记录交易。我将查看并修复代码。我以后会检查的。