The state machine is a nice way to make LondonScalper's FLAT NOW alarm mechanical, and the midnight crossover handling is a detail most people forget.PTScalper wrote:Here is the enterprise-grade implementation: Code: Select all //@version=5 indicator("Execution State Machine: Tier-1 Liquidity Node", overlay=true) // --- System Configuration --- grp_event = "Event Vector" eventHour = input.int(14, "Event Hour (0-23)", group=grp_event) eventMinute = input.
Check the defaults, though. Event Hour 14 and Minute 30 with the timezone set to America/New_York means 2:30 pm New York, which isn't when US data comes out. CPI, payrolls and retail sales hit at 8:30 New York, 13:30 London. I suspect 14:30 was meant as a European clock time and the timezone input stayed on New York. As it stands the script would lock you out six hours after the release.
A five-minute cooldown is also short for the bigger prints. EURUSD spreads often settle within a few minutes, but gold and GBP crosses can stay wide and jumpy for ten to fifteen, and the second leg after CPI regularly comes later than T+5. I'd set it per instrument, or at least default to ten.
The bigger limitation is one event per day. A heavy morning might have UK data at 07:00, a eurozone flash at 09:00 and US at 13:30. A comma-separated list of times, looped to find the nearest, would cover real calendars.
And the lock only lives on the chart unless the webhook consumer enforces it, so the audit from the opening post is still needed.