Discussion of article "Creating and testing custom symbols in MetaTrader 5" - page 5

 
fxsaber:

There is a different function by its name. Replacing it with a Replace function is not really understanding what TicksAdd is for: throwing the corresponding Tick events.


I don't see TicksAdd, I think that originally it was TicksAdd, but after it was renamed by analogy with RatesUpdate (which both adds and deletes data), so that there would be no discrepancy and they did it right.

I replace it with Replace because the Update function doesn't work (if you execute the script, you will see the same thing, the files in Common/Files will be there).
.

 
AndreyKrivcov:

I have intellescence not seeing TicksAdd

Update to 1700 build.

 
AndreyKrivcov:

But I was wrong about something for sure - the function probably works, but can't record all the ticks I requested (I'm trying to record too many ticks)

It is not intended for recording.

Forum on trading, automated trading systems and testing trading strategies.

Beta version of MetaTrader 5 build 1700: Projects in MetaEditor and synthetic tools

MetaQuotes Software Corp., 2017.12.05 14:22

  1. Terminal: Added the ability to throw in real-time quotes for custom instruments. Now you can write an Expert Advisor in MQL5 that will throw in any quotes for a given custom instrument. The new CustomTicksAdd function is used for this purpose.
    .
    int  CustomTicksAdd(
       const string           symbol,       // character name
       const MqlTick&         ticks[]       // array with tick data to be applied to the user instrument
       );
    The CustomTicksAdd function allows you to translate ticks as if they come from the broker's server. The data are recorded not directly into the ticks database, but are sent to the "Market Watch" window. And from this window the terminal saves ticks in its database. If the volume of data transferred in one call is large, the function changes its behaviour to save resources. If more than 256 ticks are transferred, the data are divided into two parts. The first part (the larger one) is directly written to the tick database (as CustomTicksReplace does). The second part, consisting of the last 128 ticks, is transferred to the "Market Watch" window and then saved in the database by the terminal.
 
fxsaber:

It's not meant to be recorded.


Probably because of the build. I have an old version so far, right. But for my purposes I don't need to throw ticks in real time, I need to use them in the tester and that's it.

 
AndreyKrivcov:

Probably because of the build. I have an old version so far, right. But for my purposes I don't need to throw ticks in real time, I need to use them in the tester and that's it.

That's what Replace is for.

 
When exporting tick history, the volume of CSV-file increases significantly, and its format contains information about each tick with millisecond accuracy. Based on this data, the terminal will form a minute history, which will be used to build all other timeframes.

Comrades, what should I press to make the terminal generate a minute history from the tick history?

 

Good day.

I ask for your help:

Once a day I write custom characters to CSV ("for the day before yesterday" of 24 hours duration).

Then I delete the corresponding segment in the history (delete "day before yesterday" with duration of 24 hours) via CustomRatesDelete.

Then I redraw the chart via ChartRedraw.

As a result, I expect to see a smaller history file ***.hcc than it was before deleting part of the history.

However, it keeps growing.

Reloading the terminal has no effect either.

How can I save space on history data and make it match the data in the chart?

 
vestrub:

As a result, I expect to see a smaller ***.hcc history file than it was before the history part was removed.

However, it continues to grow.

The growth of *.tkc and *hcc is a long-standing feature. Perhaps they will fix it in the new build.

 
fxsaber:

Growth of *.tkc and *hcc is a long-standing feature. Perhaps they will fix it in the new build.

Do I understand correctly that the only option to save disc space will be:

1. save all history to SCV.

2. then delete *hcc and restart the terminal to start writing history from scratch.

?

 
vestrub:

Am I correct in understanding that the only option to save disc space would be:

1. save all history to SCV.

2. then delete *hcc and restart the terminal to start writing history from scratch.

?

This is not saving. CSV takes up more space in a day than hcc takes up in a week.