Lead Lag Relationship Tester script for MetaTrader 5

Script for checking the LeadLagRelationship indicator, it is intended for sending quotes with a delay.

How to check: run the script and indicator with a common communication channel on the same instrument. Set the delay parameter in the script. After accumulating sufficient data, the indicator should show the delay specified in the script.

Script Parameters

  • inpTimerPeriod – period of the main timer in milliseconds.
  • inpUseMode – channel mode; 0 – file, 2 – global variables of the terminal. The channel mode is the method for delivering the quotes. The “file” method serves for delivery of quotes from external sources, while global variables are convenient for checking synthetic instruments.
  • inpFilename – name of the file to receive the quotes. It must have the .csv extension and should be located in (\Terminal\Common\Files). If the quotes delivery method using a file is selected, enter the file name in this parameter.
  • inpGlobalVariableAsk – name of the global variable for Ask, if the quotes delivery method using global variables is selected.
  • inpGlobalVariableBid – name of the global variable for Bid, if the quotes delivery method using global variables is selected.
  • inpSetLag – delay in milliseconds. This is the delay for sending the quotes.

Free Download

Lead Lag Relationship Tester script for MetaTrader 5

MT5 Forex Script Characteristics

Platform: Metatrader 5

Type: Script

Time frames: any.

How to install Screenshot Script in MetaTrader 5 / MT5:

Copy and paste the LeadLagRelationshipTester.mql5 files into the MQL5 Scripts folder of the Metatrader 4 trading platform.

Restart your MetaTrader 5 application (assuming it’s currently open) … or Launch your MetaTrader 4 application

You can access this folder from the top menu as follows:

File > Open Data Folder > MQL5 > Script (paste here)

On the left hand side, look for the “Navigator” window and under the “Common” tab, look into the “Scripts” section

Locate the indicator which you have just downloaded into the folder stated in Step 1

Drag (Click and drag) the Script onto the chart (when you want the task to be performed)

your task should now be executed…

Leave a Comment