import of "minute bars" from forexite. com

import of "minute bars" from forexite. com
Download ALL MT4 scripts (422)
YouTube Video Thumbnail



Similar MetaTrader Tools

import of "minute bars" from forexite. com

Info

The import of "minute bars" from forexite. com is a Script for MetaTrader 4 that sometimes the mql4. com quote archive lacks "small" data (for example, "minute bars").

Usage

This tool is typically used for enhancing chart analysis and decision making.

Platform

This Script works exclusively on MetaTrader 4 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL4/Scripts folder via File ? Open Data Folder in MetaTrader 4.


How to Install and Use import of "minute bars" from forexite. com

1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.

2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.

3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.

4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."

Frequently Asked Questions

Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.

Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.

Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.

What this tool does

sometimes the mql4.

Typical Use Case

This Script excels in automated trading and technical analysis on MetaTrader 4.

Compatible Platform & Setup

This Script works on MetaTrader 4. Place the file in the MQL4/Scripts folder and restart the terminal.

Description & Settings

Related: e-so trailing expert advisor - another powerful script for MetaTrader 4 traders.


sometimes the mql4.com quote archive lacks "small" data (for example, "minute bars"). for example, for gold: the minute bar history covers the period from 2006 to date. this is clearly not enough for a decent test of a "rough" strategy that works on medium and higher timeframes and which is not too sensitive to the differences in data from different dealers on the smaller timeframes. however, it is possible to use the quotes available on forexite.com, up to 2001 - the more so that this data has already earned quite a decent reputation.

Also recommended: modify all tp sl - similar script with strong performance on MetaTrader 4.

this site has the "minute bar" quotes in the format more or less friendly to the metatrader 4: the metastock format. unfortunately, the quotes for quoteroom have a more complicated format, even though they are collected into single files for each year. this script is designed for processing the data in the metastock format.
the problem is that the "minute bars" are collected in separate files by trading days. besides, every file contains data not only on the required instrument (e.g. gold), but also on all other instrument traded by the dealer. and third: there are quote files for the weekends, which are usually unnecessary. therefore, in order to import the required data on gold to the metatrader 4 history center, it is necessary to processed all these files somehow and to gather all "minute bars" in a single file.
the script performs this particular task. but first, the data needs to be prepared for processing:
2. go to the site section corresponding to the "minute bars" for the required years and download all daily archives. separate project will need to be created per each year, but the files of different years can be stored in a single directory. only the *.zip extension should be specified in the setting for the file download, as those are the only required files. this way it is possible to download approximately 1500 files for years 2002-2007.
3. batch unpack all files to the "\experts\files\forexite\" folder. batch unpacking is built into the explorer. the result is a list of files with the names like 250705.txt (quotes for july 25, 2005) in that folder.
4. then open metatrader 4 and attach the script. there are thee external parameters:
a. name of the instrument as presented in the file from forexite.com. for gold it is «xauusd»,b. the import start date as a string in the format «yyyy.mm.dd»,c. the import end date as a string in the same format.
run the script. the script does not process files corresponding to the holidays. by looking into the script execution log or in the «experts» tab, it is possible to manually add the missing ones and run the script again. it was empirically found the earlier years usually do not contain the files for january 1 (new year) and 25 december (christmas). an updating line with the number of processed days is displayed at the top left corner, so as not to lose the sense of reality during the execution of the script (the processing of data from 2002 to 2007 to extract the quotes for gold lasted about 8 minutes).
5. there is large file in the "\experts\files\" folder with a name like xauusd_all.csv. this is the preliminary file ready for import (it was pleasant to see that metatrader 4 is able to distinguish dates in "different" format). it is enough to set the omission of the first column (as the first column in the created file is "xauusd", which is unnecessary), to specify the column separator (comma), to tick the volume (if it is not) and also to specify the offset in hours. i did not have to specify the offset separately, as the quotes correspond to the server time of alpari, which i work with.
after importing all the files in the directory "\experts\files\forexite\", and the file received as a result of the script operation (xauusd_all.csv) can be deleted.
finally: the minute bar quotes from forexite.com have no data on volumes. when importing to metatrader 4 the volumes are calculated if they have not been specified in the source data or if the volume data is contradictory, since the tester, as it turns out, does not test the data without volumes. if your strategy does not consider volumes and it is "rough" enough so that the different quotes from different dealers do not affect it, this is the right tool.
note for the moderator (and others):
for convenience of testing the operability of the script, attached is a small archive with the quotes of all symbols in the format of forexite.com for metastock from 01.02.2006 to 12.02.2006 (including holidays). extract the archive to the "\experts\files\forexite\" folder, set the external parameters of the script (instrument and both dates) and run the script. it is also possible to try the other instruments by simply changing the
_ssymbol
external parameter.

You may also like: loc line pips history - excellent alternative for script users on MetaTrader 4.

Source Code

/*       forexite.com     
         .    . */
#property copyright "robotfx"
#property show_inputs
extern string _ssymbol  = "xauusd";
extern string _fromdate = "2002.01.01";
extern string _todate   = "2007.06.13";
/*     ,      */
string readallstrings( int handle, string ss )
{

.......

Leave your opinion, ask a question, share some knowledge

Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.