Alert at end or start of bar
jepper:
I'm sending myself alerts on certain new bars, when two of my custom functions return a 1 for example, but it seems there's some slowness or lag causing the custom functions to respond to the previous bars value... I want to send the alert 20 or seconds after the new bar has started. What is the best way to do this?
ATM I do as follows, and it's not working:
Have a look at this thread - many solutions in there
For those who would find it useful: Behold the universal "IsNewBarOnTimeframes()" - How to detect ticks in MT4 timeframes?
- 2022.08.03
- www.mql5.com
Happy using: detecting a new bar without removing ability to detect tick in multiple timeframe - easy trading strategy - mql4 programming forum #8 (20 21. Only observation was that if you switch timeframes on the chart it can return true on the first tick - i had that issue too
I'm sending myself alerts on certain new bars, when two of my custom functions return a 1 for example, but it seems there's some slowness or lag causing the custom functions to respond to the previous bars value... I want to send the alert 20 or seconds after the new bar has started. What is the best way to do this?
ATM I do as follows, and it's not working: