ATS Risk Library is one include file, ATS_RiskLib.mqh, with five classes. You call them from your own EA; nothing in the library opens, changes or closes a trade.

The classes
CAtsSizer - lot size from the stop distance
CAtsDayGuard - daily limits
CAtsDrawdownGuard - maximum total loss
CAtsExposure - open positions and money at risk
CAtsFilters - spread, session, Friday cutoff
How to use it in an EA
#include "ATS_RiskLib.mqh" CAtsSizer sizer; CAtsDayGuard day; CAtsDrawdownGuard dd; CAtsFilters flt;
OnInit():
sizer.Init(_Symbol, ATS_LOT_RISK_BALANCE, 0.0, 1.0); // risk 1% of balance
day.Init("mybot", "", -1, true, 0, 3.0, 0.0, 0.0, 0); // daily loss 3%
dd.Init("mybot", ATS_DD_STATIC, 10.0, 0.0, true); // max loss 10%
flt.Init(_Symbol, 30, false, 0, 0, 0, 0); // spread <= 30 points Before an order: string why; day.Update(); dd.Update(); if(day.CanOpen(why) && dd.CanOpen(why) && flt.Ok(why)) { double lots = sizer.Lots(slDistance, ORDER_TYPE_BUY, SymbolInfoDouble(_Symbol, SYMBOL_ASK)); if(lots > 0.0) { /* send the order */ } else Print(sizer.LastReason()); }
Call day.MarkDirty() from OnTradeTransaction when a deal is added, so the next Update() rescans the history.
Files

A note on honesty
The checks above prove the arithmetic and the logic of the guards, including the rounding rule. They are not a guarantee that your broker's contract specifications, commissions or execution will match: always check the lot your rule gives against your own broker on a demo account. A daily or drawdown limit also cannot stop a gap or a fast move through your stop; it can only refuse new trades and, if you use the demo guard in enforcing mode, close positions as soon as it sees the limit reached.
Notes
No orders are sent by the library. The demo EA does not trade unless you set InpEnforce to true, and even then it only closes positions. Compiled without warnings in the MetaEditor of two MetaTrader 5 terminals; the self-test and the demo panel were run on a hedging demo account. Netting accounts were not tested.
Trend BOSS
The Trend BOSS Indicator identifies regimes such as trending, ranging or volatile using a Bag-of-SFA-Symbols (BOSS) classifier. Gate your strategies behind specific regimes or use the indicator to identify various market conditions.
Market Activity from Quote Waits
Measures market activity from the waits between quotes. An ACD model with the daily rhythm removed gives one ratio per tick: 1 is normal, 2 twice as busy.
ATS Prop Rules Monitor - prop firm challenge scoreboard with the room left on every rule
One panel for the rules of a prop firm challenge: daily loss, maximum loss (static or trailing), profit target, minimum trading days and the best-day (consistency) rule. For each one it shows how much is used and how much room is left, in money. "One more trade" tells you the largest lot size that still keeps a stop-out inside the room left today and in the max-loss room. Read-only: it never opens, changes or closes a trade. The presets hold typical values; firms change their rules, so check yours and use the Custom preset. Built on the ATS Risk Library (ATS_RiskLib.mqh, included).
ICT Structure Visualizer – liquidity sweep, MSS and FVG with an honest statistics panel
Draws ICT structure on the chart (liquidity pools, sweeps, market structure shift, fair value gaps) from closed bars only, adds a trade plan for every confirmed setup and keeps an honest statistics panel of what those setups did on your symbol. Analysis only – it does not trade.