Join our fan page
- Views:
- 80
- Rating:
- Published:
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Spread ATR Monitor shows how expensive it is to trade right now compared with the normal movement of the symbol. A spread of 20 points is nothing on gold and a lot on EURUSD; comparing it with ATR puts it in context.
- Current spread, plus the average and maximum spread over the last N ticks.
- ATR of the last closed bar, in points.
- Spread as a percentage of ATR, with a warning colour when it is above a configurable threshold (10% by default).
Useful before manual entries, around session opens and news, and to choose a sensible maximum-spread filter for an Expert Advisor. The indicator does not trade: it only reads prices and draws labels.
Inputs
- Ticks used for the average and maximum spread.
- ATR period (current timeframe).
- Warning threshold: spread as % of ATR.
- Panel corner, X/Y offsets, normal and warning colours.
Example (screenshot): XAUUSD M15, spread 20 points against an ATR of 761 points, 2.6%.

Risk Lot Panel - position size by risk and stop distance
On-chart panel that calculates the lot size for a given risk (% of balance, % of equity or fixed money) and stop-loss distance, using the broker's tick size and tick value. Works on forex, metals, indices and crypto.
Trailing Stop Breakeven Manager
Trailing stop and breakeven manager for Gold (XAUUSD), forex and any symbol: moves the stop to breakeven with an offset, then trails it in points or ATR multiples on manual trades and on any EA, filtered by magic and symbol. Open source code.
Restart-Safe EA Template - no duplicate entries after a restart
Expert Advisor template that shows safe execution practices: closed-bar signals once per bar, no duplicate entries after an MT5 or VPS restart, spread and stop-level checks, normalised volume and a log line for every decision.
Prop-firm Guard - daily loss and max drawdown protection for challenge accounts
Watches the whole account and closes everything before the daily loss or max drawdown limit is breached, then keeps the account flat until the block ends. Does not trade.