Loading…

Prop Firm Rule Monitor

Funded-account challenges are failed on arithmetic as often as they are failed on bad trades - a trader forgets exactly how much of the daily loss allowance is left, takes one more trade to "get it back", and breaches a limit they would never have crossed on purpose. This panel keeps the three numbers that actually end a challenge in constant view: today's loss against the daily limit, overall drawdown against the challenge limit, and the count of distinct trading days against the minimum most firms require before a payout. MT4 does not log a balance history per day, so "start of day" has to be captured live. The first tick after the configured daily reset hour rolls into a new day bucket, the current balance is captured as that day's starting point, and it is written to a terminal global variable keyed to the account number - not just held in memory - so reattaching the indicator or reloading the chart mid-day does not silently reset the baseline back to whatever the balance happens to be at that moment. Drawdown can be measured two ways depending on the firm's rulebook: trailing from the highest equity ever reached (the stricter, more common definition), or static from the fixed challenge starting balance. InpDrawdownMode switches between them. Trading days are counted from closed-order history by distinct calendar day, using the same configurable reset hour as the daily loss calculation, so both figures agree on where one day ends and the next begins. Notes and limitations - "Start of day" balance and the equity peak are stored in terminal global variables keyed to the account number. They persist across chart reloads and MetaTrader restarts but are local to this terminal installation, not to the broker account itself. - Trading-day counting reads closed-order history only; it cannot see trades made on a different terminal or after history has been pruned by the platform. - This is a monitoring aid, not an enforcement mechanism - it cannot stop a trade or close a position, it can only warn. Discipline still has to come from the trader. - Percentages assume the firm defines its limits exactly as configured here; some firms measure daily loss from balance rather than equity, or use a different session boundary than a clean hourly cutoff - read the specific challenge rules before trusting the numbers.

Indicator · MT5 · v1.0 · Free

About Prop Firm Rule Monitor

Prop Firm Rule Monitor is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 12 settings, such as Daily loss limit percent, Max drawdown limit percent and Drawdown mode. MQL source code included.

Files in the download: PropFirmRuleMonitorIndicator.ex5, PropFirmRuleMonitorIndicator.mq5, PropFirmRuleMonitorIndicator.txt.

Settings

SettingDefaultWhat it does
Daily loss limit percent5.0Daily loss limit, percent of the day's starting balance
Max drawdown limit percent10.0Max drawdown limit, percent (see InpDrawdownMode)
Drawdown modeDD_FROM_PEAKHow the max-drawdown base is defined
Challenge start balance0.0Fixed starting balance; 0 = use balance the first time this runs
Min trading days10Minimum distinct calendar days with a closed trade required
Daily reset hour0Server hour (0-23) the challenge treats as the start of a new day
Warn at percent of limit80.0Percent of a limit at which the row turns yellow instead of green
CornerCORNER_LEFT_UPPERPanel corner
X distance10Panel horizontal offset, pixels
Y distance20Panel vertical offset, pixels
Font size9Row font size
Row height16Row height, pixels

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria