Errors, bugs, questions - page 922

 
sergeev:
F9 on your brokerage terminal is broken?

In the video https://www.youtube.com/watch?v=uEGd4g8xK40 I tried to show that by F9 everything works.
I might be missing something... You write about DC (dealing centre)
I am trying to work on MT5 demo account with broker Otkritie.
Today I searched for who else works (what brokers) on MT5 with futures... I couldn't find any Russian broker ... All demos, all demos...

 
Rone:

2. There is a class that has this method:

File name is a property and it is assigned a value during object initialization. That is, when the method is called, we open the file, read it line by line, and as soon as we find a suitable line, we return its substring. If the file is not opened or there is no matching string, we return the string that was fed to the input.

If we call the method once, everything works. But if you call several times in a row - it works only the first time, while the second and subsequent attempts to open the file - INVALID_HANDLE (checked with print). What could be the problem?

The file is not always closed when the function exits.
 
На видео  https://www.youtube.com/watch?v=uEGd4g8xK40 я постарался показать что по F9 все работает.

If the time is set during normal order setting by F9,

then the time is also set in the programmatic way from MQL5.

Therefore, look for an error. Make an order, make logs and shout.

But nothing depends on the brokerage company in this case, since everything works out by F9.

 


Dear developers, this is what it was a year ago


https://www.mql5.com/ru/forum/1931/17217#comment_17217

Lari333:

Hello.

2. When I set an order programmatically with the expiration parameter, the order is not set and gives error 10022 (Invalid expiry date in the request)

request.action=TRADE_ACTION_PENDING;
request.symbol=Symbol();
request.volume=Lots;
request.price=NormalizeDouble(Price,Digits);
request.sl=NormalizeDouble(Loss,Digits);
request.tp=NormalizeDouble(Take,Digits);
request.type=ORDER_TYPE_SELL_LIMIT;
request.magic=MagicNumber;
request.type_time=ORDER_TIME_SPECIFIED;
request.expiration=TimeTradeServer()+5*60*kol5ot;
OrderSend(request,result);

I have to modify the order set without expiration and the expiration date will be accepted.

OrderSelect(ticket);
request.symbol=Symbol();
request.volume=OrderGetDouble(ORDER_VOLUME_INITIAL);
request.price=OrderGetDouble(ORDER_PRICE_OPEN);
request.sl=OrderGetDouble(ORDER_SL);
request.tp=OrderGetDouble(ORDER_TP);
request.type=ORDER_TYPE_SELL_LIMIT;
request.magic=MagicNumber;
request.order=ticket;
request.action=TRADE_ACTION_MODIFY;
request.type_time=ORDER_TIME_SPECIFIED;
request.expiration=TimeTradeServer()+5*60*kol5ot;
OrderSend(request,result);


Does it look like it's still there?

Expiration. Проблема с результатами
Expiration. Проблема с результатами
  • www.mql5.com
При оформлении запроса на установку отложенного ордера пробую использовать такую конструкцию:.
 
sergeev:


Dear developers, this is what happened a year ago.


https://www.mql5.com/ru/forum/1931/17217#comment_17217


It looks like it's still there, doesn't it?

Just checked with a slight modification of the attached example. The pendulum is displayed normally.

//--- input parameters
input bool     use_expir=true;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   MqlTradeRequest request;
   MqlTradeResult result;
   double Lots=0.1;
   double Price=SymbolInfoDouble(_Symbol,SYMBOL_BID)+1000*SymbolInfoDouble(_Symbol,SYMBOL_POINT);
   double Loss=Price+1000*SymbolInfoDouble(_Symbol,SYMBOL_POINT);
   double Take=Price-1000*SymbolInfoDouble(_Symbol,SYMBOL_POINT);
   int MagicNumber=55555;
   int kol5ot=PeriodSeconds(PERIOD_D1);
//---
   request.action=TRADE_ACTION_PENDING;
   request.symbol=Symbol();
   request.volume=Lots;
   request.price=NormalizeDouble(Price,_Digits);
   request.sl=NormalizeDouble(Loss,_Digits);
   request.tp=NormalizeDouble(Take,_Digits);
   request.type=ORDER_TYPE_SELL_LIMIT;
   request.magic=MagicNumber;
   request.type_time=ORDER_TIME_SPECIFIED;
   request.expiration=TimeTradeServer()+5*60*kol5ot;
   if(OrderSend(request,result))
     {
      PrintFormat("OrderSend for %s returned true. Expiration date = %s", EnumToString(request.type), TimeToString(request.expiration));
     }
  }
//+------------------------------------------------------------------+

Output to the Experts Journal

2013.01.22 16:11:00     Experts AutoTrading is enabled
2013.01.22 16:16:15     CheckExpirationinOrders (EURUSD,H1)     OrderSend for ORDER_TYPE_SELL_LIMIT returned true. Expiration date = 2013.11.18 13:16
 

Nikos52 , Run and debug the top script

If you get an error 1022 - then write to Service Desk with all your broker's details.

 
sergeev:

Nikos52 , Run and debug the top script

If you get an error 1022 - then write to Service Desk with all your broker's details.

Sorry, I don't really know the lingo - what do you mean "debug" - is that from the word debug ? :)
 
Nikos52:
Is that from the word debug ? :)

yes

now you know the slang :)

 
sergeev:
Yeah

Oil painting and the view from the side...

I have just talked to the "rescuers" of the broker - they say that this error is only on demo accounts, they say it will not happen on real ones.
But how do I write an EA and test it on the history? - Well, we are deciding, we are corresponding with the developers.

It's like the old anecdote about the madhouse... If you learn to swim, we'll put water in the pool.

 
Nikos52:

I have just talked to the broker's "rescuers" and they say that this error is only on demo accounts and it will not happen on real accounts.

If you have a problem with the F9 in the demo accounts, but not with MQL5, send a request to Service Desk on the forum with all the logs and a description of what the problem is .

Общайтесь с разработчиками через Сервисдеск!
Общайтесь с разработчиками через Сервисдеск!
  • www.mql5.com
Ваше сообщение сразу станет доступно нашим отделам тестирования, технической поддержки и разработчикам торговой платформы.
Reason: