Errors, bugs, questions - page 1614

 
If a SellLimit in the tester is deleted due to expiry or backtest completion, its expiry date becomes erroneously equal to the date of pending order.

If you set the date of expiration through TRADE_ACTION_MODIFY, it is not triggered in the tester.

Playback
void OnInit()
{
  MqlTradeRequest Request = {0};

  Request.action = TRADE_ACTION_PENDING;
  
  Request.symbol = Symbol();
  Request.volume = 1;
  Request.price = SymbolInfoDouble(Symbol(), SYMBOL_ASK);
  
  Request.type = ORDER_TYPE_SELL_LIMIT;

  MqlTradeResult Result;
  
  if (OrderSend(Request, Result))
  {
    Request.action = TRADE_ACTION_MODIFY;
    Request.order = Result.order;
    
    Request.type_time = ORDER_TIME_SPECIFIED;
    Request.expiration = TimeCurrent() + 10000;
    
    if (OrderSend(Request, Result))
      if (OrderSelect(Request.order))
        Print("SetExpiration = " + (string)(datetime)OrderGetInteger(ORDER_TIME_EXPIRATION)); // установили дату экспирации        
  }
}

void OnDeinit( const int reason )
{  
  if (HistorySelect(0, TimeCurrent()))
  {
    const ulong Ticket = HistoryOrderGetTicket(0);
   
    if (Ticket > 0)
    {
      // Дата экспирации изменилась - стала равна дате установки ордера!
      Print("NowExpiration = " + (string)(datetime)HistoryOrderGetInteger(Ticket, ORDER_TIME_EXPIRATION));
     
      // При этом ордер по ранее установленной дате экспирации не удалился!     
      Print("DeleteTime = " + (string)(datetime)HistoryOrderGetInteger(Ticket, ORDER_TIME_DONE));
    }
  }
}

 
Andrey Dik:

Historical data takes up quite a lot of space (this is not a complaint, it's a statement). I have to use several terminals and each of them collects gigabytes of history, and the history is duplicated in tester and terminal folders.

Can we put all the history files in one folder and specify the reference folder in the terminals? Won't we have problems with access to the history between different terminals?

I've tried it. Now I have several terminals and their testers access one single folder with the history. Except for terminal complaints like:

2016.07.19 16:39:02.276 Spreads config file open error [The process cannot access the file because it is being used by another process. (32)]

2016.07.19 16:39:02.276 Spreads config file open error [*****symbols\spreads-*********.dat][The process cannot access the file because it is being used by another process. (32)]

I don't see any problems with the operation. Yay!... Hundreds of gigabytes of disk space saved!

Service Desk has warned me that there is a risk in doing this with shared data access.


 
Andrey Dik:

Tried it out. I now have several terminals and their testers accessing one single history folder. Except for terminal complaints like:

2016.07.19 16:39:02.276 Spreads config file open error [The process cannot access the file because it is being used by another process. (32)]

2016.07.19 16:39:02.276 Spreads config file open error [*****symbols\spreads-*********.dat][The process cannot access the file because it is being used by another process. (32)]

I don't see any problems with the operation. Yay!... Hundreds of gigabytes of disk space saved!

Service Desk has warned me that there is a risk in doing this with shared data access.


how did they do it?
 
coderex:
and how did you implement it?

I created a separate folder called Bases and transferred the history from one of the terminals to it. After that in all terminals and their testers instead of real folders with history I placed links like Junction to a common folder.

Particularly useful when using multiple terminals on one VPS, you can get real savings by choosing a smaller disk space.

 
I'm working in a tester offline. How do I make sure that the log is not clogged with hundreds of thousands of entries?
2016.07.21 07:48:41.578 MQL5.community  authorization failed

 
How did the standard library manage to avoid calling ::OrdersTotal() ?
 
fxsaber:
I'm working in a tester offline. How can I make sure that the log is not clogged with hundreds of thousands of entries?

In the community settings(Main Menu - Tools - Settings - Community tab) erase your authorization data
 
Slawa:
In the community settings (Main menu - Tools - Settings - Community tab), erase your authorisation data.
I have never entered them there. That's not the point.
 

Aren't there any trading panels? Or which group should they be placed in?

 
Vladimir Pastushak:

Aren't there any trading panels? Or which group do they belong to?

The utilities must be selected. It's true that there are no categories there at all.