Divergence Trader
This tool for MetaTrader 5 is specifically engineered to streamline your trading operations. 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 Divergence Trader
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
This Expert Advisor developed by Ron Thompson is rewritten from MQL4 and was originally published here by .
How It Works
The Expert Advisor employs two simple of opening prices. Calculations are made using values obtained from the current bar and the previous bar. If rearranged, the formula simply represents the difference between the fast MA and slow MA from the previous bar. The difference being above one level and below the other level suggests a buy signal. Conditions for a sell signal are the exact opposite of those for a buy signal.
A trailing stop and breakeven can be set for an open position.
The image below shows the performance of the Expert Advisor in the strategy tester's visual mode.
Parameters
Lots - Position volume.
MultyOpen - Permission to add volume to a position.
MaxVolume - Maximum position volume; it is checked if MultyOpen is used.
StopLoss - Stop Loss in points.
TakeProfit - Take Profit in points.
Trailing - Trailing stop level; when the value is 0, the trailing stop is disabled.
BreakEven - Profit level of a position expressed in points in order to move the Stop Loss to the breakeven level. If the value is 0, the function is disabled.
Fast_Period - Fast МА period.
Fast_Price - Fast МА price.
Slow_Period - Slow МА period.
Slow_Price - Slow МА price.
DVBuySell - minimum divergence level for Buy, for Sell it is -DVBuySell.
DVStayOut - minimum divergence level for Sell, for Buy it is -DVStayOut.
BasketProfitON - Enables the function for closing all positions in the account when a certain profit level is reached.
BasketProfit - Account profit at which all account positions will close (for all symbols).
BasketLossON - Enables the function for closing all positions in the account when a certain loss level is reached.
BasketLoss - Account loss at which all account positions will close (for all symbols).