초보자의 질문 MQL5 MT5 MetaTrader 5 - 페이지 900

 
Sile Si :

의심의 여지없이 si에 연결된 고문은 vtbr을 수정합니다.

vtbr에 어드바이저를 연결하면 si를 수정하지 않고 자체 도구에서만 작동합니다.


이에 대한 설명이 있습니까?

다음을 제외하고 코드에는 수정 사항이 없습니다.

수정 사항을 보여주는 로그 라인을 첨부하십시오(라인을 아끼지 마십시오 - 위와 아래에서 +3을 취하십시오).


추가되었습니다.

그리고 OnInit()를 보여줍니다.

 
Vladimir Karputov :

수정 사항을 보여주는 로그 라인을 첨부하십시오(라인을 아끼지 마십시오 - 위와 아래에서 +3을 취하십시오).


추가되었습니다.

그리고 OnInit()를 보여줍니다.

상황: 수동으로 T/P를 삭제하고 EA가 다시 베팅합니다.

ppn

 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가 다시 베팅합니다.

정보를 제공하십시오: 고문의 전체 텍스트, 연결 중인 서버, 잔액은 얼마인지, 터미널 빌드는 무엇입니까? 확인하고 싶습니다.

단 한 가지: MetaQuotes-Demo가 아니라 교환 서버에서 테스트하는 경우 - 여기 저 없이.

 
Vladimir Karputov :

정보를 제공하십시오: 고문의 전체 텍스트, 연결 중인 서버, 잔액은 얼마인지, 터미널 빌드는 무엇입니까? 확인하고 싶습니다.

단 한 가지: MetaQuotes-Demo가 아니라 교환 서버에서 테스트하는 경우 - 여기 저 없이.

포트스입니다. 그리고 문제가 특정 미래에 한 곳에서만 발생한다면 디버거를 거치는 것이 더 쉬울까요? 죄송합니다. 혼란스럽습니다. 디버거는 전문가에서 작동하지 않는 것 같습니다.

 
Sergey Savinkin :

포트스입니다. 그리고 문제가 특정 미래와 함께 한 곳에서만 발생한다면 디버거를 거치는 것이 더 쉬울까요?

 
Sile Si :

상황: 수동으로 T/P를 삭제하고 EA가 다시 베팅합니다.

다음 코드를 실행하십시오: ListPositions .

포지션 유형(BUY 또는 SELL)이 일치하는지, 기호 이름이 일치하는지 확인합니다. 또한 거래 서버의 이름과 터미널의 BUILD를 지정해야 합니다.

 
Vladimir Karputov :

다음 코드를 실행하십시오: ListPositions .

포지션 유형(BUY 또는 SELL)이 일치하는지, 기호 이름이 일치하는지 확인합니다. 또한 거래 서버의 이름과 터미널의 BUILD를 지정해야 합니다.

결과:

프네

open-broker build last, 1881. vtbr에서 그는 T/P=0을 설정하고 다른 사람의 도구에 - si, 그는 vtbr에 있어야 하는 T/P를 설정합니다.

Vladimir Karputov :... 교환 서버에서 - 여기 나 없이.

그리고 누구에게 연락해야 할까요?

 
Sile Si :

결과:

오픈 브로커 빌드 최신.

그리고 누구에게 연락해야 할까요?

FORTS BCS 계정이 있습니다. 어드바이저 및 설정을 버릴 수 있습니다. 조언자의 논리를 "빛나게"하고 싶지 않다면 오류를 시뮬레이션할 수 있는 한 절단 옵션을 버릴 수 있습니다. 그리고 요새는 2시간 후에 문을 닫을 것입니다.

오류를 시뮬레이션하는 방법에 대한 자세한 설명입니다.
 
Sergey Savinkin :

FORTS BCS 계정이 있습니다. 어드바이저 및 설정을 버릴 수 있습니다. 조언자의 논리를 "빛나게"하고 싶지 않다면 오류를 시뮬레이션할 수 있는 한 절단 옵션을 버릴 수 있습니다. 그리고 요새는 2시간 후에 문을 닫을 것입니다.

예, 무엇을 숨길 수 있는지, MA 입구, 평균화) 제발, PM.

내부에는 헤지 계정에서 작업하고 남은 초과분이 많이 있습니다.

 
Sile Si :

결과:

open-broker build last, 1881. vtbr에서 그는 T/P=0을 설정하고 다른 사람의 도구에 - si, 그는 vtbr에 있어야 하는 T/P를 설정합니다.

그리고 누구에게 연락해야 할까요?

설명해주셔서 감사합니다.

따라서 귀하는 제 예제와 매우 유사한 코드를 사용하고 있으므로 조언자를 보내주십시오. 이제 거래 작업 을 더 자세히 기록합니다. 코드를 보고 수정하겠습니다. 그럼 확인하겠습니다.

사유: