---
title: "Discussion on \"A Closed-Bar Alert State Machine for MQL5 That Does Not Replay History\" | Hashnode"
description: "Discussion on \"A Closed-Bar Alert State Machine for MQL5 That Does Not Replay History\". An MQL5 alert can look correct on a fresh chart and still fail after the first restart.\nThe usual mistake is to treat notification delivery as part of the indicator's history loop. That loop is allowe"
url: "https://hashnode.com/posts/a-closed-bar-alert-state-machine-for-mql5-that-does-not-replay-history/6a922e6ccb7b80ef45765c22"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [A Closed-Bar Alert State Machine for MQL5 That Does Not Replay History](https://stratcorealpha.hashnode.dev/a-closed-bar-alert-state-machine-for-mql5-that-does-not-replay-history?utm_source=hashnode&utm_medium=feed)

An MQL5 alert can look correct on a fresh chart and still fail after the first restart. The usual mistake is to treat notification delivery as part of the indicator's history loop. That loop is allowe

Aug 29 · 5 min read · stratcorealpha.hashnode.dev  
Read the article

-   [#mql5](https://hashnode.com/tag/mql5)
-   [#metatrader5](https://hashnode.com/tag/metatrader5)
-   [#algorithmic-trading](https://hashnode.com/tag/algorithmic-trading)
-   [#software-testing](https://hashnode.com/tag/software-testing)

## Written by

[Arnold Holm](https://hashnode.com/@stratcorealpha)

@stratcorealpha

  
[View profile](https://hashnode.com/@stratcorealpha)

I turn your trading setup into an MT5 bot with your prop firm's daily and max loss rules built in. Try it free on demo first.

Your setup, automated, with your prop firm's rules built in. Send your rules the way you trade them: text, screenshot, TradingView script or EA. Within 24 h you get a free demo build: the Prop Rule Guard, or your setup as an MT5 bot that runs in the Strategy Tester and on a demo account. When you want it on your challenge or funded account, the live version follows. No profit or pass promise.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
