Vertical Time Lines
This software component for MetaTrader 4 is built to enhance the capabilities of your trading environment. This technical indicator acts as a specialized analysis tool designed to visualize market data. It helps traders identify emerging trends, momentum shifts, and key support or resistance levels by plotting statistical calculations directly onto price charts.
How to Setup and Use Vertical Time Lines
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
Description & Settings
Indicator can draws up to six different vertical lines each at a designated time.
Each vertical line can be historically repeated.
Time format: hh:mm.
The default historical days Input is 50. Increase as required. Aging equipment may suffer performance at too high a number.
Possible use:
Mark session open or close time.
Mark time of regular news release.
Mark any other relevant time.
Note - Answer to a question:
A Vertical Time Line set at 09:30 on a timeframe of M30 or lesser will read as 09:30 because each timeframe will have a a candle that opens/starts at 09:30.
A Vertical Time Line set at 09:30 on a timeframes of H1 or greater will not read as 09:30 because each timeframe will not have a candle that opens/starts at 09:30. ie. A Vertical Time Line set at 09:30 on a H1 timeframe will read as 09:00 because 09:30 is within the 09:00 - 10:00 candle and the candle open/start time is 09:00.
Comment:
The present code accommodate up to six vertical lines. To code in more lines repeat the relevant blocks of code and rename where applicable.
Default Inputs Code
Edit the below code to permanently change default inputs.
Edit the following as required: Line_x_Color (DodgerBlue, etc), Line_x_Visible (true or false), Line_x_Time (08:30 etc), Line_x_Width (1, 2, 3, 4 or 5), Line_x_Style (0=solid, 1=dash, 2=dotted, 3=dash & dot, 4=double dotted dash & dot).
An idea of basic editing can be got here -
MQL4 color name and reference here -