Hello,
I would like a function to filter high impact news from forexfactory calendar to use in expert advisors.
The function has to disallow trading some time before/after the time when High impact news appears.
It can be a bool function and return true or false according to imput values.
Function Inputs
- Currency: USD, EUR, GBP, CHF, CAD, AUD, JPY (2 currencies should be passed to the function to avoid trading if there is a high impact news on any of the 2 currencies)
- Avoid trading before: YES/NOT
- Time to avoid trading before news: Input_Before_Time
- Avoid trading after: YES/NOT
- Time to avoid trading after news: Input_After_Time
Function Output:
- True or false (The function should only return TRUE or False if trading is allowed or not according to the imput parameters)
The function should be written in clear code.