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

 
Artyom Trishkin :

여기에 전화하는 것은 작동하지 않습니다. 그는 스마트 폰 및 기타 새로운 장치 를 사용하지 않습니다. Smolny의 전화가 있습니다 ...

같은 생각을 가진 사람이 한 명 이상 발견되었습니다. 나는 또한 이러한 모든 가제트와 소셜 네트워크를 무시합니다. 크렘린에서 전화가 없습니다 ...

 

고통받는 인용문.

 //+------------------------------------------------------------------+
void OpenSell()
  {

   m_symbol.Name( "EURUSD" );
   RefreshRates ();
   if (m_trade.Sell(InpLots, "EURUSD" ,m_symbol. Bid (), 0.0 , 0.0 ))
     {
       if (m_trade.ResultDeal()== 0 )
        {
         Print ( "#1 Sell -> false. Result Retcode: " ,m_trade.ResultRetcode(),
               ", description of result: " ,m_trade.ResultRetcodeDescription());
         PrintResultTrade(m_trade,m_symbol);
        }
       else
        {
         Print ( "#2 Sell -> true. Result Retcode: " ,m_trade.ResultRetcode(),
               ", description of result: " ,m_trade.ResultRetcodeDescription());
         PrintResultTrade(m_trade,m_symbol);
        }

     }

//---
  }
//+------------------------------------------------------------------+

이 코드에서 잘못된 것은 무엇입니까? 주문 실행 확인 결과조차 나오지 않습니다.

인용문이 있는 그런 접시만 있으면 됩니다.


 
ilvic :

고통받는 인용문.

이 코드에서 잘못된 것은 무엇입니까? 주문 실행 확인 결과조차 나오지 않습니다.

인용문이 있는 그런 접시만 있으면 됩니다.


PrintResultTrade 결과를 코드로 붙여넣습니다. 그림이 아니라 코드로.

 

전문가가 작성한 글입니다. 그는 수표 결과를 쓰지 않습니다.

 2018.11 . 02 15 : 20 : 36.769 Above (EURUSD,M1)       CTrade:: OrderSend : instant sell 1.00 EURUSD at 1.14299 [requote ( 1.14307 / 1.14317 )]

그리고 이것은 잡지를 씁니다.

2018.11.02 11:18:49.826 Network '13107230': scanning network for access points
2018.11.02 11:19:17.821 Network '13107230': scanning network finished
2018.11.02 15:20:35.846 Trades  '13107230': instant sell 1.00 EURUSD at 1.14299 (deviation: 100)
2018.11.02 15:20:36.769 Trades  '13107230': requote 1.14307 / 1.14317 (instant sell 1.00 EURUSD at 1.14299 (deviation: 100))

Metaquotes 서버 데모

 
ilvic :

전문가가 작성한 글입니다. 그는 수표 결과를 쓰지 않습니다.

그리고 이것은 잡지를 씁니다.

Metaquotes 서버 데모

PrintResultTrade 결과를 코드로 붙여넣습니다 . 그림이 아니라 코드로.


아니면 일반적으로 PrintResultTrade에 도달하지 못하고 더 일찍 버리나요?

 

이것은 ? 그렇지 않다면 무슨 말을 하고 있는지 말해 주십시오.

 //+------------------------------------------------------------------+
//| Print CTrade result                                              |
//+------------------------------------------------------------------+
void PrintResultTrade(CTrade &trade,CSymbolInfo &symbol)
  {
   Print ( "File: " , __FILE__ , ", symbol: " ,m_symbol.Name());
   Print ( "Code of request result: " + IntegerToString (trade.ResultRetcode()));
   Print ( "code of request result as a string: " +trade.ResultRetcodeDescription());
   Print ( "Deal ticket: " + IntegerToString (trade.ResultDeal()));
   Print ( "Order ticket: " + IntegerToString (trade.ResultOrder()));
   Print ( "Volume of deal or order: " + DoubleToString (trade.ResultVolume(), 2 ));
   Print ( "Price, confirmed by broker: " + DoubleToString (trade.ResultPrice(),symbol. Digits ()));
   Print ( "Current bid price: " + DoubleToString (symbol. Bid (),symbol. Digits ())+ " (the requote): " + DoubleToString (trade.ResultBid(),symbol. Digits ()));
   Print ( "Current ask price: " + DoubleToString (symbol. Ask (),symbol. Digits ())+ " (the requote): " + DoubleToString (trade.ResultAsk(),symbol. Digits ()));
   Print ( "Broker comment: " +trade.ResultComment());
  }
