Errors, bugs, questions - page 1311

 
Ivan Vagin:

Now the site opens but, no pictures are visible

And when I try to open the attached file.

The problem persists.

Unfortunately, older devices do not support the secure connection used on our web servers.

We recommend the following options:

  1. if possible update your Android version
  2. Use a different browser (Chrome for instance)
  3. Update your device
 
Alexandr Bryzgalov:

Only in pairs.

Here is the code(old style), it can be improved:

Thanks for the tip, but the script itself is there to close overlapped orders!

I am interested in realization of this through the terminal feature itself!

Files:
 
murad:

Unfortunately older machines do not support the secure connection used on our web servers.

We recommend the following options:

  1. if possible update your Android version
  2. Use a different browser (Chrome for example)
  3. update your device

I can't see the adverts either.

 
When the "Trace Trades on the Chart" option is enabled - should the trace automatically appear on the chart or should I perform additional actions? Terminal MetaTrader 5 build 1135.
 

I got one broker with exchange execution.

My Expert Advisor uses a standard library.

When I run it, I see in my Expert Advisor's log that a command has been triggered

         trade.PositionOpen(_Symbol,// инструмент
                            ORDER_TYPE_BUY,// 
                            inLot,// количество лотов для торговли
                            ask,// последняя цена  ask
                            0.0,// Stop Loss
                            0.0,// Take Profit 
                            " ");                                             // без комментариев  

But there is nothing in the terminal log. I do some digging in the library. Found this.

   if(!FillingCheck(symbol))
      return(false);

It crashes here.

I have searched further and got to this.

         //--- wrong filling policy, set error code
         m_result.retcode=TRADE_RETCODE_INVALID_FILL;
         return(false);

I came back and found this

//--- get possible filling policy types by symbol
   uint filling=(uint)SymbolInfoInteger(symbol,SYMBOL_FILLING_MODE);

Returns 0.

Took a call to this broker's support staff.

They told me.

"If you set exchange execution in your Expert Advisor, disable type check.

I don't know what to do with it. I should ask my broker what kind of error I have in my brokerage brokerage deal.

 
Alexey Klenov:

I got one broker with exchange execution.

My Expert Advisor uses the standard library.

When I run it, I see in my Expert Advisor's log that a command has been triggered

But there is nothing in the terminal log. I do some digging in the library. Found this.

It crashes here.

I have searched further and got to this.

I came back and found this

Returns 0.

Tried to talk to this broker's support staff.

They told me.

"If you set exchange execution in your Expert Advisor, disable type check.

I don't know what to do with it. I should ask my broker what kind of error I have in my brokerage brokerage deal.

Tryusing OrderSend() instead oftrade.PositionOpen()
 
Михаил:
Tryusing OrderSend() instead oftrade.PositionOpen()
         MqlTradeRequest req;
         req.action=TRADE_ACTION_DEAL;       // Тип выполняемого действия
         req.symbol=_Symbol;                 // Имя торгового инструмента
         req.volume=inLot;                   //Запрашиваемый объем сделки в лотах
         req.type=ORDER_TYPE_BUY;            //Тип ордера
         //req.type_filling=ORDER_FILLING_FOK; // Тип ордера по исполнению
         //+------------------------------------------------------------------+
         //|                                                                  |
         //+------------------------------------------------------------------+
         MqlTradeResult rez;

         OrderSend(req,rez);

2015.05.20 23:01:55.387 Trades '*********': failed exchange buy 0.10 EURUSD at market [Unsupported filling mode]

with the commented type_filling the result is the same

 
Alexey Klenov:

2015.05.20 23:01:55.387 Trades '*********': failed exchange buy 0.10 EURUSD at market [Unsupported filling mode]

MqlTradeRequest request = {0};
  MqlTradeResult  result  = {0};
   
//--- Fill structure
  request.magic = 987654321;
  request.symbol = _Symbol;
  request.volume = inLot; 
  request.type_filling = ORDER_FILLING_IOC; //Взять то, что можно взять :)
  request.type_time = ORDER_TIME_DAY;
  request.action = TRADE_ACTION_DEAL;

 request.type = ORDER_TYPE_BUY;            //Тип ордера 

  request.comment = "Рыночный ордер...";
 
Михаил:
The result is the same
 
Alexey Klenov:
The result is the same

Brokers to the FUCK!

Sec, I'm going to drop a check and you'll post the results...

//+------------------------------------------------------------------+
//| Expert Check Market Parametrs function                           |
//+------------------------------------------------------------------+
bool CheckMarketParam( const string a_symbol )
{
//--- Check for full mode
  long trade_mode = long( SymbolInfoInteger( a_symbol, SYMBOL_TRADE_MODE ) );
  
  if ( ( SYMBOL_TRADE_MODE_FULL & trade_mode ) != SYMBOL_TRADE_MODE_FULL )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает полную торговлю!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
//--- Check trade execution mode
  long market_info = long ( SymbolInfoInteger( a_symbol, SYMBOL_TRADE_EXEMODE ) );
    
  if ( market_info != SYMBOL_TRADE_EXECUTION_EXCHANGE )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает TRADE EXECUTION EXCHANGE режим!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
//--- Check orders mode
  int order_mode = int( SymbolInfoInteger( a_symbol, SYMBOL_ORDER_MODE ) );
  
  if ( ( SYMBOL_ORDER_MARKET & order_mode )!= SYMBOL_ORDER_MARKET )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает Market Execution режим установки ордеров!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
  
  if ( ( SYMBOL_ORDER_LIMIT & order_mode )!= SYMBOL_ORDER_LIMIT )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает Limit режим установки ордеров!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
  
  if ( ( SYMBOL_ORDER_STOP_LIMIT & order_mode ) != SYMBOL_ORDER_STOP_LIMIT )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает Stop Limit режим установки ордеров!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
  
  if ( ( SYMBOL_ORDER_STOP & order_mode )!= SYMBOL_ORDER_STOP )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает Stop режим установки ордеров!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
  
  if ( ( SYMBOL_ORDER_SL & order_mode) != SYMBOL_ORDER_SL )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает Stop Loss режим установки ордеров!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
  
  if ( ( SYMBOL_ORDER_TP & order_mode) != SYMBOL_ORDER_TP )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает Take Profit режим установки ордеров!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
//---Filing mode
  int filling_mode = int( SymbolInfoInteger( a_symbol, SYMBOL_FILLING_MODE ) );
  
  if ( ( SYMBOL_FILLING_IOC & filling_mode ) != SYMBOL_FILLING_IOC )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает filling IOC режим исполнения ордеров!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
  
  if ( ( SYMBOL_FILLING_FOK & filling_mode ) != SYMBOL_FILLING_FOK )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает filling IOC режим исполнения ордеров!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }      
//---Ckeck expiration
  int symbol_exp_type = int( SymbolInfoInteger( a_symbol, SYMBOL_EXPIRATION_MODE ) );
  
  if ( ( symbol_exp_type & SYMBOL_EXPIRATION_DAY ) != SYMBOL_EXPIRATION_DAY )
  {
    MessageBox( "Символ " + a_symbol + " не поддерживает экспирацию DAY!", "Ошибка", MB_OK | MB_ICONHAND );
    return( false );
  }
  return( true );
}
Reason: