New Year - New Update!
---------- M I N I M U M P R O F I T F O R T R A D E C L O S E ----------
This new, universal section can now be used for specifying a minimum profit or maximum loss target that needs to be reached before trades are closed.
It is currently supported in the News + Time Filter sections.
---------- N E W S F I L T E R S ----------
- Added "Close trades before news - check minimum profit for trade close" which defines whether the minimum profit or maximum loss targets should be checked before trades are closed due to news.
- "Filter News Symbols" now supports symbol mappings. If you specify e.g. ".DE40Cash=EUR", then all EUR news will automatically be mapped to .DE40Cash.
---------- T R A D I N G T I M E S ----------
- Added "Close trades when out of time" which lets you close trades when any of the time filters becomes active. This option is more universal than the "Close trades at" one (which is still supported, though).
- Added "Check minimum profit for trade close" which defines whether the minimum profit or maximum loss targets should be checked before trades are closed due to time filters.
- When trading symbols with certain suffixes (like "...."), the news filter stopped working. This has now been fixed.
This release adds the following user requests to the EA:
---------- N E W S F I L T E R S ----------
- Added "Close trades before news - Minimum Profit" which allows to specify a minimum profit target that needs to be reached before trades are closed due to news.
- Added "Close trades before news - Maximum Loss" which allows to specify a maximum loss target that needs to be reached before trades are closed due to news.
- Added "Profit/Loss values are specified in" which allows to specify these targets in either money or percent.
---------- A D D I T I O N A L F I L T E R S ----------
- Added "Maximum Orders" (until trading is allowed)
---------- A C C O U N T P R O T E C T I O N ----------
- Added "Account Margin Level" as a minimum/maximum property until trading IS allowed.
- Added "Maximum value until trading IS allowed" which allows to set a maximum value for e.g. Account Equity.
- Added "Daily Profit/Loss values are specified in" which now allows to specify the daily limits also in percent.
I hope you enjoy these enhancements. If you have an idea for further improving TaB, just let me know in the comments or by PM.
I would also appreciate a review if TaB is useful to you :)
I'm delighted to present you the most stable Take a Break version to date!
Following user feedback, I tweaked the EA and Indicator and tested the improvements for the past weeks 24/7 on a VPS with MT4 and MT5. Since then, I never got any errors like "Could not identify any symbols to manage." or broken template files anymore.
In order to make use of the stability improvements, please update the EA to version >= 5.20 and the Indicator to version >= 1.80.
I'd like to thank all users who contributed to this release and helped making Take a Break an even more stable trading utility.
Small bug fix release which removes superfluous WebRequests for auto-calculating the GMT/timezone offset.
Bug fix release which should finally solve an annoying issue after terminal restart: some templates could get overwritten unexpectedly which then caused an infinite loop of "Applying Chart Template XXX" calls in the "Experts" tab. Ultimately, that then led to a frozen or even crashing terminal + broken template files.
If you ran into this issue (which mostly affected MT5), please do the following AFTER this update:
1. Stop the Take a Break EA
2. Setup your "Trading IS allowed" templates again and select "Recreate default templates: true" in the indicator parameters
3. Enable the Take a Break EA again
I'm really sorry for any inconvenience this has caused. TaB should be a reliable tool for every user so I do take such bugs seriously.
Should you encounter any errors, please report them to me so that they can be fixed for everybody. Thank you to the users that reported this issue!
Other than the main bug fix, there are also some minor improvements:
- If the Auto GMT or Auto Timezone Offset cannot be determined due to a server error, TaB will now retry after a few minutes (just like it does with the News).
- Parameters that must be > 0 or < 0 are now sanity checked. E.g. if you specify a "Maximum Drawdown for all open trades" of "100", it is now automatically converted to "-100" in the code.
- Updated logic for trade identification by Order Comment: search for occurrences instead of exact matches.
Example: Order Comment "EA2" will now also identify trades having comments that contain this string, e.g. "EA2-Grid", "FirstTrade-EA2", "EA2 [tp]" etc.
Previously, trades would only have been identified if they had the exact order comment "EA2".
- Added the ability to identify trades by Order Comments in addition to Magic Numbers.
- Added the ability to remove SL and TP values of orders before news and to restore them afterwards. This action can be performed instead of closing trades before news.
- High Impact News at 16:00
- "Take action X minutes before/after news": 5
- "High Impact News - Action to take": Remove S/L + T/P before news and restore afterwards
- S/L and T/P values will be removed from the affected orders at 15:55.
- S/L and T/P values will be restored to the affected orders at 16:05.
- If S/L or T/P values have already been exceeded and thus, cannot be restored anymore, the affected orders are closed at 16:05.
- MT5: Added compatibility with latest build version.
- Minor code and wording improvements
- Added new section "Drawdown Control" which replaces the former External EA SL/TP section. Existing settings are migrated conveniently. This section gives you more control over Take a Break's internal trade management and also allows you to set Profit/Loss values in % of account balance.
- If specific Magic Numbers are set, all trades belonging to them are now handled by Take a Break - independently of their symbol. Formerly, Take a Break only managed trades belonging to its chart symbols.
- Profit/Loss values are now also displayed in % of account balance.
- Changed wording of some configuration options for better understanding.
- Finally fixed an annoying bug in the time filter that did not return to "Trading allowed" after a "NoTrade" time (e.g. after the weekend).
- Added display of the (auto detected) timezone offsets for GMT + "Timezone to reset Daily Profit/Loss Limit" (if set).
- Added options to stop trading all day on NFP/High/Medium/Low Impact News. These options also respect any specified "Filter News Events", i.e. will only stop trading for the whole day if any of the specified events take place on the current day.
- If set, the calculated Daily Profit/Loss Limits (including deviation) are now also displayed on the chart. As they are only used when trading is not allowed, they are also only displayed in this case. Calculated "Daily Profit Limit" if Today's P/L is positive, calculated "Daily Loss Limit" if it is negative.
- If set, the calculated S/L and T/P levels (including Daily Profit/Loss, if applicable) are now also displayed on the chart. Calculated T/P if Floating P/L is positive, Calculated S/L if it is negative.
- Added a +/- sign in front of the displayed P/L values for a better overview.
Added another new parameter on user request:
- "Limits deviation": if you have set a "Daily Profit/Loss Limit" or ""Minimum value until trading IS allowed" and trades are closed with slippage, it might result in a slightly lower value than the set limits. This option now allows to multiply these limits by a deviation factor (default: 1).
- "Maximum Daily Profit Limit": $100
- Trades are closed at profit of $100 but with slippage, resulting in a Daily Profit of only $98.
- With default "Limits deviation" of 1, TaB would continue trading as $98 <= $100 ($100 * 1 "Limits deviation").
- With "Limits deviation" set to e.g. "0.95", TaB would now stop trading as $98 >= $95 ($100 * 0.95 "Limits deviation")
Bug fix for the time filter which did not return back to "Trading allowed" after the latest enhancements in version 4.96.
As a tool for traders by traders, the time filter was enhanced on user request with 3 new options:
- "Days of Year"
- "Days of Month"
Each of them is behaving exactly like the "Monday ... Sunday Trading" inputs which means that you can also specify ranges here, e.g.
- "Days of Year" = "14-352" will pause trading for the first and last 2 weeks of a year (typical use case)
- "Days of Month" = "5-10,20" will trade from the 5th to the 10th and on the 20th of each month.
All time filters interact with each other which allows truly flexible setups.
I also added the "Magic Numbers" to the "Required Settings" and revised this section for a clearer overview which Take a Break EA instance manages which trades. Existing users kindly note that nothing changes for your setups. Each TaB EA instance will only manage the specified Magic Numbers even if the new option "Which trades should be managed?" is set to "All trades (entire account)".
Hide the countdown to the Next News Break when there are no future news events (yet).
Added remaining days to the new countdown for "Next News Break in" if the next event occurs in more than 24 hours.
- Relevant news are now displayed on your other EAs' charts as well (requires indicator version >= 1.72).
- Beautified the drawn news lines in general. Changed their default colors to be more like a traffic light: Green = Low Impact, Orange = Medium Impact, Red = High Impact.
- Added a countdown that shows the "Next News Break in XXh YYmin".
- "External EA - Magic Numbers": the value of this input now controls which trades are identified as "ALL trades". A value of "-1" means "ALL trades" in its true sense, i.e. independent of symbol and magic number. If you enter specific magic numbers here (like 1,2,3), only these trades will be taken into account for settings that include "ALL trades" (Loss Limit etc).
This modification makes it possible to have one "master" instance of Take a Break that controls the overall account limits and another (or even multiple) "slave" instance that controls specific EAs only. Thus, your TaB setups are now even more flexible.
- "Dynamic Maximum Volatility (based on current candle)": the volatility filter can now be dynamic. If you control multiple symbols with just 1 TaB instance, setting a fixed "Maximum Volatility (in points)" for all of them might not be too handy. In this case, set this option to "true".
- "Minimum Dynamic Volatility of current candle": if (Minimum) Volatility of current candle > Average Volatility of past candles, trading will be stopped.
Important bug fix release for all users that already updated to EA version 4.90 / Indicator version 1.70: templates created with these versions might not get loaded properly which caused Take a Break to stop its work entirely. This issue has now been fixed so I urge all users to update.
The good news is that no template data was lost. The bad news is that depending on your filter settings, not all of your charts might still be managed by Take a Break EA. So after the update, please check your chart setup(s) and make sure that all relevant charts still contain the Take a Break indicator. If it is missing, please add the indicator to the chart again - either manually or by applying the corresponding template: right-click on the chart, select "Templates -> Load Template", navigate to "MQL4\Files" (MT4) / "MQL5\Files" (MT5) and select the template to apply.
I apologize for any inconvenience caused!
New Year, New Updates - Happy New Year to all of you!
Please make sure to also update the indicator to version 1.70 and to follow its release notes!
This update comes with the following improvements:
- If you modified the settings of an EA that is managed by Take a Break, you don't need to recreate the template file manually anymore afterwards. Take a Break will now take care of this by saving all modification to the corresponding template automatically.
- Added new parameter "Average T/P for each open trade" (in addition to "Minimum T/P for ALL open trades"): e.g. when a news filter becomes active and thus, trading is not allowed, Take a Break will manage your open trades. You set "5" as "Minimum T/P" and "1" as "Average T/P for each trade". If you have 6 open trades, Take a Break will close them as soon as the total profit on the account becomes >= 6 USD/EUR/... If you have only 4 open trades, Take a Break will close them as soon as soon as the total profit becomes >= 5 USD/EUR/... (because 4 open trades * 1 USD average T/P < 5 USD minimum T/P).
- Added new parameter "Average S/L for each open trade" (in addition to "Maximum S/L for ALL open trades"): e.g. when a news filter becomes active and thus, trading is not allowed, Take a Break will manage your open trades. You set "-5" as "Maximum S/L" and "-1" as "Average S/L for each trade". If you have 6 open trades, Take a Break will close them as soon as the total loss on the account becomes <= -5 USD/EUR/... If you have only 4 open trades, Take a Break will close them as soon as soon as the total loss becomes <= -4 USD/EUR/... (because 4 open trades * -1 USD average S/L > -5 USD maximum S/L).
- Improved the volatility filter by adding the new option "Calculate average Volatility for the past ... candle(s)": e.g. you want to calculate the average volatility of the past 7 days for each symbol, then you would enter "7" here + select "1 Day" in the following input "on Timeframe".
- Made some minor changes to the wordings + re-grouped the settings sections again. From now on, it is clearly visible which settings are required and which ones are optional.
- "Minimum ... until trading IS allowed": defines the type of the specified minimum value. Available types: Account Equity (default), Account Balance, Account Free Margin. Once the minimum value is reached, trading will be paused and optionally, all trades are closed.
- Added an error message that shows clearly if Take a Break could not identify any symbols to manage and thus, will not work.
- Re-arranged some parameters again for a better and more logical overview.
- Fixed an issue where the symbols managed by Take a Break were not recognized properly after a terminal restart unless a new chart was added to the Chart Group(s). As far as I'm aware, this issue affected MT4 users only. Take a Break will now display a loading message after a terminal restart until all charts could be identified. This might take a while depending on the power and utilization of your computer/VPS.
- Several minor fixes which further improve Take a Break's stability and work algorithm.
- "External EA - Trade Management Mode": by default, All Oder Types (Market + Pending) will be managed by Take a Break. If you don't want to close open trades but delete only Pending Orders of the External EA, select "Pending Orders only". If you want to close only open trades and keep Pending Orders open, select "Market Orders only".
- "External EA - Delete Pending Orders"
- Revised time filter: made it more fail-safe + added a new, simpler format. E.g. "4,8" (or "4-5,8-9") is the same as formerly "04:00 - 05:00,08:00 - 09:00" and will trade from 04:00 to 05:00 and from 08:00 to 09:00 broker server time. The old, extended format is still supported.
- Re-arranged + re-grouped the inputs for a better overview. Also added foot notes for parameters that usually need clarification.
- Renamed "Force template apply" to "Force stop trading". Also, this parameter is now set to "true" per default.
- "T/P in money for ALL open trades" (if "Force stop trading" = true)
- "S/L in money for ALL open trades" (if "Force stop trading" = true)
- "Include Daily Profit/Loss in TP/SL calculation" (if "Force stop trading" = true)
- "Close ALL trades when Daily Profit/Loss Limits are reached": if set to "false" and "Force stop trading" is set to "true", trading will only be paused but open trades will not be closed.
As always, if you have any questions, just contact me. Also, if Take a Break is useful to you, please consider giving it a review. Thank you!
Recently, the Investing.com economic calendar was "temporarily down for maintenance" several times even during peak news times. If Take a Break tried to update news during these periods, there was no data received. Thus, the news filters did not work then.
This update makes sure that this won't happen again by applying additional sanity checks. Also, Take a Break will retry to get the news every X minutes in such situations.
Another minor release which tweaks the performance of the news updates once again.
Next up will be a major release to version 5.0 with the ability to backtest your Take a Break setup.
Minor bug fix for the "Pause X minutes before ..." news options which were executed with 1 minute delay under certain circumstances.
- Volatility filter was added.
- Improved handling of news updates + time filters.
Fixed the closing logic of the "Close ALL trades ..." options to also take symbols into account that are not managed by Take a Break.
- Close ALL trades when Minimum Equity is reached
- Occasionally, templates were applied multiple times which caused some EAs to crash on template load. Additionally, this also lead to broken templates, e.g. the EA was then missing entirely on the "Trading IS allowed" template.
Added new parameter "Force template apply": by default, Take a Break will not apply any template (specifically the "Trading is NOT allowed" one) if there are active trades of your other EA, unless they are closed. By setting this option to "true", the template will be applied even with active trades.
This can be useful to prevent your other EA from opening new trades during news. But will leave the active trades unprotected during these periods - unless they are secured by a hard S/L or another EA on the "Trading is NOT allowed" template. Use with caution.
Added new parameter "Minimum Equity until trading IS allowed": in addition to the Daily Profit/Loss filters, this filter let's you define a minimum Account Equity until trading is allowed. This option can be used as an emergency stop loss after a series of bad trading days.
Once your overall Account Equity falls below the defined value, ALL trades (independent of any magic number) will be closed and the "Trading is NOT allowed" template applied.
- Minimum Balance until trading IS allowed
Added new parameter "Minimum Balance until trading IS allowed": in addition to the Daily Profit/Loss filters, this filter let's you define a minimum Account Balance until trading is allowed. This option can be used as an emergency stop loss after a series of bad trading days.
Once your Account Balance falls below the defined value, ALL trades (independent of any magic number) will be closed and the "Trading is NOT allowed" template be applied.
- Further performance improvements: the frequency of the time filters is now also dependent on the chart timeframe. Due to this, the EA must now be run on a chart with timeframe M1 so that these checks get executed every minute. Conveniently, the EA will change its timeframe to M1 automatically if that's not already the case.
- Updated Setup example + description to reflect these changes.
- Code cleanup
- NFP news filter did not work properly.
- News are now displayed properly again on the chart from highest to lowest impact.
Major performance upgrade with an almost entirely rewritten code base. This upgrade allows Take a Break to handle even large-scale chart setups while consuming a minimum amount of CPU power.
- From this version onward, the frequency of the news filter checks is controlled by the chart timeframe of the Take a Break EA.
- Only one single WebRequest URL needed.
- Manage multiple Chart Groups and Magic Numbers from one single Take a Break EA instance.
Please make sure to read the updated setup example and description of the indicator + EA.
Additional note to existing users:
- Before the update, add the URL "https://trading.custom-solutions.it" to the list of allowed WebRequest URLs (press CTRL+O, tab "Expert Advisors"). The old URLs can be deleted if not used by other EAs.
- Check your existing Take a Break setups. Make sure you change the chart timeframe of the EA to M1.
- Multiple instances of the EA may be combined into one single instance if you use the same TaB EA settings (news filter settings, daily loss limit etc) for all your charts. Simply enter your Chart Groups + EA Magic Numbers (separated by a comma) into the corresponding inputs of the EA.
As always, just contact me if you need any assistance.
Split the parameter "Daily Profit/Loss Limit" into 2 separate inputs. Remember that the Loss Limit is always specified as a negative value (e.g. -100).
Added new parameter "Daily Profit/Loss Limit calculation mode": if set to "Equity", TaB will close all trades immediately and stop trading for the day if Daily Profit/Loss + Floating Profit/Loss exceeds the "Maximum Daily Profit/Loss Limit" (default behavior).
- Maximum Daily Profit/Loss Limit = -100
- Daily Profit = 100
- Floating Loss = -200 -> All trades are closed.
If set to "Balance", TaB will close all trades and stop trading for the day if Daily Profit/Loss exceeds the "Maximum Daily Profit/Loss Limit" (= this option does not take the Floating Profit/Loss into account).
- Terminal crashes / freezes on news time (when multiple instances of Take a Break are used).
- Improved internal news filter logic which should result in lower CPU usage. Feedback is welcome ;)
Fixed a bug which created an infinite news download loop when multiple instances of Take a Break were used.
- No need to enter the "News Symbols" manually anymore. Take a Break will get all relevant news for each Chart Group automatically.
- Only those symbols are paused that are actually affected by the news. E.g. if you manage EURUSD and EURGBP in one Chart Group and there are news for GBP, only your EURGBP chart(s) will be paused.
- Likewise, if any "Close trades X minutes before ..." option is set, only those trades are closed that are actually affected by the news. E.g. if you manage EURUSD and EURGBP in one Chart Group and there are news for GBP, only your EURGBP will be closed.
- Revised Control Panel for a better overview of all filters and symbols managed in the current Chart Group.
- Optimized code structure.
- Fixed the "Close trades X minutes before ..." option. If there were many news within a short period of time, trades may not have been closed.
- Fixed the Spread filter which was not working properly after introducing the Chart Groups in version 2.0.
- Fixed an issue in the MT5 version where Take a Break was still active even after disabling Algo trading in the terminal or the EA settings.
Refined news filters:
- Added parameter "Filter News Events" with the ability to filter for custom news events (e.g. PMI,Rate Statement,CPI).
- Added parameter "Filter News Symbols" with the ability to filter for custom news symbols (e.g. EUR,USD,GBP).
- "News for current symbol only"
Major update - please reset all EA parameters to take full advantage of it.
- Multi-chart handling is finally here! Please read the updated description for more information.
- "Timezone to reset Daily Profit/Loss Limit"
- "Chart Group"
- "Chart ID"
Fixed an issue with the Auto GMT Offset detection which can now also be disabled if it fails.
- Added new parameter "Check filters on each new tick or by timer": Take a Break will now work OnTick again by default. OnTimer has some drawbacks under certain circumstances which might lead to terminal crashes and improper handling of templates. You can still use "OnTimer" (old behavior) but be aware that this might cause errors.
- Various minor code improvements
Added new option "daily" for parameter "Close ALL trades on": all trades can also be closed on a daily basis now instead of a specific weekday.
Fixed a bug in the trade closing logic when "Close ALL trades on" was selected.
Added new parameter "Maximum Lots": if the lot size of all trades on the account >= Maximum Lots, the template for "trading is NOT allowed" will be applied.
- "External EA - Close all open trades if trading is not allowed"
- "Close trades X minutes before Non-Farm Payrolls/High/Medium/Low Impact News": You can now specify the trade closing time in minutes before a news release.
- "Time to reset Daily Profit/Loss Limit": Usually, the daily profit/loss limit is reset every day at midnight (00:00 terminal time). If you want to specify another reset time, you can now do so.
- "Close ALL trades on/at": You can now specify a specific weekday and time for closing ALL your trades (useful if you don't want to keep positions open over the weekend).
- "External EA - Delete Pending Orders": If this is set to "true", Pending Orders will also be deleted X minutes before Non-Farm Payrolls/High/Medium/Low Impact News or if a weekday and time for "Close ALL trades on/at" is selected.