Hi there,
I'm trying to write an EA that I can set around news events to place a trade AFTER the 15 minute bar of the particular news even closes.
But I'm not sure how to tell when the bar closes. If I use a shift to go 1 bar back, how do I know that's not the bar before the news?
So I'm trying to use time and I'd like to be able to tell the EA what time the news release is. So I have an input field for the EA called "NewsReleaseTime" that I would want to set to something like 08:30 for example. Then I would try to calculate when the time is 15 minutes after the value set for NewsReleaseTime.
So two questions:
1. what data type would I use for NewsReleaseTime and what format would I input the time in when prepping the EA for a trade?
2. what kind of calculations can be done to get me 15 minutes after NewsReleaseTime?
Or is there an easier way to handle this?
Thanks.
I'm trying to write an EA that I can set around news events to place a trade AFTER the 15 minute bar of the particular news even closes.
But I'm not sure how to tell when the bar closes. If I use a shift to go 1 bar back, how do I know that's not the bar before the news?
So I'm trying to use time and I'd like to be able to tell the EA what time the news release is. So I have an input field for the EA called "NewsReleaseTime" that I would want to set to something like 08:30 for example. Then I would try to calculate when the time is 15 minutes after the value set for NewsReleaseTime.
So two questions:
1. what data type would I use for NewsReleaseTime and what format would I input the time in when prepping the EA for a trade?
2. what kind of calculations can be done to get me 15 minutes after NewsReleaseTime?
Or is there an easier way to handle this?
Thanks.