

Guide to Using and Customizing Your Expert Advisor
How to Update the EA When an Update is Available
To ensure your EA operates with the latest features and fixes, keep it updated. You can find step-by-step instructions in the blog linked below:
How to Update the EA
How to Run the EA on a Chart
Running your EA correctly on the chart is essential for proper functionality.
Attach the EA to a single chart of your choice. It works seamlessly by detecting and trading on the proper symbols and timeframe.
If additional symbols are required, update them in the inputs, ensuring no suffix or prefix is added.
Full details and setup instructions can be found in the following blog:
How to Run the EA on a MT4 Chart
How to Run the EA on a MT5 Chart
How Can I Join the MQL5 Channel?
For updates, announcements, and additional resources, you can join the MQL5 channel. Here is the direct link:
[Join MQL5 Channel]
How Should I Send My Account Name for a Custom Version?
If you need a custom version of the EA, you can find your account name in the MetaTrader Navigator section. Refer to the image below (to be added) for detailed guidance.
What Risk and Deposit Should I Use?
The minimum deposit can vary depending on your broker, but I recommend using a risk level of 1% or 2% per trade for better safety and control over your account.
What’s the Best Setfile?
The default settings are often the most reliable starting point. However, you can optimize or adjust them to suit your broker's specifications. you can find additional setfiles at end of this blog .
How to Backtest?
With MT4, backtesting is restricted to a single symbol. You must delete other symbols from the inputs, keep one, and select "every tick" mode. MT5, in contrast, offers multi-symbol support and provides perfect results.
How Can I Ask for New Options and Inputs?
If you have suggestions or requests for additional options and inputs, feel free to reach out to me in the MQL5 private chat. Your feedback is always welcome and appreciated.
Inputs Details
The EA’s inputs allow you to customize its behavior according to your trading style. Detailed descriptions of each input are provided in the guide to ensure you can configure the EA effectively.
Trading Symbols and General Setup
- Pairs : Defines the currency pair or symbol the EA will trade. For example, XAUUSD specifies gold trading.
- Detects symbol prefix and suffix automatically (disable to specify manually): if this option is true then it automatically finds the symbol suffix and prefix and its name like if its GOLD, but if its false then in the previous input you have to specifically write your symbol name.
- Determine main magic number : A unique identifier for trades managed by this EA to distinguish them from others.
- Comment: Add a custom comment to orders for better identification and trade tracking.
- EA strategy: Specifies the trading strategy used by the EA.
- Old strategy with low trades: This strategy is conservative, focusing on fewer but potentially higher-quality trades, designed for lower risk and longer-term market scenarios.
- New strategy with more trades: An aggressive strategy that increases trade frequency, aiming to capture more trading opportunities but may carry higher risk.
- Using both strategies: Combines the conservative and aggressive strategies, balancing between lower risk and higher trade frequency.
Lot Management and Risk Control
- Determine Lot Calculation Method: Choose how lot sizes are managed, such as based on balance or fixed sizes:
- A fixed amount for trading: Trades use a constant lot size for all positions, regardless of account size or market conditions.
- Tuning risk levels with balance percentage: Calculates lot size as a percentage of the account balance, dynamically adjusting to account growth or drawdown. for example if you set the risk% to 1 then it will lose only 1 percent of balance each time any trades hit SL.
- Risk % : Set the percentage of your account balance to risk for each trade. A common setting is 1-3%.
- Fixed Lot value : Specify a fixed lot size for trades if you prefer manual control over position sizes.
- Maximum Lot : Define the largest allowable lot size for trades. This helps cap exposure in volatile markets.
- Minimum Lot : Set the smallest allowable lot size, ensuring trades remain executable even with low balance or tight conditions.
Spread and Trading Schedule
- max spread before opening new order: Trades will only open if the spread is below this value, ensuring better execution and reduced slippage.
- Enable Monday Trading: Decide whether the EA trades on Mondays. This can be useful for avoiding volatile market openings.
- Enable Tuesday, Wednesday, Thursday, and Friday Trading: Toggle trading activity for each weekday to fit your strategy.
- prop firm tp & sl adjustment: Adjusts take profit (TP) and stop loss (SL) according to proprietary firm requirements.
- allow hedge : if this option is true then EA may trade orders opposite to each other.
- daily lost trades count restriction : Limits the number of losing trades allowed per day to control risk and avoid overtrading.
- Employ High Impact News Filter: If enabled, the EA avoids trading during high-impact news X hour before and X hour after events to minimize risks.
- avoid trading prior to news setting: if news filter is On then it wont open trades X hour before the news base on this input value.
- avoid trading after news setting : if news filter is On then it wont open trades X hour after the news base on this input value.
How to enable news filter in MT4/MT5
Go to MT4/MT5 and click tools>Options (or press ctrl+o) to open options of your MT4/MT5 terminal
Go to the "Expert Advisors" tab.
Tick the checkbox for "Allow WebRequest for listed URL".
Add this URL https://nfs.faireconomy.media and click OK.
- closing orders when drawdown is high: if this option is true then base on the input "max drawdown allowed" input value if we reach that number for drawdown it will close all orders.
- hour to close all expert's trades on Friday(-1:off) : if you set a value from 1 to 24 then if the time reaches that hour it will close orders on Friday (for example 21 means 21:00)
Trailing-Stop:
- trailing-stop: This is a Boolean input that specifies whether the trailing stop functionality is enabled. If set to true , the trailing stop logic will be applied; if set to false , it won't.
- trailing stop method: This input allows the selection of a trailing stop method from an enumerated list of options. The user can choose whether to use a fixed distance ( Relying on pips for guidance ) or a distance based on ATR (Indicating values in ATR terms value).
- trailing start in pips setting: Specifies the price distance in pips after which the trailing stop will begin. This prevents the trailing stop from activating prematurely. for example if set to 15 pips: The trailing stop will only activate after the price moves 15 pips in the trader's favor.
- trailing distance in pips setting: Defines the fixed distance in pips at which the trailing stop will follow the price when using the " Relying on pips for guidance" method.
- atr period for trailing setting: Defines the number of periods used to calculate the ATR for the trailing stop when using the " Indicating values in ATR terms value " method.
- atr timeframe for trailing setting: Specifies the timeframe used for calculating the ATR.
- atr trailing multiplier setting: Sets the multiplier applied to the ATR value to determine the trailing stop distance.
- trailing-stop: This is a Boolean input that specifies whether the trailing stop functionality is enabled. If set to true , the trailing stop logic will be applied; if set to false , it won't.
- trailing stop method: This input allows the selection of a trailing stop method from an enumerated list of options. The user can choose whether to use a fixed distance ( Relying on pips for guidance ) or a distance based on ATR (Indicating values in ATR terms value).
- trailing start in pips setting: Specifies the price distance in pips after which the trailing stop will begin. This prevents the trailing stop from activating prematurely. for example if set to 15 pips: The trailing stop will only activate after the price moves 15 pips in the trader's favor.
- trailing distance in pips setting: Defines the fixed distance in pips at which the trailing stop will follow the price when using the " Relying on pips for guidance" method.
- atr period for trailing setting: Defines the number of periods used to calculate the ATR for the trailing stop when using the " Indicating values in ATR terms value " method.
- atr timeframe for trailing setting: Specifies the timeframe used for calculating the ATR.
- atr trailing multiplier setting: Sets the multiplier applied to the ATR value to determine the trailing stop distance.
Martingale Features
- Martingale Feature Active: Enable or disable the martingale strategy, which increases position sizes after losses to recover.
- Set Method for Martingale Distances: Choose how the distance between martingale orders is calculated:
- Base on fixed distance in pips: Trades are spaced at a constant pip distance, ignoring market conditions.
- Indicating values in ATR terms: Distance is calculated dynamically based on the Average True Range, making it adaptive to market volatility.
- Referring to quantities with Moving Average as the base: Determines trade spacing based on the deviation of current price from a Moving Average.
- Referring to quantities with Bollinger Band as the base: Uses Bollinger Bands line distance to current price to decide trade spacing, adjusting for market volatility and trends.
- Carrying out actions triggered by the next signal: Increases the lot of next trade but only when a new trading signal is generated.
- Set Method for Calculating TP: Specify the take-profit calculation for martingale orders:
- Assigning initial TP level to all Take Profits: Sets the TP of all martingale trades to match the TP of the initial trade in the series.
- Fixing TP based on the open price of the previous order: Sets the TP relative to the entry price of the last opened martingale order.
- Determining the spacing relative to the previous order's open price: Calculates TP based on a percentage of the distance between the current trade and the previous trade's open price.
- Assigning the TP to be the mean of all TP levels: Averages the TP levels of all trades in the martingale series, aiming for a balanced closure point.
- Set TP Percentage of Distance: Determines the take-profit as a percentage of the distance between martingale orders.
- Set Fixed Points Distance for Martingale: Defines a constant pip distance between martingale orders.
ATR-Based Martingale Settings
- ATR Period for Martingale: Sets the ATR calculation period, determining volatility-based distances for martingale orders.
- Multiplier of ATR for Martingale: Adjusts the ATR value used to calculate martingale distances, increasing or decreasing sensitivity to volatility.
Martingale Profit Control
- Max Percent of Initial Lot to Add: Caps the maximum additional lot size as a percentage of the initial lot for martingale trades.
- Set Profit Type for Martingale: Choose between profit types, such as fixed USD or percentage of balance.
- Total Profit (USD) for Martingale: Define the total profit target in USD for closing martingale trades.
- Total Profit (% of Balance) for Martingale: Set the total profit target as a percentage of account balance.