Close All (Filtered) is a script that closes open positions and deletes pending orders in one run. Filters let you close only what you mean to: for example only the losing sells of one EA, or only the profitable trades on the current chart.
Before doing anything, the script counts the positions and orders that match the filters and asks for confirmation. Positions that fail to close (requote, busy server) are retried, and the return code of every failure is printed in the Experts log. At the end a summary shows how many items were closed or deleted out of how many matched.

Confirmation box before closing
Input parameters

Input parameters
The script uses the standard CTrade class and works on both netting and hedging accounts. Algo Trading must be enabled in the terminal.
Range Compression Zones Breakout
Range Compression Zones Breakout draws range compression zones and marks breakouts that pass a higher-timeframe high/low filter and a volume filter. Inspired by the range compression idea in Domenico D'Errico's Accumulation/Distribution study (TASC, August 2018). Independent implementation, not a literal port of the published study.
Tick-Based Spread Distribution Profiler reads historical Bid/Ask ticks via CopyTicksRange
Tick-Based Spread Distribution Profiler reads historical Bid/Ask ticks via CopyTicksRange() and plots 24h spread percentiles (P50, P90, P99) in a separate subwindow. Key Features: - True Tick Percentiles: Plots Median (P50 histogram), P90 (orange line), and P99 (red dotted line) in points for every server hour (00-23h). - Unbiased Reservoir Sampling: Samples multi-week history within InpMaxSamplesPerHour without biasing early days. - Closed-Bar Friction Ratio: Uses closed-bar iATR (shift=1) to show Spread_P50 / ATR (%) and spot low-friction hours. - Clean Subwindow HUD: Displays global/current-hour stats and best/worst hours, with zero log spam and full OnDeinit() cleanup. - Optional CSV Export: Exports 24h Min/P50/P90/P99/Max stats to MQL5\Files\SpreadProfile_<Symbol>.csv. Inputs: InpLookbackDays (14), InpMaxSamplesPerHour (50000), InpAtrTimeframe (M15), InpAtrPeriod (14), InpRefreshMinutes (60), InpShowSummaryHUD, InpExportCSV.
Candle Timer and Spread
Shows the time left until the current candle closes and the live spread in any chart corner. Keeps counting every second, even when no ticks arrive.
Lot Size Calculator - Risk Percent to Lots
Calculates the correct lot size from your risk (% of balance, % of equity or a fixed amount) and stop-loss distance. Shows actual risk and margin. Never places trades.