Skip to content
Forex Indicator System Thailand
Back to marketplace
UtilityUtility

Time Line Auto Close

Closes positions or sends an alert when the time reaches a vertical line drawn on the chart

Time Line Auto Close on an MT5 chart
Example on an MT5 chart

Download this EA for free

Download right away. Nothing to fill in.

Version
1.02
Published
11/21/2026
File size
124 KB

Open source, Apache License 2.0, by EarnForex.com. See licences

Version history

  1. 1.02Current11/21/2026 · 124 KB

    First release on this site.

How to use

Install the EA in MetaTrader 5 and drag it onto a chart with Algo Trading on. Press the TIME LINE CLOSE button on the panel to open the line list and create a new line, then set its date and time (broker server time), filters, notification and auto-close switch in the edit view. A new line is placed one hour ahead.

Always check each line's symbol, type and magic/ticket filters before switching auto-close on. With all symbols and all types selected, the EA closes every position in the account when the time arrives. The inputs set the defaults for notifications and for how lines look.

Try it on a demo account before real use.

Parameters

NameDefaultDescription
ExpertNameTLACName used as a prefix for chart objects and in notification texts.
EnableNotifytrueDefault notification state for newly created lines (on). It can be switched in the panel settings page.
SendAlerttrueShow a pop-up Alert when a line fires.
SendSoundtruePlay a sound when a line fires.
AlertSoundalert.wavName of the wav file in the MetaTrader Sounds folder.
SendAppfalseSend a push notification to the MetaTrader mobile app (the MetaQuotes ID must be set in the terminal).
SendEmailfalseSend an e-mail notification (e-mail must be configured in the terminal).
Slippage10Maximum accepted price deviation when closing positions, in points.
LineColorclrRedColour of newly created time lines.
LineStyleSTYLE_DOTLine style of newly created time lines.
DrawLabelstrueDraw text labels next to the time lines.
Xoff20Horizontal offset of the control panel from the chart corner, in pixels.
Yoff20Vertical offset of the control panel from the chart corner, in pixels.

Defaults are the values shipped with the EA, not a recommendation. Results depend on the market and on each account. Past results do not guarantee future results. Trading carries a high risk of loss.

How to install

  1. Download the .ex5 file.
  2. In MT5, choose File > Open Data Folder.
  3. Copy the file into the MQL5\Experts folder.
  4. Right-click Expert Advisors in the Navigator window and choose Refresh (or restart MT5).
  5. Drag it onto a chart, adjust the Inputs, turn on Allow Algo Trading, then click OK.

Description

A utility EA that lets you draw vertical time lines on the chart from its control panel. When server time reaches a line, the EA does what is set for that line: send an alert, or close open positions and delete pending orders that match the filters. Each line has its own settings, and once actioned the line is marked as done.

Per-line filters cover the symbol (current symbol only or all), the order type (all, or a chosen type such as Buy or Sell Limit) and a specific magic number or ticket. A newly created line defaults to all types, current symbol only, with auto-close off (alert only). You must switch auto-close on for the line before it closes anything.

If some positions fail to close, the line is not marked as done and the EA retries on the next tick. It can notify through Alert, sound, push and e-mail. Panel settings are saved to a file in the MQL5/Files folder.

Banners from the Exness partner programme

Exness banner: gold spreads*

FXIDTH is an independent IB partner of Exness. This channel is not owned or operated by Exness.*Spreads may fluctuate and widen due to factors including market volatility, news events, market open/close, and others.*Processing times may vary depending on the chosen payment method.