Please read the General Documentation before starting with this section #
Inputs #
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 invalid license key is used the EA will only work in Back-testing mode.
To validate your license key use the DTT Tester EA. #
—- Risk and Magic Variables —– #
Allow EA to Trade (default=true): If True the EA will be allowed to take trades.
False doesn't let EA take new trades but if any existing trade is open it will be managed according to the exit and trailing SL rules.
Position size method to use (default = Fixed %): Chose which of the 3 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 %: 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 $: 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 = 50000): 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 TimeFrame code to the magic number you place in order to correctly identify multiple trades on a single pair but generated from different Timeframes)
Treat all Timeframes as 1 (default = false): If true it will use the same magic number for all trades and will enforce scaling rules across all timeframes.
If false each timeframe will have a unique magic number and scaling rules will be enforced on an individual timeframe basis.
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.
——- 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 irrespectively of the chart timeframe (this can be used for fast and accurate backtests using M1 data, selecting the desired timeframe for the backtest, and using the M1 timeframe for the backtester).
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
% of EB above/below H/L for Entry (default = 10): The % relative to the size of the Engulfing Bar to place the entry above/below the signal candle. (This allows accounting for varying market conditions. Recommended settings are between 0 – 20 depending on the volatility of the instrument)
% of EB above/below H/L for SL (default = 5): The % relative to the size of the Engulfing Bar to place the SL above/below the 3 previous candles high/low. (This allows accounting for varying market conditions. Recommended settings are between 0 – 20 depending on the volatility of the instrument)
TP1 R:R (default = 1.0): Reward to risk ratio used for the 1st order.
TP2 R:R (default = 3.0): This is the Reward to Risk ratio to set the TP of the 2nd order.
Note: In order 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 – Lax PA filter | Use Lax Price action filter (Tolerance set to 1x the engulfing bar size) |
EB – Med PA filter | Use Medium Price action filter (Tolerance set to 0.5 x the engulfing bar size) |
EB – Strict PA filter | Use Strict Price action filter (No tolerance, the EB Pattern has to be the absolute high or low of the last 7 candles.) |
More information about the PA filters.
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.
-
Engulfing Bar has to a wick of less than 33% of the candle size against the direction of the bar.
-
The no candle in the past 5 candles can be larger than 1.25 times the size of the engulfing bar.
-
The engulfing bar pattern has to be the highest/lowest point of the previous 7 bars within a certain tolerance. This tolerance value is what makes the filter Lax, Med or Strict
- This means that the highest/lowest point of the previous 7 candles can not be higher/lower than the engulfing bar high/low. The tolerance level allows for a tolerance up yo X times the size of the engulfing bar size in case any of the previous 7 candles is higher/lower than the engulfing bar high/low.
- This means that the highest/lowest point of the previous 7 candles can not be higher/lower than the engulfing bar high/low. The tolerance level allows for a tolerance up yo X times the size of the engulfing bar size in case any of the previous 7 candles is higher/lower than the engulfing bar high/low.
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.
——- Additional 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.
Cancel pending Orders on SL (Cancel Pending if SL is touched before trigger) (default = true):
If “true” the EA will cancel pending orders if the price goes to the SL before the order is activated.
If “false” the EA will let pending orders continue until expiration even if the price goes to SL before the order gets activated.
—— Advanced 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.
—— Additional Trend Filter Mode —— (default = Disable Trend Filter (0)): This allows you to choose the behavior of the EA when using the advanced trend filter.
(Note: Indicator available in the Bonus Scripts and Resources section.)
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). If MA Slope is selected then the MA slope is used to determine the trend (Positive MA slope value means Bullish trend while negative MA slope value means Bearish trend. Finally if the MA slope value is almost completely flat or near 0 there will be a No Trend condition)
Disable Trend Filter (0) | Disable Trend Filter |
Trend + No-Trend (1) | Only Trade setups which occur in Trend and No-Trend conditions will be taken as valid, all other setups will be ignored. |
Counter Trend + No-Trend (2) | Only Trade setups which occur in Counter Trend and No-Trend conditions will be taken as valid, all other setups will be ignored. |
With Trend Only (3) | Only Trade setups which occur in Trend conditions will be taken as valid, all other setups will be ignored. |
Counter Trend Only (4) | Only Trade setups which occur in Counter Trend conditions will be taken as valid, all other setups will be ignored. |
No-Trend Only (5) | Only Trade setups which occur in a No-Trend condition will be taken as valid, all other setups will be ignored. |
MA Period (default = 100): Length in candles of the MA to use as the base for the trend filter.
MA Calculation Method (default = Smoothed): The type of Moving Average (MA) that will be used to determine the trend condition.
Use MA Slope (default = true): if “true” the Trend filter will use the MA slope to determine the trend condition. If “False” the Trend filter will determine the trend by looking at the price relative to the MA value.
Exit On Trend Change (default = true): If “True” the Trend filter will close and exit the trade when the trend has changed from an uptrend to a downtrend or vice versa.
If “NoTrend” Behavior is selected Exit On-Trend Change will have no effect.
***Only exits the trade when the trend has changed from an uptrend to a downtrend or vice versa, not when there is a no-trend condition.***
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 (indicator available in the Bonus Scripts and Resources section) 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) (2) | 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 less on the Price Density Percentile indicator. |
High Market Noise Only (50% Market Noise or Higher) (3) | 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 higher on the Price Density Percentile indicator. |
Avoid Extremely High Market Noise (75% Market Noise or Lower) (4) | 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 75% or higher on the Price Density Percentile indicator. |
Extreme Low Market Noise Only (25% Market Noise or Lower) (1) | Only Trade setups that occur in Extreme Low Market Noise conditions will be taken as valid, all other setups will be ignored.
Extreme Low 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
–*-*- Trend, Vol, and Noise Filter TimeFrame -*-*– (default = 2 Timeframes above Base/Execution (2): This allows you to choose the timeframe the EA will use when calculating the advanced Trend, Volatility and Market Noise Filters.
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. |
—– S/R Filter Options ——- #
SR Areas Type to Use (default = Use Fractal S/R Areas (1)): Select the type of S/R areas to use.
Disable S/R Areas Filter (0) | Disable S/R Areas Fitler, the EA will take all valid trade setups that happen. |
Use Fractal S/R Areas (1) | The EA will only take the trade setups that form inside the Fractal generated S/R areas.
(Additional Settings for the Fractal S/R areas are in the “—– Fractal S/R Filter Options ——-” section) |
Use Manual S/R Areas (3) | The EA will use the S/R Areas as defined by the user manually moving the S/R area lines in the chart. |
(Additional Settings for the Fractal S/R areas are in the “//—– File S/R Filter Options ——-” section)
For more details on how to use this check the “Using the Manual S/R Area Filter ” section.
Notify of S/R Area Break ( default = false): If “true” the EA will send notifications when S/R area has been broken. (this uses MT4 notifications system or Telegram Notifications)
Plot S/Rs on the chart (default = true):
If “true” the EA will plot the S/R areas on the chart when using Fractal or File versions for ease of visualization by the user.
If “false” the EA will not plot any S/R for the user to visualize when using Fractal to File versions. 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 Filter Options ——- #
(Standalone indicator available in the Bonus Scripts and Resources section)
Size Multiplier (Recommended 0.75/1.0/1.5) Larger = Wider Zones (default = 1): This setting controls the size of the S/R areas. The multiplier will be applied to the current ATR and Fractal candles ATR to determine the size of the S/R area.
Fractal Lookback (Recommended 1/3) Larger = Further Away Zones (default = 3): This setting controls the minimum amount of fractals structures that will be used to determine an S/R area base point. (From this, then the ATR size multiplier in the setting above will be applied to get the High and Low of the S/R area.
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 above the EA execution timeframe. |
——— Trade Management ——— #
Trailing Stop To Use (default = Fractal + BE Trailing SL): Tells the EA which trade management strategy it should use.
No Trailing SL | The EA will not modify the SL once placed |
Move stop to BE after TP1 | 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) |
Fractal Trailing SL | The EA will trail the orders SL based on fractals |
Fractal + BE Trailing SL | The EA will trail the SL using both fractals and the BE stop loss. (whichever is tighter will be used) |
——–Working Hours——- #
Start Hour (0-23) (default = 2) |
Amount of hours to work (1-24) (default = 24) |
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 ——— #
Trade Monday (default = true) |
Trade Tuesday (default = true) |
Trade Wednesday (default = true) |
Trade Thursday (default = true) |
Trade Friday (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——– #
Enable Closing Trades on Friday (default = false):
If true the EA will close any open trades on Friday to avoid having open trades over the weekend.
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 MT4 Mobile Notifications (default = True): Tell the EA to use MT4 mobile notifications.
If “false” the EA will not send MT4 Mobile notifications as alerts.
If “true” the EA will send MT4 Mobile notifications as alerts.
(The MT4 Mobile notifications can´t be sent with a screenshot of the chart due to limitations of the MT4 Mobile notifications system)
To use the MT4 Mobile notifications you need to enable Push notifications and enter your Meta Quotes ID (MQID) in the terminal options.
(For instructions check the “Using MT4 Mobile Notifications” section in the general documentation)
Use Telegram Alerts (default = True): 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 DLL imports on the EA as well as web requests from https://api.telegram.org/)
(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 MT4 Strategy tester backrests 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.
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 conbinations 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)
The next settings are only taken into account in the optimizer if you choose “Custom” on the Optimized parameter.
Custom Statistic To Use #
For this section please read the Advanced Custom Statistics article
No Comment