Errors, bugs, questions - page 2402

 
fxsaber:

Yes.


I can't understand why my stats don't show up correctly.

I open a regular mt4 file and biblio. all orders are shown as buylimit

I will have to do some more digging.

 
Vladislav Andruschenko:

I can't understand why my stats are not displayed correctly.

The history will be displayed correctly only on hedge accounts. On netting the history (the rest of the functionality works 100%) is not done - I haven't got around to it.

 
fxsaber:

The history will be displayed correctly only on hedge accounts. The history on netting accounts (the rest of the functionality works 100%) has not been done - I haven't got around to it.


I have not got time to do it on hedge accounts.

Ok, maybe I did something wrong. I'll check...

I always bang my head against the wall when I do something...

 
Vladislav Andruschenko:


on the hedge and I'm checking.

OK, maybe I did something wrong. I'll check...

I always bang my head against the wall when I do something...

#include <MT4Orders.mqh>

void OnStart()
{
  for (int i = OrdersHistoryTotal() - 1; i >= 0; i--)
    if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))
      OrderPrint();
}
 
Vladislav Andruschenko:

Does MT4Orders work with history?

It works except when a ticket order is selected from the history,when this ticket was remembered at the time it was placed as a pending order.

 
Ilya Malev:

Works except when a ticket order is selected from the history, when the ticket has been remembered at the time it was placed as a pending order.


So I noticed that when selecting positions by ticket - there is some delay.

I try to use it in an indicator.

I've been trying to use it in the indicator, it displays incorrectly at first launch. I do not know what to do with it.

I am trying to figure it out.

 
fxsaber:

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2019.03.11 18:09

#include <MT4Orders.mqh>

#define Ask SymbolInfoDouble(_Symbol, SYMBOL_ASK)

void OnTick()
{
  if ((int)Ask != Ask) // Дождались дробной цены
  {
    Print(OrderSend(_Symbol, OP_BUY, 1, Ask, 100, 0, 0)); // Тестер не даст сделать BUY по Ask - ошибка TickSize-настроек.
    Print(OrderSend(_Symbol, OP_BUY, 1, 0, 100, 0, 0));   // 0 - прокатит, т.к. настройки символа для маркет-ордеров позволяют.
    
    ExpertRemove();
  }
}
MT4Orders has no effect on trade request settings. What the user has entered is what is sent. It is the same as with MT5-OrderSend.
2018.12.03 00:56:01   failed market buy 1.00 NI225 [Invalid price]
2018.12.03 00:56:01   -1
2018.12.03 00:56:01   market buy 1.00 NI225 (22489.84 / 22722.15)
2018.12.03 00:56:01   deal #2  buy 1.00 NI225 at 22722.15 done (based on order #2)
2018.12.03 00:56:01   deal performed [#2  buy 1.00 NI225 at 22722.15]
2018.12.03 00:56:01   order performed buy 1.00 at 22722.15 [#2  buy 1.00 NI225 at 22722.15]
2018.12.03 00:56:01   2
2018.12.03 00:56:01   ExpertRemove() function called

Thanks for the test case. What version of the build is it? I'm in no hurry to upgrade to the latest (as there are a lot of complaints). I get this kind of output.

failed market buy 1.00 NI225 [Invalid price]
-1
failed market buy 1.00 NI225 [Invalid price]
-1
ExpertRemove() function called
Then it's a bug. I'll have to exclude the ticker from the tests.
 
Stanislav Korotky:

Thanks for the test case. What version of the build? I'm in no hurry to upgrade to the latest (as there are a lot of complaints).

2007. I use fresh builds, as old bugs are fixed and I don't notice new ones.

 
Ilya Malev:

Works except when a ticket order is selected from the history,when that ticket was remembered at the time it was placed as a pending order.

Because if part of the position is closed, the remaining part does not change its ticket - a feature of MT5.

 
What is the way to see the charts of all the instruments used and the trades on them after the multi-currency test?
Reason: