
Learn to analyze weekly percentage changes with MQL5, automate data extraction to CSV, visualize in Excel, and develop a mean-reversion edge strategy using threshold-based entries.
Create a weekly data script in mql5 to obtain eurodollar price data from 2000 to 2018 and export it to csv for mean reversion analysis.
Create a csv to store weekly extreme percentage changes, initialize sum variables, build and open the file, and write headers for week start, maximum percentage change, and minimum percentage change.
Learn to collect weekly open, high, low, and close data, compute the maximum and minimum weekly percentage changes, export to csv, and calculate their averages for analysis.
Visualize percentage change data in a scatter plot to reveal mean revision opportunities, quantify price movements, and set take profit and stop loss targets for a weekly change EA.
Investigate weekly price moves from high and low to the close to derive take profit and stop loss targets, using percent steps from 1% to 3% and header updates.
Learn to calculate weekly price change thresholds in MQL5, using a 1% open price threshold to compute percentage moves from threshold to the weekly close, with up and down scenarios.
Compute and report the average percentage change from thresholds to the weekly close, covering 1, 1.5, 2, 2.5, and 3 percent up and down in an mql5 ea.
Identify viable weekly trade targets from 1%, 1.5%, 2%, and 3% thresholds. Validate data with csv checks and scatterplots to shape a dynamic EA with stop-loss and take-profit rules.
Set up the SPDT advisor template for the weekly percentage change EA, defining general inputs like symbol traded, traded time frame, and ID, and configuring on initialization and on tick.
Learn to regulate the calculation interval by initializing weekly data, tracking old weeks, and detecting new weeks in onTick using weekly bars, ask and bid prices, and symbol data.
Create and use cTrade, cPositionInfo, and cOrderInfo objects to enter and manage trades. Attach an EA metric, set slippage in points, count open trades, delete pending orders, and close positions.
Calculate the total profit for a given position type (by positions or cell positions), including swap fees and commissions, by iterating all relevant positions and summing profits.
Define and implement weekly threshold levels (1% to 3% up or down) in a MQL5 SPDT advisor, calculate weekly percentage change, and draw resistance lines to visualize thresholds.
Visualize the weekly percentage price change on the chart by creating a label object, positioning it, coloring by positive or negative change, and updating it each week.
Learn risk management for the expert advisor by selecting fixed or account-size based lot sizing, with linear or exponential increases for repeated entries, and standardizing lots within limits.
Define trade management parameters in a MQL5 weekly percentage change EA, including level-based entries, weekend or profit-only closes, and take profit and stop loss calculations.
Develop a double last entry price function for a given position type, scanning trades, resizing a prices array, and selecting the min or max price for buy or sell decisions.
Develop a by-trades entry system in MQL5 with dynamic lot sizing, entry price arrays for five levels, and buy/sell limit orders plus take profit and stop loss for each level.
Consolidate the weekly percentage change ea by deleting pending orders, calculating and visualizing thresholds, then execute buy and sell trades, and apply a weekly close method to close profitable positions.
Debug and test the weekly percentage change expert advisor using visual mode on eurusd data from 2023 to 2025, validating take profit, stop loss, and weekly close rules.
In every ecosystem, there are different organisms with different strategies for survival. These strategies all depend on members of an ecosystem occupying particular roles causing dependencies to arise. These strategies however, depend on patterns based on how other organisms survive and behave. These patterns of survival and behaviour are prone to changes as other organisms evolve and change their strategies, causing those organisms whose strategies do not align with the new environment to be extinct if they do not adapt to the changes. The financial markets can be likened to a natural ecosystem, where market participants interact together while occupying different roles and implementing different strategies to satisfy those roles. Just like the organisms in an ecosystem, market participants identify patterns in the markets based on the behaviour of other participants and use them to develop strategies. However, as every participant seeks to better achieve their objective for participating in the financial markets, their strategies change, causing the market to change in behavior and character, invalidating some patterns while encouraging the manipulation of new ones.
In this course, I will be teaching you how to isolate certain market characteristics and behavior to develop a speculative edge and implement it in an algorithmic trading system using the MQL5 language. This course is project based and we are going to achieve our objectives by analysing data on the weekly percentage changes in price. You will learn how to code an MQL5 script that will collect any desired financial market data and store it as a csv file, allowing you to organize, manipulate and analyse it from any historical period of interest.
In this course, we shall identify patterns in the weekly percentage price changes within a period of 18 years. We shall achieve this by visualizing data on a scatter plot and identifying useful data clusters that may represent price patterns of interest. We shall then develop a hypothesis based on patterns we can identify in the visualized data and test it by developing an algorithmic trading strategy based on it. The patterns we shall identify shall give us an edge in finding protocols for making trade entries and most of all, in developing exit strategies. We shall test our hypothesis using out of sample data to ensure that the trading strategy logic success is not due to over fitting but due to a true edge in the markets.
So hit hard on the enroll button, now, and join me on this exciting journey of coding a script to collect data and analyze it, providing us with a hypothesis to test within an algorithmic trading strategy