Skip to content
All library documents

Using Hourly Spread Statistics to Time Trading Entries

Article MQL5 code base

Summary

This short note describes a way to inspect historical spreads for a particular instrument and use the results to choose when an automated strategy enters trades. The display groups the day into eight-hour periods beginning at midnight, with the day of week adjustable. Comparing these periods may help identify when spreads have tended to be relatively low or high, which can inform entry timing and transaction-cost assumptions.

The suggested way to produce the statistics is to run the tool in a strategy tester over a chosen historical period, using real tick data and visualization. The note provides no sample output, instrument-specific findings, calculation details, or evidence that spread patterns persist. Historical hourly patterns may not predict current conditions, and spreads alone do not establish whether a trade is profitable. Treat the display as an exploratory aid and assess its relevance for the instrument, period, and execution setup being considered.

Key ideas

  • Historical spread patterns can help compare potential entry times for a given instrument.
  • The display divides each day into eight-hour periods starting at midnight.
  • The day of week can be adjusted when examining the periods.
  • The recommended workflow uses a strategy tester with real ticks and visualization.
  • The note gives no results showing that historical spread patterns persist.

Tags

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