@chrisbe Nice, thanks for sharing that's some nice code and a great addition.
Personally I prefer minutes as the input, I think some minor changes to the over all options / configuration will make this an exceptional fxdreema news filter that was previously extremly difficult. I will try to implement some features my self.
I'll have to learn to code and understand this but my vision is something as below. As most prop firms these days void trades that open through news events etc.
Constants
- News Filter - True / False
- Low Impact - 5
- Med Impact - 60
- High Impact - 240
Low, Med and High are in minutes, and 0 would = false or turned off. Generally I use the same value for pre and post news so that's not a huge issue to me.
One single variable output "NewsDetected" so in the code, if any of the low, medium or high are detected in those times it sets "NewsDetected" to true and then trading blocks can be determined from that single condition block.
Maybe have a variable "News_Detected" and at the end of the code if Low, Med, High add up to 0 then news is allowed, if anyone of them set to 1 would add the total to =>1 then trading is disabled.
Something like this.
