Skip to content
All library documents

A Random Direction Expert Advisor as a Trading Baseline

Article MQL5 code base

Summary

This brief description outlines an expert advisor that trades at the minimum lot size and alternates between closing its existing position and opening a new one at a configurable interval. A random number determines whether the new position is long or short, with the two outcomes divided around half of the generator's range. The previous position is closed before the next direction is selected, so the method does not describe holding simultaneous positions or using a market signal to choose direction.

The document supplies no backtest, transaction-cost analysis, risk controls, or evidence of profitability. It is best understood as a simple randomized trading procedure that could serve as a comparison point for signal-based systems, rather than as a validated strategy. Results would depend on the instrument, interval, execution costs, and position handling, none of which are evaluated in the description.

Key ideas

  • The expert advisor chooses long or short direction using a random number.
  • It closes the prior position before opening the next one.
  • Trades use minimum lot size and recur at a configured interval.
  • The description gives no performance evidence or analysis of transaction costs.

Tags

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