Errors, bugs, questions - page 565

 
VovkaSOL:
Good afternoon, started to write multivariant, I call iMA, for some reason in the real trade everything works fine, as soon as I run in the tester an error expert removed because indicator 'Moving Average' cannot load [4804], what is the indicator on the indicator, not very clear, I could not find a plausible answer on the Internet. Please advise, I would be very grateful to you.
This error indicates that the symbol is not selected in the Market Watch window of the tester and therefore the Expert Advisor cannot create an indicator for the right symbol. You need to programmatically create a list of symbols which will work with the Expert Advisor
 
sergey1294:
This error indicates that the symbol is not selected in the Market Watch window of the tester and therefore the Expert Advisor cannot create an indicator using the right symbol. You must programmatically create a list of symbols which will work with the Expert Advisor
Isn't it enough? SymbolSelect(SYM,true) I do when I create classes for symbols. I tried it on demo, it works, but in tester I got this error, I don't know where to look.
 
VovkaSOL:
Isn't this enough? SymbolSelect(SYM,true) I do when creating classes for symbols. When I run it on demo, everything works, in tester there is an error, I don't know where to look.

Can I see a more complete example? The point is that there is a very old problem with symbol selection in the tester, which occurs in certain situations.

I select symbols based on a pre-prepared array, no problems with this approach.

Документация по MQL5: Получение рыночной информации / SymbolSelect
Документация по MQL5: Получение рыночной информации / SymbolSelect
  • www.mql5.com
Получение рыночной информации / SymbolSelect - Документация по MQL5
 

Updated the terminal. I can't identify this RESULT.RETCODE

 

History download hangs at 52% for EUR... Apparently there are a lot of requests to the servers.

 
Can someone explain the simplest thing to me, though? Why is the indicator suddenly showing signs of life at the weekend? There are no ticks, no obvious cycles, timers and other multi-triggered constructions delayed in time, and Print is littering the Expert log every five minutes.
 

Holy shit!!! This EGlobal thing is killing me with its reconnections at night! It was so annoying that I switched off the audible alerts. Now I accidentally remembered, turned it on - and yes: pseudoticks are generated at each reconnection, and hence Print from OnCalculate feeds the log.

OK, at least that's sorted out.

 

Gentlemen, can you tell me where the problem might be.

There is a function to close the entire order volume for a symbol. The terminal is flooded with errors of such content:

2011.11.12 13:34:28 2011.10.10 04:01:07 failed instant sell 0.20 EURUSD at 1.34542 [Invalid request]

Here is the function code:

void CloseOrders (string symbol)
  {
   double lot;
   long direction;
   ENUM_ORDER_TYPE TypeOrder;
   MqlTradeRequest mrequest;    // Будет использоваться для отсылки торговых запросов
   MqlTradeResult mresult;      // Будет использоваться для получения результатов выполнения торговых запросов

   PositionSelect(symbol);
   lot=PositionGetDouble(POSITION_VOLUME);
   if(lot==0)
      return;

  direction=PositionGetInteger(POSITION_TYPE);

   if(direction==POSITION_TYPE_BUY)
     {
      TypeOrder=ORDER_TYPE_SELL;
      mrequest.price=SymbolInfoDouble(symbol,SYMBOL_ASK);              // последняя цена ask     
     }
   else
     {
      TypeOrder=ORDER_TYPE_BUY;
      mrequest.price=SymbolInfoDouble(symbol,SYMBOL_BID);              // последняя цена bid
     }
     
   mrequest.action=TRADE_ACTION_DEAL;                                       // немедленное исполнение
   mrequest.sl = 0;  //NormalizeDouble(latest_price.ask - STP*_Point,_Digits); // Stop Loss
   mrequest.tp = 0;  //NormalizeDouble(latest_price.ask + TKP*_Point,_Digits); // Take Profit
   mrequest.symbol=symbol;                                                  // символ
   mrequest.volume=lot;                                                     // количество лотов для закрытия
   //   mrequest.magic=magic;                                               // Magic Number
   mrequest.type = TypeOrder;                                               // ордер на покупку или продажу
   //mrequest.type_filling = ORDER_FILLING_AON;                             // тип исполнения ордера - все или ничего
   mrequest.deviation=100;                                                  // проскальзывание от текущей цены
   mrequest.comment="Закрытие ";  
   OrderSend(mrequest, mresult);                                            // комментарий
   return;
  }
 

There are errors after I updated my terminal version:

2011.11.12 19:20:14 Core 1 2011.02.21:44:00 failed buy stop 8.81 EURUSD at 1.36996 (0.00000) sl: 1.36626 tp: 1.37683 [Invalid request]

2011.11.12 19:24:29 Core 1 2011.02.25 02:10:00 failed instant buy 51.88 EURUSD at 1.38164 sl: 1.37794 tp: 1.38260 [Invalid request]

What could be the problem?

Everything was working before.

 
MoneyJinn:

There are errors after I updated my terminal version:

2011.11.12 19:20:14 Core 1 2011.02.21:44:00 failed buy stop 8.81 EURUSD at 1.36996 (0.00000) sl: 1.36626 tp: 1.37683 [Invalid request]

2011.11.12 19:24:29 Core 1 2011.02.25 02:10:00 failed instant buy 51.88 EURUSD at 1.38164 sl: 1.37794 tp: 1.38260 [Invalid request]

What could be the problem?

Everything was working before.

The problem with the opening price is evident. Write to Service Desk.
Общайтесь с разработчиками через Сервисдеск!
Общайтесь с разработчиками через Сервисдеск!
  • www.mql5.com
Ваше сообщение сразу станет доступно нашим отделам тестирования, технической поддержки и разработчикам торговой платформы.
Reason: