Testing 'CopyTicks'

 

Let's start with a simple one - volume. Below is a picture of the glitch detected. Occasionally "doubles" appear in volumes.


Win7-64

MT5-1085

Broker "Otkritie", real server.

The main indicator cycle looks as follows:

//---------------------------------------------------------------------
//      Внешние задаваемые параметры:
//---------------------------------------------------------------------
input int                               TickCount = 2000;
input ENUM_TICK_TYPE                    TickType = ENUM_COPY_TICKS_ALL;
//---------------------------------------------------------------------
//---------------------------------------------------------------------
MqlTick         ticks_Arr[ ];
int             copied;
//---------------------------------------------------------------------
int
OnCalculate( const int _rates_total, const int _prev_calculated, const int _begin, const double& _price[ ] )
{
        if( _prev_calculated <= 0 )
        {
                ArrayInitialize( VolumeBuffer, 0 );
        }

        copied = CopyTicks( _Symbol, ticks_Arr, TickType, 0, TickCount );
        if( copied > 0 )
        {
                for( int i = copied - 1; i >= 0; i-- )
                {
                        MqlTick tick = ticks_Arr[ i ];

                        VolumeBuffer[ _rates_total - copied + i ] = ( double )tick.volume;
//                      Print( tick.volume );
                }
        }

        return( _rates_total );
}

I have not found any regularity in the appearance of "twins". I hope the developers will promptly fix it.

Indicator with tick volume is attached (compiled on MT5-1100).

Files:
 
Dima_S:

Let's start with a simple one - volume. Below is a picture of the glitch detected. Occasionally "doubles" appear in volumes.


Win7-64

MT5-1085

Broker "Otkritie", real server.

The main indicator cycle looks as follows:

I have not found any regularity in the appearance of "twins". I hope the developers will promptly fix it.

Indicator with tick volume is attached ( compiled on MT5-1100).

I have contacted Service Desk about CopyTicks() (there was an error in this function).

Here is the reply of SD:

This functionality is still under development. Many platform components are being modified to provide full-fledged access to the tick stream. We will have to wait some more time.

 
Mikalas:

I checked with servicedesk about CopyTicks() (there was an error with this function)

Here's the response from SD:

This functionality is still under development. Many platform components are being modified to provide full access to the tick stream. We will have to wait some more time.

You're lucky, I still haven't heard back from servicedesk about this feature...
 
Mikalas:

I checked with servicedesk about CopyTicks() (there was an error with this function)

Here's the response from SD:

This functionality is still under development. Many platform components are being modified to provide full access to the tick stream. We will have to wait some more time.

I see. So it's a half-finished product for now. We'll wait some more))

Another thing I don't understand is why they broke something that was already working - the advanced tumbler mode.

 

While the developers are scratching their heads, I will suggest a variant of MqlTick structure.

struct MqlTick
{
  datetime   time;           // Время последнего обновления цен
  uint       time_count;     // микросекунды ( крайне желательно брать с биржи )
  double     bid;            // Текущая цена Bid
  double     ask;            // Текущая цена Ask
  double     last;           // Текущая цена последней сделки (Last)
  ulong      volume;         // Объем для текущей цены Last
  ulong      interest;       // Текущая величина ОИ, после исполнения последней сделки Last
  ulong      buy_orders;     // Текущее число ордеров покупателей, после исполнения последней сделки Last
  ulong      sell_orders;    // Текущее число ордеров продавцов, после исполнения последней сделки Last
  ulong      buy_orders_vol; // Текущий объем ордеров покупателей, после исполнения последней сделки Last
  ulong      sell_orders_vol;// Текущий объем ордеров продавцов, после исполнения последней сделки Last
  char       action;         // Действие ( 'B' - покупка, 'S' - продажа )
 };

Everything else in the function can be left as it is.

 
Dima_S:

While the developers are scratching their heads, I will suggest a variant of MqlTick structure.

Everything else in the function can be left as it is.

Cool! ! Agreed!
 
Dima_S:

While the developers are scratching their heads, I will suggest a variant of MqlTick structure.

Everything else in the function can be left as it is.

I would add the direction of the transaction. Who was the initiator (seller or buyer)
 
Prival-2:
I would add the direction of the transaction. Who was the initiator (seller or buyer)
Yes, omitted - added.
 
And preferably not the last time the prices were updated. More accurate would probably be the time of data change + add what volume is on the bidet and what is on the aska (probably better all at once) glass.
 
Yes. And the ability to get the deepest history accumulated by the server for all these data throughhttps://www.mql5.com/ru/docs/series/copyticks and test strategies using them in the tester. Then scalpers will have a Paradise in MT5) And if we accumulate data of eachBookEvent- then the enormous size of the archive that won't fit on the server will come out)
Документация по MQL5: Доступ к таймсериям и индикаторам / CopyTicks
Документация по MQL5: Доступ к таймсериям и индикаторам / CopyTicks
  • www.mql5.com
Доступ к таймсериям и индикаторам / CopyTicks - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 

Why keep all the history from the king of peas on the server. You can limit the depth to a reasonable amount, for example a week. And a deeper history can be made available on request (from the file server). Who wants the history of the glass for the year 2010, no problem, download it and then let them test it until they are completely blue in the face.

At the same time making it (history) available to others via torrent technology. There are many solutions. This is just one of the options.

Reason: