Please read the General Documentation before starting with this section #
—- Header—– #
Chart Title / Name: Here you can place a text or identifier for the chart or strategy which will be displayed as a title on the chart. This can help facilitate the identification of charts and settings in a portfolio setup and to differentiate between different settings.
If you input the word “NULL” or “DISABLE” then the algo will disable the creation of the text box which would display the title and information.
If this input is left default or blank then a default text will be displayed including Expert Name (from the EA file name) + Symbol + Execution Timeframe
Otherwise the format will be INPUT TEXT + Expert Name (from the EA file name) + Symbol + Execution Timeframe number
—- Licensing —– #
License Key: This is the area in which you copy your License Key.
(For the License Key check to work properly you need to Allow WebRequests from https://www.desiretotrade.com)
(The License Key validity is checked every 7-14 days, if the entered Key is invalid then the EA will notify the user and unload itself from the chart)
(If the EA can´t communicate with our servers then the EA will take this as an invalid key)
Note: If no license key or an invalid license key is used the EA will only work in Back-testing mode.
To validate your license key use the DTT Tester EA. #
—- Allow New Trades Entry —– #
Allow new Buy Trades (default=true): If true the EA will be allowed to take new BUY trades.
Allow new Sell Trades (default=true): If true the EA will be allowed to take new SELL trades.
If false the EA wont take new trades but if any existing trade is open it will be managed according to the exit and trailing SL rules.
—- Risk and Position Sizing Variables —– #
Position size method to use (default = Fixed % of Balance (2)): Choose which of the 4 types of position sizing to use.
Fixed Lot: will open each order with the designated lot size (eg. 1 lot will open a 1 lot trade for TP1 and another 1 lot Trade for TP2)
Equity Per Lot: Lot size will be calculated as a fixed value based on account equity. (eg. 10,000 equity per lot means that for every 10,000 of account balance a 1.00 Lots trade in total will be opened across TP1 and TP2)
Fixed % of Equity: Lot size for positions will be calculated to represent the % risk per trade stated based on account Equity. (eg 1% risk per trade will open TP1 and TP2 trades representing in total a 1% risk of the account equity at the time of order placement)
Fixed % of Balance: Lot size for positions will be calculated to represent the % risk per trade stated based on account Balance. (eg 1% risk per trade will open TP1 and TP2 trades representing in total a 1% risk of the account Balance at the time of order placement)
Fixed $: Lot size will be calculated to risk the designated $ (in account deposit currency) per trade. eg. 1,000 risk per trade will open TP1 and TP2 trades in total representing a 1,000 risk)
Risk, Lot size, or Equity per Lot (default = 1): Amount to use for the risk calculations.
If using fixed lot, this value will mean lots.
If using Equity Per Lot, this value means equity units in account base currency per every 1.00 standard lots to be traded.
If using fixed % this value will mean % of account equity.
If using fixed $ this value will mean $.
Roundturn Commission Per Lot (in deposit currency) (default = 7): Broker commission per lot for R:R calculations. If you are using an account that has no commissions then use 0, if your broker is an ECN/Razor/raw/direct type of account then input here your broker round turn commission per lot in account currency to have more accurate R:R calculations.
Max Open Algo Exposure allowed (0 disables it) as % of Account Equity (default = 0): If this input has a value between 0 and 100 the algo will calculate the existing exposure related to the trades in the account with the same magic numbers that this algo uses and prevent the entry of new trades if doing so would exceed the Maximum exposure allowed.
Max Open Account Exposure allowed (0 disables it) as % of Account Equity (default = 0): If this input has a value between 0 and 100 the algo will calculate the existing exposure for all the trades in the account and prevent the entry of new trades if doing so would exceed the Maximum exposure allowed.
Base Magic number to use (default = 400000): This is the magic number the EA will use when opening orders. The magic number can be used to track the trades for the EA and it is used to manage the trades if needed.
(The EA automatically adds the Time Frame code to the magic number you place in order to correctly identify multiple trades on a single pair but generated from different Time-frames, this TimeFrame code is based on MT5 internal values for timeframes)
Enable FIFO Compatibility (default = false): If true the EA will change how lot sizes are calculated in order to make the trades compatible with FIFO rules required by US Brokers. When enabled this ensures that all trade parts have at least 1 minimum lot difference which makes them compatible with FIFO rules.
If false the EA calculates position size as normal and for every TP1 and TP2 1 order with an equal size is sent to the broker. This option is supported by most brokers of the world and it's preferred for consistency.
Note: Only Turn FIFO to True if you are using a broker which requires FIFO compliance.
Max Slippage allowed in points: This control the maximum slippage allowed for the trade entries. You do not need to change this setting unless you are using liquid assets that may have high slippage on some brokers (eg. crypto, some CFDs)
——- Indicators Parameters ——– #
Execution TimeFrame (default = current): Select the timeframe you want the EA to use as a base for the setup.
If “current” is selected then the EA will use the chart timeframe for calculations
If any other timeframe is selected then the EA will use the selected timeframe for the calculations irrespective of the chart timeframe.
BB MA Period (default = 20): The period for the SMA of the Bollinger Bands.
BB Deviation (default = 2.0): The standard deviation value for the Bollinger Bands.
The default is 2.0 which means that we are looking for a move outside the “normality” of 95% of the sample.
You can use this Normal Distribution table as a guide when adapting this parameter for laxer or stricter extreme conditions (Higher will be more strict)
Confidence Interval (%)
90
95
95.44
97
98
99
99.74
Deviation Value
1.65
1.96
2
2.17
2.33
2.58
3
——- SL and TP Settings ——- #
TP1 R:R (default = 1.0): Reward to risk ratio used for the 1st order.
TP2 R:R (default = 2.0): This is the Reward to Risk ratio to set the TP of the 2nd order.
Note: To do the trade scaling adequately the EA will send 2 orders with different TP each one
Note2: If both TP1 and TP2 R:R are the same value only 1 trade is sent
——- Candlestick Patterns to use ——- #
Engulfing Bars (default = Base EB): This tells the EA to use Engulfing Candles as an entry signal.
Disable EB | Disable Engulfing bars entry |
Base EB | Use the Base engulfing bar rules (least strict). The base setup is defined as Close above the high of the previous candle and the previous candle is in the opposite direction. |
EB – PA filter | Use Price action filter.
The PA filters are designed based on the price action rules for determining engulfing bars quality. In all cases using the PA filter has more strict rules than using the Base or Basic Engulfing Bars. The factors that the filter takes into account are as follows.
|
Use Reversal Bars (default = false): Enable or disable the use of Reversal as an entry setup. (Definition may be refined and updated in future versions).
The current candle must be of opposite direction of the previous candle. Current candle must close above / below the previous candle open to signal that there is a single candle reversal in the works.
Use Rejection Bars (default = true): Enable or disable the use of Rejection as an entry setup. (Definition may be refined and updated in future versions).
A rejection bar is a bar with a wick of 45% or larger of the candle body in opposite direction to the setup and no more than 33% as the opposite side wick.
Use Pin Bars (default = false): Enable or disable the use of Pin Bars as an entry setup.
Pin Bar is defined as a candle that has a wick of 33% or more of its candle size, with the wick being no more than 50% of the candle size.
Use Inside Bars (default = false): Enable or disable the use of Inside Bars as an entry setup.
Inside Bar is defined as a candle whose High is lower than the previous candle and its Low is higher than the previous candle.
——- Strategy Filters ——- #
Candles to expiry (default = 1 ): This tells the EA how many candles (time) to add to the expiry date & time of orders it opens.
If “Candles to expiry” is set to 0 the algo will enter the trades at the market once the signal candle is formed.
(Most MT4 brokers do not allow expiry times smaller than 5 minutes while others don't allow expiry times smaller than 15 minutes. It is important to keep this in mind if trading lower timeframes)
BB Pierce Strict (EB and Previous Candle Pierce BB) (default = true):
If “True” the EA will only take setups when both the last 2 bars have pierced the Bollinger Bands.
If “false” the EA will only check if any of the last 2 candles have pierced the Bollinger bands.
Avoid SMA Pierce (Ignore setup if Middle Band Pierced) (default = True):
If “true” the EA will not take setups if the “signal” candle has pierced the middle Bollinger Band.
If “false” the EA will take setups independently of whether the “signal” candle pierces or not the middle Bollinger Band.
—— Additional Filters ——-
#
The advanced trade filters section is based on the concepts exposed by Martyn Tinsley in his algorithmic trading series.
Please watch the following videos to fully understand the meaning and use of the filters.
—— MA Trend Filter Mode —— (default = Disable Trend Filter (0)): This allows you to choose the behavior of the EA when using the advanced trend filter.
The trend filter uses a MA to determine trend conditions (price above the MA line means Bullish trend, while the price below the line is Bearish trend).
Disable Trend Filter (0) | Disable Trend Filter |
With Trend + Close Trades on Trend Change (11) | Only Trade setups which occur in Trend conditions will be taken as valid, all other setups will be ignored. Trend filter will close and exit the trade when the trend has changed from an uptrend to a downtrend or vice versa. |
Counter Trend + Close Trades on Trend Change (22) | Only Trade setups which occur in Counter Trend conditions will be taken as valid, all other setups will be ignored. Trend filter will close and exit the trade when the trend has changed from an uptrend to a downtrend or vice versa. |
With Trend Only (1) | Only Trade setups which occur in Trend conditions will be taken as valid, all other setups will be ignored. |
Counter Trend Only (2) | Only Trade setups which occur in Counter Trend conditions will be taken as valid, all other setups will be ignored. |
Supplementary Watching:
How to Develop Trading Systems using Trend Filters and Indicator Triggers
—— Volatility Filter Mode —— (default = Disable Volatility Filter (0)): This allows you to choose the behavior of the EA when using the advanced Volatility filter.
The volatility filter uses a percentile-ranked ATR to determine relative volatility for a given asset.
The higher the value of the Percentile Ranked ATR, the higher the relative volatility and vice versa.
Disable Volatility Filter (0) | Disable Volatility Filter |
Low Volatility Only (50% Vol or Lower) (1) | Only Trade setups which occur in Low Volatility conditions will be taken as valid, all other setups will be ignored.
Low Volatility is defined as 50% or less on the ATR Percentile indicator. |
High Volatility Only (50% Vol or Higher) (2) | Only Trade setups which occur in HighVolatility conditions will be taken as valid, all other setups will be ignored.
High Volatility is defined as 50% or Higher on the ATR Percentile indicator. |
Avoid Extreme Volatility (75% Vol or Lower) (3) | Avoid Trade setups that occur in Extreme Volatility conditions will be taken as valid, all other setups will be ignored.
Extreme Volatility is defined as 75% or Higher on the ATR Percentile indicator. |
Extreme Volatility Only (75% Vol or Higher) (4) | Only Trade setups that occur in Extreme Volatility conditions will be taken as valid, all other setups will be ignored.
Extreme Volatility is defined as 75% or Higher on the ATR Percentile indicator. |
Supplementary Watching
Using a ‘percent-based' ATR (Average True Range) Volatility Filter
—— Market Noise Filter Mode —— (default = Disable Market Noise Filter (0)): This allows you to choose the behavior of the EA when using the advanced Market Noise filter.
The market noise filter uses a Kaufman's Efficiency Ratio calculation (indicator available in the Bonus Scripts and Resources section) to determine relative market noise for a given asset.
The lower the value of the Kaufman's Efficiency Ratio, the higher the relative market noise and vice versa.
Disable Market Noise Filter (0) | Disable Market NoiseFilter |
Low Market Noise Only (50% Market Noise or Lower) (1) | Only Trade setups that occur in Low Market Noise conditions will be taken as valid, all other setups will be ignored.
Low Market Noise is defined as 50% or higher on the Kaufman's Efficiency Ratio indicator. |
High Market Noise Only (50% Market Noise or Higher) (2) | Only Trade setups that occur in High Market Noise conditions will be taken as valid, all other setups will be ignored.
High Market Noise is defined as 50% or less on the Kaufman's Efficiency Ratio indicator. |
Extremely High Market Noise (75% Market Noise or Lower) (3) | Only Trade setups that occur in Extreme High Market Noise conditions will be taken as valid, all other setups will be ignored.
Extreme High Market Noise is defined as 25% or lower on the Kaufman's Efficiency Ratio indicator. |
Avoid Extremely High Market Noise (75% Market Noise or Lower) (4) | Trade setups that occur in Extreme High Market Noise conditions will be taken as invalid, all other setups will be taken.
Extreme High Market Noise is defined as 25% or less on the Price Density Percentile indicator. |
Supplementary Watching:
Is Market Noise beneficial to Mean-Reversion Trading Strategies?
How Market Noise Affects Trend-Following Trading Systems | Whipsaws
Using a Market Noise Filter to improve Trading Edge | Research Results 3
-*- Additional Filters TimeFrame -*- (default = Base/Execution (0): This allows you to choose the timeframe the EA will use when calculating the additional Trend, Volatility and Market Noise Filters. Note: This will use standard MT4 time frames instead of MT5 ones for the advanced filters for simplicity.
Base/Execution Timeframe (0) | Additional Filters will use the same Timeframe as the EA execution. |
1 Timeframe above Base/Execution (1) | Additional Filters will use 1 MT4 standard Timeframe above the EA execution timeframe. |
2 Timeframes above Base/Execution (2) | Additional Filters will use 2 MT4 standard Timeframes above the EA execution timeframe. |
3 Timeframes above Base/Execution (3) | Additional Filters will use 3 MT4 standard Timeframes above the EA execution timeframe. |
4 Timeframes above Base/Execution (4) | Additional Filters will use 4 MT4 standard Timeframes above the EA execution timeframe. |
—– Pivot HL S/R Filter Options ——- #
Use Pivot HL S/R Filter (default = true): Tell the Algo if you wish to use the Pivot High Low Support and Resistance Areas to filter trades.
Candles to use for Pivot HL calculation ( default = 5): This sets how many candles are checked to determine each local High or Low in the market structure. Setting this value to 3 would have similar results to using MT5 built in “Fractals” indicator, Higher values mean stronger and more meaningful local High and Lows but delays response and can led to wider Trailing SL using the Pivot High Low Method.
Size Multiplier (Recommended 0.75/1.0/1.5) Larger = Wider Zones (default = 1.5): This setting controls the size of the S/R areas.
Pivot HL Lookback (Recommended 1/3) Larger = Further Away Zones (default = 3): This setting controls the minimum amount of Pivot High Low structures that will be used to determine an S/R area base point.
This last 2 inputs together work to create the size and placement of the Pivot High Low S / R areas.
Plot S/Rs on the chart (default = true):
If “true” the EA will plot the S/R areas on the chart for ease of visualization by the user.
If “false” the EA will not plot any S/R for the user to visualize. The EA does not need the zones to be plotted to read the file or the Fractal S/R areas as they are calculated internally. Lines are only for the user to visualize the zones that the EA is currently using.
– Fractal S/R TimeFrame – (default = 2 Timeframes above Base/Execution (2)): This allows you to choose the timeframe that the EA will use when calculating the values of the Fractal S/R filter.
Base/Execution Timeframe (0) | Fractal S/R will be determined using the same Timeframe as the EA execution. |
1 Timeframe above Base/Execution (1) | Fractal S/R will be determined using 1 MT4 standard Timeframe above the EA execution timeframe. |
2 Timeframes above Base/Execution (2) | Fractal S/R will be determined using 2 MT4 standard Timeframe above the EA execution timeframe. |
3 Timeframes above Base/Execution (3) | Fractal S/R will be determined using 3 MT4 standard Timeframe above the EA execution timeframe. |
4 Timeframes above Base/Execution (4) | Fractal S/R will be determined using 4 MT4 standard Timeframe |
——— Trade Management ——— #
Break Even After TP1 is closed (default = false):The EA will move the SL of the TP2 order to Break Even once TP1 is reached. (Only works if TP1 is smaller than TP2 or Trailer / Trail End Order is enabled.)
When to Start Trailing SL (if enabled) (default = Start After TP1 (1)): Tells the EA when to start trailing the below Trailing SL if selected.
Start Immediately (0) | If the any of the Below Trailing SL methods are selected then it will start trailing the orders based on its rules as soon as the trade is placed. |
Start After TP1 (1) | If the any of the Below Trailing SL methods are selected then it will start trailing the orders based on its rules only after TP1 has been reached and is closed. This means that it will only apply to TP2 and the trailer order if enabled. |
Start After TP2 (must have Trailer/Trail End enabled) (2) | If the any of the Below Trailing SL methods are selected then it will start trailing the orders after both TP1 and TP2 have been reached and closed. This means that it will only apply to trailer orders if enabled. |
ATR H/L TSL Multiplier (0 = Disabled) (Default =0): Value of the ATR multiplier for the ATR High Low Trailing SL Method. This Method will trail the SL by applying the ATR multiplier to the 14 period ATR. This value will then be added or subtracted to the High (for Sells) or Low (for Buys) to determine the new SL to use.
Use Pivot H/L Trailing SL (Default =false): If true the algo will use the pivot High Low Trailing SL, This trailing SL method tries to find structural highs and lows to trail the SL to.
Use Parabolic SaR Trailing SL (Default = Disabled (0)): This Trailing SL method uses the Parabolic SAR indicator to trail the SL allowing for a generally more dynamic trailing SL but leaving enough room for price movement.
Disabled (0) | Disables the Trailing SL Method |
Slow Trailing (1) | Enables the Parabolic Sar Trailing SL which uses a slower Parabolic SaR setting to allow more room for price movements before a continuation |
Standard Trailing (2) | Enables the Parabolic Sar Trailing SL which uses the default Parabolic SaR settings to allow for a more dynamic trailing SL |
—— Working Hours — (For use on Time-frames lower than D1) ——- #
Close Trades Outside Working Hours (Default =false): If true the algo will close all its related trades whenever the current Market Watch time is outside the stated “Working Hours”
Start Hour (0-23) (default = 2) |
Amount of hours to work (1-24) (default = 22) |
This tells the EA in which hours to take new trade setups. The EA will take the time as the server time not the local time of your computer.
Start Hour (0-23) is the hour based on your broker time you want the algo to start looking for trades.
Amount of hours to work (1-24) is how many hours you want the algo to work counted from the start hour. If the resulting number goes over 24 then it rolls over to the start of the next day.
As an example Start Hour (0-23) = 1 and Amount of hours to work (1-24) = 22 hours means that your algo works 22 out of 24 hours of the day and that starts counting at 01 so it will trade from 01 hours all the way to the end of the 22nd hour of the day based on your broker MT4 server time.
—– Working Days — (For use on Time-frames lower than W1) ——- #
|
|||||
Trade Saturday (default = true) | |||||
Trade Sunday (default = true) |
All these settings tell the EA if it can open new orders on that day.
If “false” then the EA will ignore any new setups that happen during that day
If “true” then the EA will take any new setups that happen during that day
—— END OF WEEK OPTIONS — (For use on Time-frames lower than MN1) —— #
Enable Closing Trades on Friday (default = true):
If true the EA will close any open trades on Friday to avoid having open trades over the weekend.
If Trading on Saturday or Sunday is also disabled this will make sure to close trades on Friday after the specified time + Saturday and/or Sunday.
If False then the EA will allow trades to be opened during the weekend.
Friday end of trading Hour (default = 20): This is the hour (on broker time) in which the EA will start closing out all trades and prevent new trades from happening if the previous setting is true. (this input accepts values from 0-23)
Friday end of trading Minute (default = 00): This is the minute (on broker time) in which the EA will start closing out all trades and prevent new trades from happening if the previous setting is true. (this input accepts values from 0-59)
——- Notification Methods ——- #
——- Use MT5 Mobile Notifications ——- (default = false): Tell the EA to use MT5 mobile notifications.
If “false” the EA will not send MT5 Mobile notifications as alerts.
If “true” the EA will send MT5 Mobile notifications as alerts.
(The MT4/MT5 Mobile notifications can´t be sent with a screenshot of the chart due to limitations of the MT4/MT5 Mobile notifications system)
To use the MT4/MT5 Mobile notifications you need to enable Push notifications and enter your Meta Quotes ID (MQID) in the terminal options.
(For instructions check the “Using MT5 Mobile Notifications” section in the general documentation)
——- Use Telegram Alerts ——- (default = false): Tell the EA to use MT4 mobile notifications.
If “false” the EA will not send Telegram alerts.
If “true” the EA will send Telegram alerts.
(To use Telegram Alerts you will need to allow web requests from https://api.telegram.org/ in the MT5 configuration)
(For instructions check the “Using the Telegram alerts” section in the general documentation)
Token: Your Telegram bot private key token (you get it when you create your telegram bot. Keep this number safe!)
Chatid (in number format): This is the ID number of your chat so your bot can send you messages. (for how to get this ID read the “Using the Telegram alerts” section in the general documentation)
—Optimizer & Backtester Inputs— #
The next section is only for the MT5 Strategy tester backtests and optimizations.
Backtest/Optimization Position Size Method (default = Do not Use Backtest Position Sizing Modifiers (-1)): This input tells the EA to ignore the manually selected Position sizing methods and use the selected standardized positions size method instead.
This is really useful when doing advanced optimizations and backtest between multiple assets as you can select the correct standardized position size. Or you can use it to test different position sizing methods and how they affect the strategy.
It is recommended to use fixed $ or fixed 1 Lot when you want to make a portfolio with multiple backtests and join them together.
Apply Below settings to Live Trading (default = true): This lets the EA know that you want to apply the below settings to your live trading as well as backtests. If false then the EA will only apply this settings to backtests and optimizations. If using an optimization .set file its recommended to set this to true.
Backtest/Optimization R:R Model (default = Do not modify R:R (0)): This input tells the EA to modify the values of TP1 R:R and TP2 R:R internally for backtests and optimizations.
This is really useful when doing advanced optimizations to decrease the number of combinations that can happen when optimizing TP1 and TP2 values (eg, TP1 R:R = 3 and TP2 R:R = 2 can be considered duplicate to TP1 R:R = 2 and TP2 R:R = 3 so by using the list bellow, some of this can be avoided and thus increase the optimization speed)
Custom Statistic To Use #
For this section please read the Advanced Custom Statistics article
No Comment