Errors, bugs, questions - page 1972

 
Stanislav Korotky:
Could you please tell us the algorithm of volume calculation for a particular bar (may be it's already described somewhere?). For example, I request with CopyTicksRange all ticks for a certain bar and I want to get the same volume as a result of calculations (both real and ticks), that is displayed in Data window. I have discrepancies in both volumes for exchange instruments by orders of magnitude (to be specific, take AFLT on MQ-Demo). For forex the tick volumes are the same, real volumes are out of the question there.

Try CopyTicksRange with COPY_TICKS_TRADE flag and subsequent counting in loop over array of MqlTick structures

I received in a 13-hour candle AFLT on MQ-Demo real volume 411

 
fxsaber:

Should match. https://www.mql5.com/ru/forum/96537/page4#comment_2866477

MQ-Demo servers still allow ticks of undefined direction (N/A). This is not catching on in yours. So, the final volume may (which I am not so sure about) be the same, but the buy and sell components are not.
 
Alexey Viktorov:

Try CopyTicksRange with COPY_TICKS_TRADE flag and then loop counting through an array of MqlTick structures

I got in 13 hour candle AFLT on MQ-Demo real volume 411

It works. But I have to change it for forex to _ALL (no _TRADE there).

What I miss is a function of Ticks type returning the number of ticks in timeframe without trying to load them into memory at once.

 
Stanislav Korotky:

It works. But I have to change it for forex to _ALL (no _TRADE there).

The function like Ticks, which returns number of ticks in time range without trying to load them into memory at once, is badly missing.

Doesn't CopyRates do it? Because there are tick volumes in MqlRates structure, and they agree with the values in the data window. Except that milliseconds cannot be defined...

 
Alexey Viktorov:

Isn't CopyRates not suitable? Because there are tick volumes in MqlRates structure and they all agree with the values in the data window. Unless milliseconds cannot be determined...

How does CopyRates help to know the number of ticks? Or is it about getting volumes? I still process them separately. The total number is only needed for self-monitoring. If the total diverges, then all the specifics may be from the ceiling.

 

Since no one is reporting, I'm the only one who has a problem with the site display today. Can't see topic names, usernames, etc.

ChromeVersion 45.0.2454.85.

 

Testing by all ticks does not take into account the position volume - both at 1 lot and at 100 - one and the same result actually (taking into account the correction by *100).

This situation significantly distorts testing results, because it does not take into account slippage due to lack of liquidity.

 
fxsaber:

Since no one is reporting, I'm the only one who has a problem with the site display today. Can't see topic names, usernames, etc.

ChromeVersion 45.0.2454.85.


All ok, Yandex browser

 
Aleksey Vyazmikin:

Testing by all ticks does not take into account the position volume - both at 1 lot and at 100 - one and the same result actually (taking into account the correction by *100).

This situation significantly distorts testing results because it does not take slippage into account due to lack of liquidity.


I used to trade MT4 on ECN accounts and used to trade 10-15 lots. Often the lots would break into smaller ones, especially in the evening. But MT4 didn't have settings for order opening. I did not work with MT5 with big lots.

 
fxsaber:

Since no one is reporting, I'm the only one who has a problem with the site display today. Can't see topic names, usernames, etc.

ChromeVersion 45.0.2454.85.

Thanks, it's working properly now.

Reason: