Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

ConvertTicksFile - Script for MetaTrader 4 - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

ConvertTicksFile - script for MetaTrader 4

ConvertTicksFile - script for MetaTrader 4

ConvertTicksFile - script for MetaTrader 4

ConvertTicksFile - script for MetaTrader 4

Convert tick files created using the Ticks collector to a different data representation format.

The tick collector creates special tick files (type TKS) during runtime. The main use of TKS files — creation of non-standard charts in MetaTrader 4. These charts can be offline charts or non-standard strategy tester files .

Still, there are a number of issues that can be addressed by having real price history at hand. The rest depends on the toolset. The ConvertTicksFile script attempts to fill this gap. It provides three methods for processing tick files:

1. Simply rewrite the data into a CSV file (usually a text file, which can be opened with Notepad or Excel).

The generated file will look like this:

ConvertTicksFile - script for MetaTrader 4

The first column - the date/time of the price change, the second column - the bid price, the third column - the ask price.

2. Candlesticks that enter the specified chart period.

In rare cases, data is written in this format to CSV files, which can later be read by the MetaTrader 4 terminal during quote import (Tools - History Center).

ConvertTicksFile - script for MetaTrader 4

3. Write quotes directly into the MetaTrader 4 terminal history and enter the candlesticks of the specified chart period.

Data is written directly to the terminal's HST file. Therefore, it is possible to change the current quote history used by the terminal, which requires the user to be very careful.

This method allows, for example, filling in gaps in the quote history. So, if there is such a "gap":

ConvertTicksFile - script for MetaTrader 4

Then, after the script is run and the corresponding quote history file is used, the "gaps" are no longer like this.

ConvertTicksFile - script for MetaTrader 4

Full description of the script - conversion of tick stream files .


Attachment download

📎 convertticksfile.mq4 (24.83 KB)

Source: MQL5 #14031

Verification code Refresh