오류, 버그, 질문 - 페이지 1739

 

SB를 통한 주문 수정은 교환에서 작동하지 않는다는 것을 올바르게 이해하고 있습니까?

//+------------------------------------------------------------------+
//| Modify specified pending order                                   |
//+------------------------------------------------------------------+
bool CTrade:: OrderModify ( const ulong ticket, const double price, const double sl, const double tp,
                         const ENUM_ORDER_TYPE_TIME type_time, const datetime expiration, const double stoplimit)
  {
//--- check stopped
   if ( IsStopped ( __FUNCTION__ ))
       return ( false );
//--- clean
   ClearStructures();
//--- setting request
   m_request.action      = TRADE_ACTION_MODIFY ;
   m_request.magic       =m_magic;
   m_request.order       =ticket;
   m_request.price       =price;
   m_request.stoplimit   =stoplimit;
   m_request.sl          =sl;
   m_request.tp          =tp;
   m_request.type_time   =type_time;
   m_request.expiration  =expiration;
//--- action and return the result
   return ( OrderSend (m_request,m_result));
  }

채우기가 설정되지 않았습니다.

 
모든 거래 서버의 SB
//+------------------------------------------------------------------+
//| Get the property value "ORDER_TYPE_FILLING"                      |
//+------------------------------------------------------------------+
ENUM_ORDER_TYPE_FILLING COrderInfo::TypeFilling( void ) const
  {
   return (( ENUM_ORDER_TYPE_FILLING ) OrderGetInteger ( ORDER_TYPE_FILLING ));
  }

ALWAYS는 테스터에서 ENUM_ORDER_TYPE_FILLING::ORDER_FILLING_ RETURN 을 반환합니다.

fxsaber :

채우기가 설정되지 않았습니다.

따라서 COrderInfo::TypeFilling()을 통해 OrderModify에 채우기가 지정된 경우 동일한 RoboForexEU-MetaTrader 5에서 [Unsupported filling mode] 논리적 오류가 발생합니다. 그러나 MetaQuotes-Demo에서는 이 오류가 발생하지 않습니다. 개발자의 서버가 잘못 구성되어 있습니까?


 
fxsaber :

SB를 통한 주문 수정은 교환에서 작동하지 않는다는 것을 올바르게 이해하고 있습니까?

//+------------------------------------------------------------------+
//| Modify specified pending order                                   |
//+------------------------------------------------------------------+
bool CTrade:: OrderModify ( const ulong ticket, const double price, const double sl, const double tp,
                         const ENUM_ORDER_TYPE_TIME type_time, const datetime expiration, const double stoplimit)
  {
//--- check stopped
   if ( IsStopped ( __FUNCTION__ ))
       return ( false );
//--- clean
   ClearStructures();
//--- setting request
   m_request.action      = TRADE_ACTION_MODIFY ;
   m_request.magic       =m_magic;
   m_request.order       =ticket;
   m_request.price       =price;
   m_request.stoplimit   =stoplimit;
   m_request.sl          =sl;
   m_request.tp          =tp;
   m_request.type_time   =type_time;
   m_request.expiration  =expiration;
//--- action and return the result
   return ( OrderSend (m_request,m_result));
  }

채우기가 설정되지 않았습니다.

당황할 필요 없음!

