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 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. #
—- 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 %): Choose 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 = 410000): 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 TF 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).
EMA Period (default = 9): The period for the EMA of the secretariat strategy.
WMA/LWMA Period (default = 30 ): The period for the Weighted or Linear Weighted moving average secretariat strategy.
——- Additional Filters ——- #
Use Recent High Low Dots Break Filter (default = true ): This filter allows the Secretariat to filter out trades with low MA separation and improve the quality of the setup. The filter uses the High Low Dots break indicator which plots a dot if a previous High or Low has been broken. The filter will make a new Dot in the direction of the trade required for the setup to be considered valid.
If “true” the EA will filter trades using the Recent High Low Dots break filter.
If “false” the EA will ignore the filter and take all trade opportunities regardless of the MA separation.
Period for High Low Dots Calculation (default = 50): Period or candles to check for the Recent High Low Dots Break Filter (Recommended 21-31-50)
—— 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. |
——- Trade Entry Parameters——- #
Entry method to use (default = Pull Back to WMA/LWMA (1)): Tells the EA which trade entry method strategy it should use.
Pull Back in between both MAs (0) | The EA will enter with a more aggressive entry at the exact middle point between the WMA and EMA. |
Pull Back to WMA/LWMA (1) | The EA will enter on a pullback to the WMA with a market order. |
Trade Tracking Method to use (default = Consecutive Trades per side (2)): Tells the EA which trade tracking method it should use.
Trades per side per calendar day (0) | The EA will only be allowed to place X long trades and X short trades in a calendar day (counted based on your broker timezone). |
Consecutive Trades per side (2) | The EA will only be allowed to place X long trade after a short trade has closed. This filter resets on every calendar day allowing the algo to place at least 1 trade in any direction on each calendar day. |
Max trades per selected method (default = 1): Amount of trades to allow on each selected method (minimum 1). This is the “X” value mentioned in the Tracking Method description.
——- SL and TP Settings ——-
– SL method to use – (default = Previous 24Hr High/Low (1)): Tells the EA which Stop Loss placement method it should use.
Previous X Periods High/Low (0) | This will use the lowest Low or High of the past X candles (+ 10% of those candles ATR) as the setup initial SL value. |
Previous 24Hr High/Low (1) | This will use the lowest Low or High of the past 24 hours (+ 10% of the last 24 Hours ATR) as the setup initial SL value. |
Previous Fractal Structure (2) | This will use the previous market swing high or low as defined by a fractal structure as the Setup initial SL value. |
Number of periods for High/Low SL (default = 34): Number of periods to use for the “Previous X Periods High/Low (0)” SL method.
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
Use Trailer Order / Trail end Order (default = true ): If enabled this will place an additional order without a pre-set Take Profit value. This order will exit by a trailing SL or by the native secretariat exit strategy.
——— Trade Management ——— #
Trailing Stop To Use (default = Fractal + BE Trailing SL): Tells the EA which trade management strategy it should use.
No Trailing SL (0) |
The EA will not modify the SL once placed |
Move stop to BE after TP1 (1) |
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 (2) |
The EA will trail the orders SL based on fractals |
Fractal + BE Trailing SL (3) |
The EA will trail the SL using both fractals and the BE stop loss. (whichever is tighter will be used) |
BE offset (Default -10): Offset in points to set the Break-Even trailing SL (0 = SL placed exactly at order entry price) a negative number means that the Break even trailing SL will be in slight profit. This can be used to compensate for slippage when executing the SL and to try and include commissions into the trailing SL.
(note: this value may need to be adjusted in some symbols as they may have different point sizes. The most common case is CFD indexes and stocks)
When to Start Fractal Trailing SL (if enabled) (default = Start After TP2 (must have trailer enabled) (2)): Tells the EA when to start trailing the fractal Trailing SL if that method is selected.
Start Immediately (0) | If the Fractal Trailing SL method is 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 Fractal Trailing SL method is 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 enabled) (2) | If the Fractal Trailing SL method is 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. |
Enable Secretariat Exit Strategy (Default = true-10): If true then the algo will exit trades based on the base secretariat strategy, irrespective if the opposite base signal would have been blocked by the advanced filters or not.
If false then the algo will only close trades on an opposite trade signal taking into account all filters set.
This is independent of trailing SL and other trade management methods.
——–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 ——— #
|
|||||
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——– #
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)
Backtest/Optimization High/Low Dots Model (default = Do not modify High/Low Dots settings (0)): This input tells the EA to modify the values of Use High Low Dots Filter and the Candles for High Low Dots internally for use in optimizations and backtests.
This is really useful when doing advanced optimizations to decrease the number of conbinations that can happen when optimizing the values as its irrelevant to change the Canles for High/Low Dots value if the filter is turned off so by using the list bellow, 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