//+------------------------------------------------------------------+ //| ProofNexa_SpreadSwap_Breakeven_HUD.mq5 | //| Copyright 2026, ProofNexa Quant & Execution Lab | //| https://rotenkus-dot.github.io | //+------------------------------------------------------------------+ #property copyright "Copyright 2026, ProofNexa Quant & Execution Lab" #property link "https://rotenkus-dot.github.io" #property version "1.50" #property description "Real-time Spread Bleed Auditor, Wednesday 3x Swap Warning, and 0% Stop-Out Endurance HUD for MT5." #property indicator_chart_window #property indicator_plots 0 input double InpTargetLots = 0.50; // Target Lot Size for Annual Cost Projection input int InpMonthlyTrades = 100; // Estimated Monthly Trades input double InpBenchmarkRawPips = 0.40; // Benchmark Raw/Pro Spread (pips) input int InpWarnSpreadPoints = 20; // High Spread Warning Threshold (points) //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { ChartSetInteger(0, CHART_SHOW_ASK_LINE, true); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { Comment(""); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { long liveSpreadPts = SymbolInfoInteger(_Symbol, SYMBOL_SPREAD); double liveSpreadPips = (double)liveSpreadPts / 10.0; double swapLong = SymbolInfoDouble(_Symbol, SYMBOL_SWAP_LONG); double swapShort = SymbolInfoDouble(_Symbol, SYMBOL_SWAP_SHORT); long stopOutMode = AccountInfoInteger(ACCOUNT_MARGIN_SO_MODE); double stopOutLevel = AccountInfoDouble(ACCOUNT_MARGIN_SO_SO); double equity = AccountInfoDouble(ACCOUNT_EQUITY); double excessPips = MathMax(0.0, liveSpreadPips - InpBenchmarkRawPips); double annualBleedUsd = excessPips * 10.0 * InpTargetLots * InpMonthlyTrades * 12.0; double endurancePips = (InpTargetLots > 0.0) ? (equity / (InpTargetLots * 10.0)) : 0.0; MqlDateTime dt; TimeCurrent(dt); string wedAlert = (dt.day_of_week == 3) ? "[WEDNESDAY 3X TRIPLE SWAP DAY - CHECK SWAP-FREE]" : "[Normal Session]"; string hud = StringFormat( "=== ProofNexa Execution & Spread Bleed Auditor v1.50 ===\n" "Symbol / Live Spread : %s | %d pts (%.1f pips) %s\n" "Annual Spread Bleed : -$%.0f / year lost vs Pro/Raw Benchmark (%.1f pips)\n" "Swap Long / Short : %.2f / %.2f %s\n" "Broker Stop-Out Rule : %.1f%% (%s) | 0%% Stop-Out Endurance: %.1f pips\n" "Full Web Simulator : https://rotenkus-dot.github.io (Partner Code: hrakh7d3jt)", _Symbol, liveSpreadPts, liveSpreadPips, (liveSpreadPts > InpWarnSpreadPoints ? "[HIGH SPREAD DRAG]" : "[OPTIMAL]"), annualBleedUsd, InpBenchmarkRawPips, swapLong, swapShort, wedAlert, stopOutLevel, (stopOutMode == ACCOUNT_STOPOUT_MODE_PERCENT ? "Percent" : "Money"), endurancePips ); Comment(hud); return(rates_total); } //+------------------------------------------------------------------+