Recommended way to update historical data for custom symbol in MT 4 & 5?

General discussion about the Tickstory Lite software package.
Post Reply
Floris
Posts: 3
Joined: Sun Dec 25, 2022 9:22 pm

Recommended way to update historical data for custom symbol in MT 4 & 5?

Post by Floris »

Hey everyone, I have a quick question:

My preferred workflow is to export the whole history of a symbol as two giant CSV files (one for ticks, one for M1 bars), then import both into MetaTrader (4 and 5) by creating a custom symbol, as described in one of Tickstory's articles (https://tickstory.com/how-to-import-tic ... atrader-5/).
Now my intention is to update the historical data inside MT in regular intervals, e.g. every month or quarter.
My question is:
What's the recommended way to update tick/bar data of a custom symbol inside MT (considering my two new CSV files also contain the previous historical data that was already imported into MT before)? (E.g. I previously imported all history data up to Sep 30th, and for the next update, the CSV files contain all history data up to Dec 31st.)
Is the only way to update the custom symbol, to create a new custom symbol for each "update", import the two ticks & bars CSV files, then delete the old custom symbol?
Or can I somehow "overwrite" the symbol's whole historical data with my new import?
What I want to avoid is, that MT will have duplicates of historical ticks/bars.
Should I just import the CSV files as if the custom symbol didn't already have data associated with it? In other words, are MT4 and MT5 smart enough to deduplicate data that it already has during import?
(Or do I have to manually remove all the ticks/bars that MT already has, from my new CSV files? Btw, is there a way to see the latest timestamps of the ticks & bars that MT already has for a custom symbol?)

I'd be grateful if someone who has already updated custom symbols can confirm what the best way is (for both MT 4 and 5) :)

---

Btw, when I right click on a custom symbol in MT5 and select "delete", nothing happens. For some reason it doesn't want to delete my custom symbol, so now I want to delete it manually, is it possible? Which files/folders inside MT's data folder do I have to delete in order to delete a custom symbol (safely, without accidentally deleting something else)? :)

tickstory
Posts: 4883
Joined: Sun Jan 06, 2013 12:27 am

Re: Recommended way to update historical data for custom symbol in MT 4 & 5?

Post by tickstory »

Hi Floris,

For MT5:
According to the Metatrader 5 user manual:
During import, the time interval is completely replaced by data from the specified file. For example, if the file contains data from 2016.01.01 00:00:00 to 2016.06.01 00:00:00, and the custom symbol history already has some data in this interval, these data will be completely replaced with new ones (even if the amount of imported data is less than data in the history).
A brief test on our side seems to suggest that if you import incremental deltas of later dates that are not yet imported, these will be appended to the dataset. If there is data that overlaps, then this range is replaced with the imported data as described above.

For MT4:

Each export will contain the entire data range that you wish to test with. So if you want to add additional days that were previously not exported, you will need to export the date range again. For example, you exported from 2022.01.01 - 2022.02.01 and then you subsequently wish to include all of February 2022, then you will need to export 2022.01.01 - 2022.02.28.

As a note, in our next major version we will be supporting incremental exports to MT4.

Hope this helps.

Post Reply