//+------------------------------------------------------------------+
 
ilvic :

전문가가 작성한 글입니다. 그는 수표 결과를 쓰지 않습니다.

그리고 이것은 잡지를 씁니다.

Metaquotes 서버 데모

왜 코드를 잘라? Parabolic SAR EA 코드의 여는 함수의 예

 //+------------------------------------------------------------------+
//| Open Sell position                                               |
//+------------------------------------------------------------------+
void OpenSell( double sl, double tp)
  {
   sl=m_symbol.NormalizePrice(sl);
   tp=m_symbol.NormalizePrice(tp);

   double short_lot=InpLots;
//--- check volume before OrderSend to avoid "not enough money" error (CTrade)
   double free_margin_check= m_account.FreeMarginCheck(m_symbol.Name(), ORDER_TYPE_SELL ,short_lot,m_symbol. Bid ());
   double margin_check     = m_account.MarginCheck(m_symbol.Name(), ORDER_TYPE_SELL ,short_lot,m_symbol. Bid ());
   if (free_margin_check>margin_check)
     {
       if (m_trade.Sell(short_lot,m_symbol.Name(),m_symbol. Bid (),sl,tp))
        {
         if (m_trade.ResultDeal()== 0 )
           {
             Print ( "#1 Sell -> false. Result Retcode: " ,m_trade.ResultRetcode(),
                   ", description of result: " ,m_trade.ResultRetcodeDescription());
            PrintResultTrade(m_trade,m_symbol);
           }
         else
           {
             Print ( "#2 Sell -> true. Result Retcode: " ,m_trade.ResultRetcode(),
                   ", description of result: " ,m_trade.ResultRetcodeDescription());
            PrintResultTrade(m_trade,m_symbol);
           }
        }
       else
        {
         Print ( "#3 Sell -> false. Result Retcode: " ,m_trade.ResultRetcode(),
               ", description of result: " ,m_trade.ResultRetcodeDescription());
         PrintResultTrade(m_trade,m_symbol);
        }
     }
   else
     {
       Print ( __FUNCTION__ , ", ERROR: method CAccountInfo::FreeMarginCheck returned the value " , DoubleToString (free_margin_check, 2 ));
       return ;
     }
//---
  }
 
ilvic :

이것은 ? 그렇지 않다면 무슨 말을 하고 있는지 말해 주십시오.

코드에서 확인 단계 #3을 생략했습니다.

 
Vladimir Karputov :

PrintResultTrade 결과를 코드로 붙여넣습니다 . 그림이 아니라 코드로.


아니면 일반적으로 PrintResultTrade에 도달하지 못하고 더 일찍 버리나요?

그것이 바로 주문이 실행되면 다음과 같이 인쇄되는 것입니다.

 2018.11 . 02 10 : 09 : 12.648 Above (EURUSD,M1)       # 2 Buy -> true . Result Retcode: 10009 , description of result: done at 1.14387

그리고 인용문 이 있으면 고문은 물고기처럼 침묵합니다.

그리고 난 미결 영장이 남아있어

 
ilvic :

그것이 바로 주문이 실행되면 다음과 같이 인쇄되는 것입니다.

그리고 인용문이 있으면 고문은 물고기처럼 침묵합니다.

그리고 난 미결 영장이 남았어

게시물 에서 함수의 예를 들었습니다. 할례를 받지 않았습니다. 작업의 예는 Parabolic SAR EA Expert Advisor에 있습니다.

사유: