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

ThirdPartyTicks - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

ThirdPartyTicks - script for MetaTrader 5

ThirdPartyTicks - script for MetaTrader 5

ThirdPartyTicks - script for MetaTrader 5

ThirdPartyTicks - script for MetaTrader 5

ThirdPartyTicks - script for MetaTrader 5

Third-party applications for MetaTrader 4, which allow the acquisition of quote history from various sources, have always been popular. This history is often used in strategy testers to check the operation of the Expert Advisor and to conduct research (e.g. machine learning, etc.). Some of the cited sources discussed by users have become almost standard in the search for the "holy grail".

The given MQL5 library does not have any criterion for comparing price changes. The reasons for selecting suggested sources for tick archives are not described. But this archive is definitely new and therefore understudied. Therefore, in order to develop your own value criteria, perform a simple operation - use any of the built-in MetaTrader 5 symbols in the "Every tick is based on real ticks" mode and on custom symbols created by scripts (based on real tick history from third parties) and compare the obtained results. This process does not require any in-depth knowledge of the terminal or performing additional operations outside of the terminal.

The script accesses the quote history from built-in sources and creates appropriate custom symbols on this basis.

The comments in the source code explain the principle.

 // https://www.mql5.com/en/code/20225
#Property script display input

#include Input boolean sync= true ; // sync
input string symbol = "" ; // Symbols (NULL - current, "AllSymbols" - all) 3rd party tag 3rd party tag; // Connect to local quote archive

// a symbol
blankCreateSymbol ()
{
// Define the symbolic constant to use string symbol = (symbol == "" )? string substring ( _symbol , 0 , 6 ): symbol;

if (sync)
    ThirdPartyTicks.Refresh(); // Read available data from the tick archive source ThirdPartyTicks[Symb].Update(); // Synchronize the local archive with the source of the selected symbol ThirdPartyTicks[Symb].ToCustomSymbol( true ); // Create a custom symbol based on the local archive } // All symbols
Blank creates all symbols()
{
if (sync)
    ThirdPartyTicks.Refresh(); // Read available data from tick archive source constant unit amount = ThirdPartyTicks.GetAmount();

order ( unit i = 0 ; _CS(i < amount); i++)
  {
    ThirdPartyTicks[i].Update(); // Synchronize the local archive with the source of the selected symbol ThirdPartyTicks[i].ToCustomSymbol(); // Create a custom symbol based on the local archive }
} Blank start ()
{
if (symbol != "all symbols" )
    CreateSymbol();
else if ( messagebox ( "Creating all symbols may take a long time. Do you agree?" , __file__ , MB_yes | MB_ICONQUESTION ) == idas )
    CreateAllSymbols();
}

In order for the script to run correctly, you should specify the address of the quote source in the terminal settings , for example:

ThirdPartyTicks - script for MetaTrader 5

During the running of the script, detailed actions are written to the log:

Unzip <source name>\EURUSD.<suffix>\EURUSD.<suffix>_20180313.csv.zip 724002 bytes - unzipped size 5466504 bytes.
Total Quotation (EURUSD.<suffix>) = 1645897 Corrected 3 ticks.
EURUSD.<suffix>_<source name> saved quotes = 1645897

Afterwards you can run your Expert Advisor in the tester with the new custom symbol:

ThirdPartyTicks - script for MetaTrader 5


Attachment download

📎 Dictionary.mqh (38.15 KB)

📎 Symbol.mqh (5.32 KB)

📎 Array.mqh (1.11 KB)

📎 Casting.mqh (0.48 KB)

📎 CustomSymbol.mqh (2.27 KB)

📎 Data.mqh (1.12 KB)

📎 File.mqh (2.6 KB)

📎 Files_Prices.mqh (1.87 KB)

📎 File_Prices.mqh (0.5 KB)

📎 Rates.mqh (2.35 KB)

📎 String.mqh (2.41 KB)

📎ThirdPartyTicks.mqh (6.96 KB)

📎Ticks.mqh (7.89 KB)

📎 Web.mqh (0.9 KB)

📎 Zip.mqh (17.22 KB)

📎ZipContent.mqh (11.62 KB)

📎ZipDefines.mqh (1.17 KB)

📎ZipDirectory.mqh (1.85 KB)

📎ZipFile.mqh (5.91 KB)

📎ZipHeader.mqh (12.47 KB)

📎ThirdPartyTicks.mq5 (3.01 KB)

Source: MQL5 #20225

Verification code Refresh