class CTrade : public CObject
  {
protected :
   MqlTradeRequest    m_request;         // request data
   MqlTradeResult     m_result;           // result data
   MqlTradeCheckResult m_check_result;   // result check data
   bool               m_async_mode;       // trade mode
   ulong              m_magic;           // expert magic number
   ulong              m_deviation;       // deviation default
   ENUM_ORDER_TYPE_FILLING m_type_filling;
   ENUM_ACCOUNT_MARGIN_MODE m_margin_mode;
   //---
   ENUM_LOG_LEVELS   m_log_level;

public :
 
Alexey Kozitsyn :

당황할 필요 없음!

//+------------------------------------------------------------------+
//| Modify specified pending order                                   |
//+------------------------------------------------------------------+
bool CTrade:: OrderModify ( const ulong ticket, const double price, const double sl, const double tp,
                         const ENUM_ORDER_TYPE_TIME type_time, const datetime expiration, const double stoplimit)
  {
//--- check stopped
   if ( IsStopped ( __FUNCTION__ ))
       return ( false );
//--- clean
   ClearStructures();

//--- setting request
   m_request.action      = TRADE_ACTION_MODIFY ;
   m_request.magic       =m_magic;
   m_request.order       =ticket;
   m_request.price       =price;
   m_request.stoplimit   =stoplimit;
   m_request.sl          =sl;
   m_request.tp          =tp;
   m_request.type_time   =type_time;
   m_request.expiration  =expiration;
//--- action and return the result
   return ( OrderSend (m_request,m_result));
  }
 
fxsaber :
//+------------------------------------------------------------------+
//| Modify specified pending order                                   |
//+------------------------------------------------------------------+
bool CTrade:: OrderModify ( const ulong ticket, const double price, const double sl, const double tp,
                         const ENUM_ORDER_TYPE_TIME type_time, const datetime expiration, const double stoplimit)
  {
//--- check stopped
   if ( IsStopped ( __FUNCTION__ ))
       return ( false );
//--- clean
   ClearStructures();

//--- setting request
   m_request.action      = TRADE_ACTION_MODIFY ;
   m_request.magic       =m_magic;
   m_request.order       =ticket;
   m_request.price       =price;
   m_request.stoplimit   =stoplimit;
   m_request.sl          =sl;
   m_request.tp          =tp;
   m_request.type_time   =type_time;
   m_request.expiration  =expiration;
//--- action and return the result
   return ( OrderSend (m_request,m_result));
  }

중지하지만 수정할 때 채우기 유형을 지정하는 이유는 무엇입니까?

문서에서:

StopLoss 및/또는 TakeProfit 수준을 수정하기 위한 거래 주문. 4(cant :)) 필드는 필수 항목입니다.

  • 행동
  • 기호
  • 티피
  • 위치
 
Alexey Kozitsyn :

중지하지만 수정할 때 채우기 유형을 지정하는 이유는 무엇입니까?

문서에서:

기록된 모든 것을 믿지 마십시오. 표시해야 합니다. 그렇지 않으면 작동하지 않습니다.

SB를 사용할 수 없습니다. 그러나 거래소에서 OrderModify를 시도하여 버그인지 확인할 수 있습니다.

 
fxsaber :

기록된 모든 것을 믿지 마십시오. 표시해야 합니다. 그렇지 않으면 작동하지 않습니다.

완전 공감하지만..

SB를 사용할 수 없습니다. 그러나 거래소에서 OrderModify를 시도하여 버그인지 확인할 수 있습니다.

그러나 MQ는 문서에 예제를 추가했습니다. 거기에 표시되지 않았습니다...

증권 거래소에서 일하고 다음 코드를 사용하는 내가 작성한 Expert Advisor 도 있습니다.

         //--- Модифицируем ордер
         trade. OrderModify ( order.Ticket(), order.PriceOpen(), newSl, newTp, order.TypeTime(), 0 );
 
Alexey Kozitsyn :

그러나 MQ는 문서에 예제를 추가했습니다. 거기에 표시되지 않았습니다...

잘못된 사람들. 도크와 SB를 모두 편집해야 합니다.

알렉세이 코지친 :

증권 거래소에서 일하고 다음 코드를 사용하는 내가 작성한 Expert Advisor 도 있습니다.

         //--- Модифицируем ордер
         trade. OrderModify ( order.Ticket(), order.PriceOpen(), newSl, newTp, order.TypeTime(), 0 );

그리고 테스터에서?

 
fxsaber :
잘못된 사람들. 도크와 SB를 모두 편집해야 합니다.
먼저 거래소에서 주문을 수정하고 나서야 말을 하려고 합니다.
 
fxsaber :

잘못된 사람들. 도크와 SB를 모두 편집해야 합니다.

그리고 테스터에서?

이미 설정된 주문과 함께 작동합니다. 테스터에서 경주하지 않았습니다.