MS L E A - Expert Advisor using Market Structure High/Low
This software component for MetaTrader 4 is built to enhance the capabilities of your trading environment. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.
How to Setup and Use MS L E A - Expert Advisor using Market Structure High/Low
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
Description & Settings
MS Lea calculates the last n Local Highs/Lows and waits for a break out. Please see my article at about Local High/Low.
We make a long trade if the price moves above the local high. (if the price goes above the green line)
We make ashort trade trade if the price goes below the local low. (if the price goes below the red line).
Additional a distance in PIPs can be added, so for example the price must move 5 pips above the last high for a long trade or 5 pips below the low.
The trades gets stopped by trailing stop loss.
Parameters:
Level: 1 = Last recent local high/low. Higher numbers use the minimum/maximum of the last n local low/high.
Distance: Distance in Pips from the low/high
MaxTrades: Number of trades allowed. It creates a new trade, each time the stop loss of all other trades is save.
Lots. (0 = Minimum required lots)
Stop Loss (negativ = -x * minimum stop loss, e.g. if your broker lets you set stop loss eurusd at minimum 10 pips, -3 means 30 Pips Stop Loss)
TakeProfit (same with negativ numbers)
BreakEven (same with negative numbers). If it wins x pips, it sets the stop loss to 0
The expert is able to open as many positions as you like, however in order to open a new position, the stop loss of all other positions must be save.
The expert is split into ea.mhq which goes into the include directory and the expert code. This keeps the expert code small and simple while all order management and tools are separete. You are welcome to develop your own expert with ea.mqh.
Strategy Tester Report
MSLea
EGlobal-Cent2 (Build 229)