Including a News filter
-
@guille4
Hello, did you manage to solve a code to filter news and suspend operations N time before and reactivate operations N time after the impact of the news? -
Hello fxdreema,
I noticed there was a previous request to include a news filter into your software, I vote in favor of that request.
Right now, I need my EA to close all trades (xx) minutes before/after any High or Medium impact news on each pair the EA is attached to.
My preferred indicator currently just has 1 buffer, and my minimal skills have been unable to modify it to suit my desired outcome.
Can you please help?
P.S: The Indicator is free to use anyway deemed fit, and has no restrictions to the best of my knowledge.
P.P.s: In "time filter", does server time mean broker time? I want to use broker time.
-
What should I do with this indicator?
Yes, broker = server, local = your PC
-
About the Indicator:
For any given pair, the indicator shows:
- [1] High (in red), [2] Medium (in blue) and [3] Low (in green) impact news.
- [4] The time before such news is released.
- [5] The time after such news is released.
So what should you do with the indicator?
Well if you can, give the indicator buffers for the above [5 in total], such that I can use it in the "condition" block example:
Condition: ( High impact news [1] == 14 minutes [4] ) ---------->> Close Trades
In other words I want to close all trades before a news event occurs.
or Condition: ( High impact news [1] == 14 minutes [5] ) ---------->> Open Trades
meaning, I want to open trades after a news event occurs.
P.S: You could add a News block to fxdreema, where such options and maybe more are available using this indicators data. I don't know how difficult or easy that is though

-
I always repeat that there is a difference between EAs and Indicators. EAs are supposed to decide when to create/modify/close new trades and orders and for that they check some values to find the right moments to do something - to open, to modify, to close. Indicators are those robots that should be used to make various calculations, to print some data on the chart and to give signald to EAs.
You can see that I have created few blocks in this group called "Signals from candlestick formations". Now I want, and I will probably remove some of them. Because these blocks simulate the work of indicators, but in the context of the EA, which is not the best idea. Why it's not the best idea... because the code for each of them is more than what it could be if they are written as indicators, because I need to cache in this code. All indicators have this out of the box. And the second problem - visualizing stuff. While indicators do that also out of the box, in the EA I need to create objects.
It's just not a good idea to make the EA to work as an indicator. If this news indicator is indicator, why not using it as such
I just opened it and I don't know how, but... -
I can understand the point you are making, although if those candlestick blocks work fine, I think its okay to leave them (might be useful to someone).
My EA is not based solely on this indicator (not trying to convert it into an EA itself), see, just like an EA uses a moving average, with the "price x> indicator" block. I want the EA to take some outputs of the indicator and use. When I import the news indicator to fxdreema, I only get 1 buffer and using the "indicator tester" this buffer gives a weird concept of time.
I don't know your proficiency in mq4, but I assumed you'd do better than me in modifying the indicator [by giving it the buffers above] such that I can make use of it like a moving average e.t.c
-
I think that this indicator only prints those texts in the lower left angle and all the useful information is located there. This data can be read... and then it needs to be processed, to get what is needed from it.
The biggest issue for me is that I personally don't understand those news and how they can be used
I also imagine some indicator that also keeps history data of previous news, so it can be backtested, if that is possible. -
"The biggest issue for me is that I personally don't understand those news and how they can be used.."
Maybe this explanation can help, you see, you do not need to care about the news itself, just that it is either:
1.High Impact
2.Medium Impact or
3.Low Impactand then the time until (1,2 or 3) occurs... the indicator assigns numbers to the above impact releases, and has a time value calculated or retrieved from the website (I don't know
).So what the news is about is irrelevant, only Impact and time.
P.S: I have attached an older version which seems to work, it has 3 buffers which could solve my problem, but I cannot interpret the values of those buffers to reflect my intentions.
......
My FFCAL.mq4 -
I got some error in it's code that function TimeGMT is already a system function, but I renamed it in the code. Now I only got this: http://prntscr.com/7abm1e
Otherwise buffers are explained in the code like this:
double ExtMapBuffer0[]; // Contains (minutes until) each news event double ExtMapBuffer1[]; // Contains only most recent and next news event ([0] & [1]) double ExtMapBuffer2[]; // Contains impact value for most recent and next news event -
Ah yes I forgot, it is because it was a pre 600+ MT4 build code. I used a compiler to convert it automatically to 600+ (You just need to open the indicator with the compiler, go to tools and compile. It resolves it.)
I do not know if you have the time, in case you do, the compiler can be gotten here: http://tinyurl.com/p4ja5gf
Yes the indicators buffers are self explanatory, but executing this using the buffers is where the problem lies, why
- The bottom two buffers have more than 1, buffer-initial-value: ex. ExBuffer1 [] has, ExBuffer1 [0] and ExBuffer1 [1].
- It gives -ive time values and +ive time values.
- The time values from the buffers do not correspond to the indicator news printouts.
Sorry for the headache, I've tried to rewrite the code in vain.
-
Hi Guys, this is my first post here. Keep up the great work FXDreema.
Just a question, does the news filter will ever see the daylight?
Tq in advance
-
I have no idea how these news work

-
__About the Indicator:
For any given pair, the indicator shows:
- [1] High (in red), [2] Medium (in blue) and [3] Low (in green) impact news.
- [4] The time before such news is released.
- [5] The time after such news is released.
So what should you do with the indicator?
Well if you can, give the indicator buffers for the above [5 in total], such that I can use it in the "condition" block example:
Condition: ( High impact news [1] == 14 minutes [4] ) ---------->> Close Trades
In other words I want to close all trades before a news event occurs.
or Condition: ( High impact news [1] == 14 minutes [5] ) ---------->> Open Trades
meaning, I want to open trades after a news event occurs.
P.S: You could add a News block to fxdreema, where such options and maybe more are available using this indicators data. I don't know how difficult or easy that is though :)[/quote:26y3io92]
Hi Uchiha, do you solved it?
I need the SAME indi, with buffers to obtain from its the boolean signals "yes/no" 30 min before and 30 min after of high / medium / low impact news. (30 min or whatever else on custom settings adjusted to my needs).
Radoslav: I'm pretty sure it will be very useful that you can integrate as filter on fxdreema this type of signal, just for filter purposes, not anymore. The main idea is provide to fxdreema EAs generated the possibility of an additional layer to protect the trades avoiding the impact of major news and abrupt changes on market prices. In backtesting I saw changes up to 3000 pips in 5 minutes, causing huge drawdowns and margin calls, and almost all of this situations is due the impact news from announcements of Central Banks, Fed, etc, all they are predictable because they are scheduled. With this signal we can avoid open trades in this time lapses or even close trades anticipating this highs and dangerous volatility situations, protecting the account.
finally, a word of thanks for the great work you do with fxdreema. Terrific job.