MT4-Tester VS MT5-Tester - page 4

 
fxsaber:

I'm not going to argue. I ask forum users familiar with MQL4 to look at this short source code and explain what Renat means.


I must be mistaken, but I cannot see where the history in MT4 is handled. Please help.

This is not serious.

And sketchy. Total "misunderstanding" of clear explanations (any OrderXXX function climbing for trade data is full-on MT4/MT5 history calls) and a dumb loop of hundreds of billions of useless calls clearly indicate that.

 
fxsaber :

I will not argue. I ask members of the forum who are familiar with MQL4, watch this short source code and explain what is meant by Renat.


Perhaps I'm wrong, but I do not see at close range, where we are working with the history in MT4. Please help.

Renat is perfectly clear and correct. Write your mql5 EA without "mql4" library and you will see the huge difference. There are enough real issues with mql5/MT5 without inventing new ones.

Translation:

Renat is absolutely clear and correct. Write an mql5 EA without "mql4 library" and you will see a huge difference. There are real enough problems with mql5 / MT5 without inventing new ones.

 
Renat Fatkhullin:

This is not serious.

And so it's an outline. A complete "misunderstanding" of the clear explanation (any OrderXXX function climbing over the data of trades is a reference to the history of MT4/MT5 in full) and the dumb loop of hundreds of billions of useless calls clearly indicate this.

From the documentation

OrdersTotal

Returns the total number of open and pending orders.

intOrdersTotal();

Returned value

Total amount of open and pending orders.

OrdersHistoryTotal

Returns the number of closed and deleted orders in the current account history, loaded in the client terminal.

intOrdersHistoryTotal();

Returned value

The number of closed and deleted orders in the account history, loaded into the client terminal. The size of the history list depends on the current settings of the "Account History" tab of the terminal.

Торговые функции - Справочник MQL4
Торговые функции - Справочник MQL4
  • docs.mql4.com
Торговые функции - Справочник MQL4
 
fxsaber:
From the documentation.

Why are you stalling?

You have more than a dozen functions OrderSelect, OrderProfit, etc. You don't understand whatOrderSelect is?

There are over 200,000 trades in the database and you do SelectOrderFromAllBase 200,000 times on every tick. There are 1,800,000 ticks in one run.

So this test is only about the stupid scanning of history of deals.


And another thing - in the tester, the history is available in full depth, regardless of the settings of the terminal.
 
You have more than a dozen functions OrderSelect, OrderProfit, etc. You don't understand whatOrderSelect from the whole database is? There are more than 200 000 trades in the database, and you are doing OrderSelect 200 000 times per tick. There are 1,800,000 ticks in one run. So the test is purely about dumb scanning of deal history.
And another thing - in the tester the history is available in full depth regardless of the settings of the terminal itself.

I understand Renat. Optimally written algorithm should not go into the history at every tick. Especially fun will be if the history contains thousands or even hundreds of deals. It's enough to check the history once at the start, you can use OnInit, and then just track the short history refill.

 
Renat Fatkhullin:

Why are you stalling?

You have more than a dozen functions OrderSelect, OrderProfit etc. You don't understand whatOrderSelect is?

I feel a ban is around the corner. All are silent...

Here's another quote from documentation

OrderSelect

Selects an order to continue working with it.

boolOrderSelect(
intindex,// index or ticket of the order
intselect,// flag of the selection method
intpool=MODE_TRADES// data source for selection
);

Parameters

ticket

[in] Order index or order number, depending on the second parameter.

select

[in] Flag of the selection method. Can be one of the following values:

SELECT_BY_POS - the index parameter contains the index number of the order in the list,
SELECT_BY_TICKET - the index parameter contains the ticket number.

pool=MODE_TRADES

[in] The source of the data to be selected. Used when the select parameter is equal to SELECT_BY_POS. It can be one of the following values:

MODE_TRADES (default) - the order is selected among open and pending orders,
MODE_HISTORY - the order is selected among closed and deleted orders.

OrderSelect - Торговые функции - Справочник MQL4
OrderSelect - Торговые функции - Справочник MQL4
  • docs.mql4.com
OrderSelect - Торговые функции - Справочник MQL4
 
Yuriy Zaytsev:

I understand Renat. A well-written algorithm should not have to go through the story on every tick.

At what point?
 

Right, it turns out that only open orders are being checked. I didn't get into the library and thought it was scanning history.

So my statement about the billion-dollar history scans is wrong. We need to look deeper, although it's clear that it's about hundreds of thousands of trades.

Sorry for looking through.
 
Renat Fatkhullin:

Right, it turns out that only open orders are being checked. I didn't get into the library and thought it was scanning history.

This is MQL4, which many people have forgotten. I'm using it not for the cross-platform aspect, it's just very convenient when I use it in MT5 (I almost never use MT4).

I must repeat, I am not interested in outlines. I want to have a constructive discussion. So far

Forum on trading, automated trading systems and strategy testing

MT4-Tester VS MT5-Tester

fxsaber, 2017.05.08 09:13

1598 works much faster than 1596. And it does so even in places where History-functions are not used at all. Apparently, the terminal itself caused these previously slow functions in its guts during the run.

Corrected and good. It will be very good if the already great MT5 tester gets even better, covering MT4+TDS capabilities

Such tester settings are indeed sometimes in demand. And it would be great if MT5 would allow this in the not too distant future.


ZS In the meantime, one bonus from the comparison almost immediately received. Looks like another one is ripening.

 

It's not about you, it's about the fact that a properly written algorithm doesn't have to go into history on every tick.

Reason: