Skip to content
All library documents

Tick-to-Tick Price Comparison for Expert Advisor Signals

Article MQL5 code base

Summary

The document outlines a tick-driven Expert Advisor that compares the current price with the price observed on the preceding tick. It identifies two static variables as the core implementation idea: because a static variable retains its value after a function returns, the EA can preserve prior tick state for the next comparison. Its configurable inputs include the price difference threshold, a loss limit expressed in points, and an option to reverse signals. These elements describe a simple price-change trigger rather than a bar-based indicator method.

The author specifically says testing should use a real-tick simulation mode, which is relevant because the decision logic depends on the sequence of ticks. The text gives no instrument, timeframe, entry and exit details, parameter values, test results, or risk analysis. It therefore teaches the basic state-retention concept and names some controls, but does not show whether the approach has an edge or how sensitive it is to spread, slippage, and execution conditions. Treat it as a brief algorithm outline, not a validated strategy.

Key ideas

  • The EA compares the current price with the price from the previous tick.
  • Static variables preserve prior values between function calls, supporting tick-to-tick comparison.
  • Inputs include a price difference threshold, a loss limit in points, and signal reversal.
  • The document calls for testing with real tick data because the method depends on tick sequences.
  • No strategy performance evidence or detailed execution rules are supplied.

Tags

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