Testing 'CopyTicks' - page 21

 
Network 'xxx': authorized on Alpari-MT5 through mt5.nl.3 (ping: 64.15 ms)

On the almost empty Alpari marketwatch, the copitix brakes just as much as on BCS.

On Robo, everything is more than an order of magnitude faster.

 

Results on USDCHF M1, CalcLength from the indicator https://www.mql5.com/ru/code/16537:

  • RoboForexEU - 23 ms (the cup is not in the broadcast, only bid/ask)
  • MetaQuotes-Demo - 15-30 ms (there is a cup with volumes in the broadcast)


The results are constantly fluctuating + single threads rule is not observed - on one of the streams without the pick and mix for CopyTicks, on the other with the pick. The demo is not opened on BCS, but the main thing is that there are no stacks on RoboForex.

Strange measuring code. A lot of unnecessary things were measured, but not the CopyTicks request time:

virtual void Visual( void ) const
  {
    const ulong StartTime = ::GetMicrosecondCount();

    int X0;
    int Y0;

    BARS bars(this.Chart);

    TICKSPICTURE TicksPicture(this.Chart, &bars, X0, Y0);

    this.SetProperty(::OBJPROP_XDISTANCE, X0);
    this.SetProperty(::OBJPROP_YDISTANCE, Y0);

    TicksPicture.Fill(ColorBid, ::BID);
    TicksPicture.Fill(ColorAsk, ::ASK);
    TicksPicture.Fill(ColorSpread, ::AVG);

    TicksPicture.SendToResource(this.Resource);

    ::Comment("LastCalcTime = " + (string)::TimeLocal() +
              ", Ticks = " + (string)bars.GetAmountTicks() +
              ", CalcLength = " + (string)((::GetMicrosecondCount() - StartTime) / THOUSAND) + " ms.");

    ::ChartRedraw(this.Chart);

    return;
  }

In any case, we optimise the call to copy ticks. It takes a lot.
Тиковый индикатор Ticks
Тиковый индикатор Ticks
  • votes: 15
  • 2016.10.14
  • //www.mql5.com/ru/users/fxsaber">
  • www.mql5.com
Показывает тиковую ценовую историю (Bid/Ask) внутри всех видимых баров.
 
Renat Fatkhullin:

Results on USDCHF M1, CalcLength from the indicator https://www.mql5.com/ru/code/16537:

  • RoboForexEU - 23 ms (no stack in broadcast, only bid/ask)
  • MetaQuotes-Demo - 15-30 ms (there is a cup with volumes in the broadcast)

Problems on Alpari Real and BCS Real. It is very easy to open the real

Forum on trading, automated trading systems and trading strategies testing

Limit order slippage statistics at the exchange

pivomoe, 2016.08.25 15:15

Start making a demo mt5 account with bx. You will receive an email with a link to the distribution. At the stage of server selection choose not a demo server, but for real trading. Create an account with arbitrary data. Create a certificate. All you have a real account with zero balance with real quotes and history.


The results are constantly floating + the rule of single threads is not respected - on one without stack the threads (where there is no need to do selections and mergers for CopyTicks), on the other with stack. The demo does not open on BCS, but the main thing is that there are no streams on Roboforex

Weird measurement code. Measured a bunch of extra stuff, but in no way the timing of the CopyTicks request:

That's not up to me. It's all measured together. The only difference is the trade server. So the brakes are only related to CopyTicks.

In any case, copyTicks call is optimized. It takes a lot.

Copyix in its current form is very inconvenient. For example, it's absolutely unclear how to get the tick that was before from.

Why cannot we return the index on the base array and work with the base as with an array? Let's leave the problems of adding new data to the database entirely up to the user. Let him sort it out himself, if something goes wrong. Right now, working with Copyix is, well, very inconvenient. I seem to be one of the few people who uses it very actively. And I can say about this quite responsibly.

 
Renat Fatkhullin:

Results on USDCHF M1, CalcLength from the indicator https://www.mql5.com/ru/code/16537:

  • RoboForexEU - 23 ms (no stat in broadcast, only bid/ask)
  • MetaQuotes-Demo - 15-30 ms (there is a cup with volumes in the broadcast)


