Skip to content
All library documents

Scheduling a Trading Expert Advisor to Open and Close Positions

Article MQL5 code base

Summary

This brief description presents an expert advisor that opens a position at a configured clock time and closes it at another configured time. The time inputs use hours and minutes. Other parameters select the traded symbol, position volume, direction, and an identifier used to distinguish the advisor's trades. The direction setting is binary: one choice opens buy positions, and the other opens sell positions.

The document describes operational behavior and configurable inputs rather than a trading rationale. It gives no entry signal, market filter, exit adjustment, performance evidence, or risk controls beyond the position-volume input. A fixed schedule may be used to express time-based exposure, but the description does not specify which clock or timezone governs execution, how missed or duplicate triggers are handled, or what happens if a position cannot be opened or closed at the requested time. It is therefore a concise overview of a simple automation pattern, not evidence that timed entries form a profitable strategy.

Key ideas

  • The advisor is configured to open and close positions at specified hours and minutes.
  • The user selects a symbol, transaction volume, and buy or sell direction.
  • A magic identifier distinguishes the advisor's trades.
  • The description does not state a timezone, trigger recovery behavior, or any evidence of strategy performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.