Skip to content
All library documents

A Two-Window Price Comparison Robot Based on Random-Sequence Aftereffects

Article MQL5 code base

Summary

This document describes an expert advisor that compares price changes across two adjacent historical windows. It calculates the start-to-end price difference within each window, compares the resulting values, and uses their relative size to predict the direction of a future price difference. The stated adjustable inputs are stop-loss and trailing-stop step size, window length in bars, and a setting for whether quotes are treated as random; when they are considered nonrandom, the signal direction is reversed.

The author says the method is based on a theorem about memory in random sequences, but characterizes the decision logic as simple. No performance statistics or formal tests of the theorem’s trading value are provided. The document advises optimizing the settings separately for each instrument and reoptimizing if results deteriorate. It also warns against small timeframes, saying they lost money in demo and real cent-account use, and suggests using hourly or longer intervals. These are reported observations, not evidence of robust profitability.

Key ideas

  • The robot compares price differences across two historical windows to choose a directional signal.
  • Its three adjustable inputs control stop distance, history-window length, and the assumed randomness of quotes.
  • The signal is reversed when quotes are treated as nonrandom.
  • The document recommends instrument-specific optimization and periodic reoptimization.
  • It reports losses on small timeframes and advises using hourly or longer intervals.

Tags

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