- UseNews: Overall On/Off switch for News Filter
- CurrenciesToClose: Comma-separated list of currencies to watch/close. Leave blank for all.
If this parameter is left blank, (High/Medium/Low-impact) news for any currency, will trigger the closure of all trades, at the specified number of seconds before the news release. If the parameter is set to eg. EUR,USD, it will only check for news items for these two currencies and if found, it will only close currency pairs that have either 'EUR' or 'USD' in their name.
- CloseOnHighImpactNews: If true, act on HIGH impact news
- CloseOnMediumImpactNews: If true, act on MEDIUM impact news
- CloseOnLowImpactNews: If true, act on LOW impact news
- NewsFilter: Additional filter to target specific news items. Note that string comparison is case-sensitive, so use the correct case.
- CloseOpenTrades: If true, and there is upcoming news (as specified by previous parameters), close open trades. Again, the trades it will close will depend on the CurrenciesToClose parameter.
- ClosePendingTrades: If true, and there is upcoming news, delete pending trades.
- SecondsBeforeHighImpact: Specifies the time-window before the HIGH Impact news event, in which the EA must close trades. Only relevant if CloseOnHighImpactNews is true.
- SecondsBeforeMediumImpact: Specifies the time-window before the MEDIUM Impact news event, in which the EA must close trades. Only relevant if CloseOnMediumImpactNews is true.
- SecondsBeforeLowImpact: : Specifies the time-window before the LOW Impact news event, in which the EA must close trades. Only relevant if CloseOnLowImpactNews is true.
- SecondsAfterHighImpact: Specifies the time-window after the HIGH Impact news event, in which the EA must close trades.
- SecondsAfterMediumImpact: Specifies the time-window after the MEDIUM Impact news event, in which the EA must close trades.
- SecondsAfterLowImpact: Specifies the time-window after the LOW Impact news event, in which the EA must close trades.
- MagicNumberToClose: Specifies the MagicNumber of the trades to close. -1 means all magic numbers
- DisableTradingOnNews: If true and it has been determined that there is upcoming news, disable "AutoTrading".
- ReenableTradingAfterNews: If true and there is no upcoming news, make sure that "AutoTrading" is enabled.
- BrokerGMTOffSet: GMT Offset in hours of the trade server. This is needed to convert the FFCal scheduled news times (which are listed in GMT) to trade server times.
The CloseOnNeewsEA has been updated such that it can optionally set a global variable that can be used by other EAs to stop initiating new trades. This way, you can avoid disabling AutoTrading completely (so you can set DisableTradingOnNews to false)
- SetGlobalVariableOnNews: If true and it has been determined that there is upcoming news, set a global variable, with the name GvName, that can/should be used by other EAs to stop initiating new trades.
- UnSetGlobalVariableAfterNews: If true and there is no upcoming news, remove the global variable named GvName.
- GvName: The global variable name, to be used for communicating with other EAs.
Update (LibFF.mqh) (2019.04.08): ForexFactory has apparently moved the xml file (temporarily?) to a new location. The new LibFF.mqh checks both the old and new location to find some data. A big "Thank You! :hi: " to Thomas for alerting me to this.
Update v2.1 (2021.03.26):Used the EasyXML library for parsing the xml file. Thanks go to Paul van Hemmen for creating this library.
Update (2021.07.16): Fixed a bug in EasyXML that was the reason that the xml-file was not downloaded in its entirety and therefore caused parsing problems further down the line.