Results are constantly fluctuating + single threads rule is not observed - there are threads without picks and merges for CopyTicks on one of them, on the other one with the pick. On BCS the demo does not open, but the main thing is that on RoboForex there are no stacks

Strange measuring code. Measured a bunch of unnecessary things, but in no way CopyTicks request time:

virtual void Visual( void ) const
  {
    const ulong StartTime = ::GetMicrosecondCount();

    int X0;
    int Y0;

    BARS bars(this.Chart);

    TICKSPICTURE TicksPicture(this.Chart, &bars, X0, Y0);

    this.SetProperty(::OBJPROP_XDISTANCE, X0);
    this.SetProperty(::OBJPROP_YDISTANCE, Y0);

    TicksPicture.Fill(ColorBid, ::BID);
    TicksPicture.Fill(ColorAsk, ::ASK);
    TicksPicture.Fill(ColorSpread, ::AVG);

    TicksPicture.SendToResource(this.Resource);

    ::Comment("LastCalcTime = " + (string)::TimeLocal() +
              ", Ticks = " + (string)bars.GetAmountTicks() +
              ", CalcLength = " + (string)((::GetMicrosecondCount() - StartTime) / THOUSAND) + " ms.");

    ::ChartRedraw(this.Chart);

    return;
  }

In any case, we optimise the call to copy ticks. It takes a lot.

Please clarify what you mean about single threads?

Another question, in order for the ticks to come as fast as possible, it is necessary that the cup is not open in the terminal and there is no subscription to the cup update event from the EA/indicator?

From reference:

Output speed: the terminal stores for each symbol 4096 recent ticks in the quick access cache (65536 ticks for symbols with the stack running), queries to this data are fastest.

Again, for quick access, should the bet be hidden and there should be no subscription to update the bet by symbol? Or is having a stack (hidden/open) already a guarantee of slowdown?
 
Alexey Kozitsyn:

Please clarify what you mean about single flows?

Forum on trading, automated trading systems and strategy testing

Testing 'CopyTicks'

fxsaber, 2016.10.13 10:18

There is an MT nuance with ticks where the tick history itself is overwritten retroactively because of multiple sources of ticks received.


 
fxsaber:
Thank you, but do you know about the glass and the speed of receipt?
 
Alexey Kozitsyn:
Thank you, but do you know about the glass and the speed of receipt?
No, unfortunately. Renat claimed that the tumblr is constantly streaming for the whole marketwatch. But that's not an expedient (wasteful) solution for most situations.
 
fxsaber:
No, unfortunately. Renat argued that the glass is permanently streamlined for the whole marketwatch. But that's not an appropriate solution for most situations.
It would be more logical to have your own cup per symbol.
 

This is how you should test CopyTicks:

MqlTick ExtArr[2048];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnTick()
  {
   ulong from   =(TimeTradeServer()-1200)*1000;
   ulong ticks  =GetMicrosecondCount();
   int   records=CopyTicks(_Symbol,ExtArr,COPY_TICKS_INFO,from,2048);

   ticks=GetMicrosecondCount()-ticks;
   Print("Time: ",ticks," msc for ",records," records");
  }

Here's the output in microseconds: 95 microseconds per sample of 2048 INFO ticks over the past 20 minutes

2016.10.18 14:15:38.673 TEST (USDCHF,M1)        Time: 95 msc for 1206 records
This is drastically different from the tens of milliseconds you claimed. That's because you didn't measure CopyTicks.
 
Alexey Kozitsyn:

Please clarify what you mean about single threads?

The bid/ask flow and the full ticked flow with volumes and last/traded prices are two big differences.

Cardinally big differences.


Another question, in order for the ticks to come as fast as possible, it is necessary that the glass is not open in the terminal and there is no subscription to the event of updating the glass from the Expert Advisor/Indicator?

Openness in the terminal or subscription in the EA does not matter.

If the symbol is in marketwatch, then the terminal receives all the full tick stream with the glasses unconditionally.


But most importantly, the sample rate calculations above are irrelevant. They are so clumsily done (anything but CopyTicks time is measured) that it is even surprising.