
Understand prerequisites for semi-high frequency trading in MQL5: zero-spread accounts, low latency, and every tick testing to model real conditions; see how spread and commissions impact stop losses and scalping.
Explore a semi high frequency trading strategy for eurodollar on a one minute frame, tested with tick data, no news within 15 minutes, and a two pip stop loss.
Define general parameters for a semi-high frequency trading expert advisor, including e id, symbol, time frame, and one-pip slippage, and customize chart visuals on initialization and each tick.
Include the trade.mqh file, instantiate the C trait class and position/info objects, and configure expert magic number and maximum slippage to enable entering and managing trades.
Implement a risk option for fixed or balance-based lots, define inputs and enums, initialize symbol limits, and calculate a normalized lot within min, max, and step for MetaTrader five marketplace.
Count the total trades and trades by type to regulate entry frequency, using functions that filter by symbol, position type, and author, and tally pending orders by symbol and comment.
Implement a two-session time zone filter in MQL5 to enter trades only during defined intervals, using start and end hours and minutes to target volatile market moments.
Implement a spread filter for the MQL5 semi-high-frequency trading strategy by setting a maximum slippage in points, using symbol spread data, and toggling the spread filter for testing.
Configure a boolean news filter and a high-importance calendar to avoid trades during upcoming news in a high-frequency scalping strategy.
Prepare for trade entry by adding stop loss and a two-pip pending distance, and define price variables to convert pips to price values.
Implement an enter trades function that computes free matching, verifies margin and pending orders, and places buy stop and sell stop orders with entry, stop loss, and comments.
Create a void function delete_pending to remove other pending orders once one is activated by looping orders, checking comments, and deleting with the trade object using the ticket.
Implement a trailing stop function in MQL5 that loops through open trades, validates symbol and expert advisor, and updates stop loss one pip behind current price.
Initialize ask and bid prices on every tick using symbol info. Check trading sessions, news, and spread to enter trades, manage pending orders, and apply trailing stop loss.
Test the semi-high frequency trading strategy in mql5 with the strategy tester on eurodollar 1-minute data, focusing on zero latency and the lowest per-bar spread.
We conclude by reflecting on coding a semi high frequency trading strategy with Mql5; results are promising, and you can apply ideas to your own personal projects.
Semi-High Frequency Trading is a trading technique that lies somewhere between traditional pattern trading and fully automated high-frequency trading. It involves using advanced technology and algorithms to execute trades at a faster pace than typical algorithmic trading algorithms, but not as quickly as full high frequency trading system. For retail traders with limited capital, Semi-High Frequency Trading offers a potential avenue to exploit market inefficiencies and generate profits.
Semi-high frequency trading algorithms have been gaining a lot of popularity in recent years mainly due to their effectiveness and simplicity that provides reproducible results in a short space of time.
In this course I want us to code a Semi high frequency trading strategy and evaluate its feasibility using the MQL5 trading language. We shall start by explaining the pre-requisites of trading a semi-high frequency trading strategy and also investigate the trading logic of the strategy that we shall code together.
We shall then begin coding our EA from scratch by including a custom chart appearance which ensures that we can aesthetically view the activities of our EA when it’s loaded onto any chart. We shall then code a trade session filter which will ensure that we trade only the London session and New York session to ensure that we participate in the market only when there is a lot of momentum to be expected. We shall code a spread filter to ensure that we trade with the lowest possible spread to ensure that our strategy trades as intended and exits are as accurate as possible. We shall also code a news filter to reduce the impact of news releases and avoid trading in such market conditions. We shall then employ the logic of our strategy to code functions that will execute trades when suitable conditions avail themselves.
For those that are still finding their way with MQL5, as long as you understand the basics of MQL5, this course is for you. We will patiently guide you through every step of the strategy development process and walk you through every line of code we shall craft. Hopefully, by the end of the course, you will have gained the necessary skills to code similar trading strategies and be able to appreciate how semi high frequency trading can improve your strategies.
So hit hard on that enroll button now and join me in this incredible journey of coding a semi high frequency trading system.