Discussing the article: "Seasonality Indicator by Hours, Days of the Week, and Days of the Month"

 

Check out the new article: Seasonality Indicator by Hours, Days of the Week, and Days of the Month.

The article explains how to develop a tool for analyzing recurring price patterns in financial markets — by day of the month (1-31), day of the week (Monday-Sunday), or hour of the day (0-23). The indicator analyzes historical data, calculates the average return for each period, and displays the results as a histogram with a forecast. It includes customizable parameters: seasonality type, number of bars analyzed, display as percentages or absolute values, chart colors.

Prices play a melody that repeats on certain days of the month, days of the week, or even hours of the day. These recurring rhythms, or seasonal patterns, can provide a trader with clues as to when the market is likely to rise and when it is likely to fall. Seasonality in financial markets is not just a curious phenomenon, but a tool that helps identify predictable moments in price chaos. For example, have you noticed that some currency pairs often rise on Mondays or fall at the end of the month? This is seasonality, and studying it can give traders an edge.

In this guide, we will create a seasonality indicator in MQL5 for the MetaTrader 5 platform. Our indicator will analyze historical price data to identify the average return for days of the month (1st to 31st), days of the week (Monday to Sunday), or hours of the day (0 to 23). The results will be displayed as a histogram in a separate chart window, with a forecast line connecting the seasonality values and dots highlighting the expected values on the following bars. In addition, the indicator will display text statistics with forecasts, best and worst periods. We will walk you through the development process step by step, explaining every part of the code so you can not only use the indicator but also adapt it to your own ideas. This guide takes you through both programming and financial analysis, where code becomes the bridge between data and trading decisions.


Author: Yevgeniy Koshtenko

 
Good afternoon! Interesting logic and correct approach to trading, but I have a question. Yevgeniy Koshtenko If we take the calculation of days in a month, then why it builds different data if we change the TF H1 to H4 or even D1. Ideally, the calculation should not change from changing the TF. The calculation changes both in the text data and in the histogram.
Yevgeniy Koshtenko - Koshtenko - Профиль трейдера
Yevgeniy Koshtenko - Koshtenko - Профиль трейдера
  • 2026.01.13
  • www.mql5.com
Профиль трейдера
 
So it's been three months))))