Substantive clearing???? - page 4

 
Vladimir Mikhailov #:

No so pretty, everything is kept to a minimum, for speed.


I had a good idea.

MT5 was very bad with execution of trade orders,

Therefore, I wanted to develop my own terminal (without frills), only for trading.

I had to include DLL-robots in the terminal, but I still have not finished it,

I have no time for that, and my skills are not up to the job.

 
Apologies to my broker. It turns out that my bar history in the window was small and was shifting every day and as a result there were these issues. Now I have corrected everything, built new models, we will see on Monday how the model will behave!!!!!
 
Vladimir Mikhailov #:

No so pretty, everything is at a minimum, for speed.


Not even funny, alas.

 
Vladimir Mikhailov #:

No so pretty, everything is at a minimum, for speed.


Does it even make sense to collect ticks for 10,000 roubles a month?

 
prostotrader #:

Does it even make sense to collect ticks for 10,000 roubles a month?

Collecting quotes is a secondary function, the primary one is trading.
When you know and see how the data is collected, there is more trust in it.
Also there is a minimum of intermediaries in the form of third-party software with direct connection.

When testing the trading algorithm on the MT5 history, the results are like a finger in the sky.
My own tester shows good results on the collected history, all deals correspond exactly to a second of real trading.

My trading algorithms are geared for intraday trading and are very sensitive to incoming data.
But if you trade in the long term, you don't need to be directly connected and the history requirement may not be as critical.
 
Vladimir Mikhailov #:

Collecting quotes is a secondary function, the primary one is trading.
When you know and see how the data is collected, there is more trust in it.
Also, there are minimal middlemen in the form of third-party software when connected directly.

When testing the trading algorithm on the MT5 history, the results are like a finger in the sky.
My own tester shows good results on the collected history, all deals correspond exactly to a second of real trading.

My trading algorithms are honed for intraday trading and are very sensitive to incoming data.
But if you trade in the long term, direct connection is not necessary and the history requirement may not be as critical.

Are you trading the same instrument?

Added by

Judging by the screenshot you posted, it looks very much like Classic arbitrage (GAZR-12.21 vs GAZP), which even in KVIC works fine.

 
prostotrader #:

Are you trading the same instrument?

Added

Judging by the screenshot you posted, it looks very much like Classic arbitrage (GAZR-12.21 vs GAZP), which even in KVIC works fine.

I trade more than one instrument. Yes, this algorithm is based on classic arbitrage.

 
Vladimir Mikhailov #:

I trade with more than one instrument. Yes, this algorithm is based on classic arbitrage.

I see only one reason for speed trading - density trading with gelling,

in other cases speed is not necessary.

But in this case analysis is not needed at all.

But you know better...

Added

If memory serves me correctly, in CGate you can receive stock quotes, but

but you can't send orders.

It's a bit of a tricky one...

 
prostotrader #:

I see only one reason for speed trading - trading from density with gelling,

in other cases speed is not necessary.

But in this case analysis is not needed at all.

But you know best...

Added

If memory serves me correctly, in CGate you can receive stock quotes, but

but you can't send orders.

You're not being very clever.

That's right, you only trade with one instrument.
Although the algorithm is arbitrage-based, it only trades futures.

 
Vladimir Mikhailov #:

That's right, there is only one instrument traded.
Although the algorithm is arbitrage-based, it only trades futures.

You made me doubt that MT5 is transmitting quotes correctly.

Since you collect ticks on GAZR-12.21 could you give me the file for last Friday 15.10.2021?

I want to compare if there are discrepancies.

I was comparing with KVIC about 5 years ago, no discrepancies.

Added

Feel free to compare

//+------------------------------------------------------------------+
//|                                                      G_ticks.mq5 |
//|                                     Copyright 2021, prostotrader |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, prostotrader"
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
{
  MqlTick g_ticks[];
  string t_date;
  string t_time;
  string c_flags;
  int result = CopyTicksRange(Symbol(), g_ticks, COPY_TICKS_ALL, ulong(D'15.10.2021 07:00:00') * 1000, ulong(D'15.10.2021 23:50:00') * 1000);
  if(result > 0)
  {
    int f_handle=FileOpen("g_ticks.csv",FILE_WRITE|FILE_CSV); 
    if(f_handle!=INVALID_HANDLE)
    {
      FileWrite(f_handle,"Иструмент:", Symbol());
      FileWrite(f_handle,"Всего записей:", string(result));
      FileWrite(f_handle, "Номер", "Дата", "Время", "Флаги", "Цена(Last)", "Объем", "Предложение", "Спрос");
      for(int i=0;i<result;i++)
      {
        t_date = TimeToString(g_ticks[i].time, TIME_DATE);
        t_time = TimeToString(g_ticks[i].time, TIME_SECONDS) + "." + string( ulong(g_ticks[i].time_msc) - ulong(g_ticks[i].time)*1000);
        c_flags = "";
        if((g_ticks[i].flags&TICK_FLAG_BID) == TICK_FLAG_BID) c_flags += " TICK_FLAG_BID,"; 
        if((g_ticks[i].flags&TICK_FLAG_ASK) == TICK_FLAG_ASK) c_flags += " TICK_FLAG_ASK,";
        if((g_ticks[i].flags&TICK_FLAG_LAST) == TICK_FLAG_LAST) c_flags += " TICK_FLAG_LAST, ";
        if((g_ticks[i].flags&TICK_FLAG_VOLUME) == TICK_FLAG_VOLUME) c_flags += " TICK_FLAG_VOLUME,";
        if((g_ticks[i].flags&TICK_FLAG_BUY) == TICK_FLAG_BUY) c_flags += " TICK_FLAG_BUY.";
        if((g_ticks[i].flags&TICK_FLAG_SELL) == TICK_FLAG_SELL) c_flags += " TICK_FLAG_SELL,";
        int f_len = StringLen(c_flags);
        if(f_len > 1)
        {
          StringSetCharacter(c_flags, f_len - 1, ushort(" "));
          StringTrimRight(c_flags);          
        }
        if(c_flags == "")
        {
          FileWrite(f_handle, string(i + 1), t_date, t_time, string(g_ticks[i].flags), DoubleToString(g_ticks[i].last, Digits()), string(g_ticks[i].volume),
                      DoubleToString(g_ticks[i].ask, Digits()), DoubleToString(g_ticks[i].bid, Digits()));
        }
        else FileWrite(f_handle, string(i + 1), t_date, t_time, c_flags, DoubleToString(g_ticks[i].last, Digits()), string(g_ticks[i].volume),
                      DoubleToString(g_ticks[i].ask, Digits()), DoubleToString(g_ticks[i].bid, Digits())); 
      }
      FileClose(f_handle);
    }  
  }
  return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }

//+------------------------------------------------------------------+

Added

And maybe other programs, somehow separate ticks that have more than one flag.


Files:
1_g_ticks.zip  781 kb