An Expert Advisor that "silently stops trading" is one of the most common questions on the forum. Usually the reason is simple (the Algo Trading button, an investor login, a closed session, a wrong lot step, not enough margin), but the EA only shows an error code, or nothing at all.

TradeDiagnostics.mqh runs all these checks at once and returns a report with one line per check:
Checks
Functions
Use in your own EA, for example in OnInit or when a trade request fails:
#include <TradeDiagnostics.mqh>
void CheckBeforeTrading()
{
STDCheck report[];
if(TD_Run(_Symbol, 0.10, 30, report) == TD_BLOCK)
Print("Cannot trade now: ", TD_Blockers(report));
} TradeDiagnosticsDemo.mq5 is a script that shows the report on the chart and in the Experts log. Inputs: symbol (empty = chart symbol), volume (0 = minimum volume) and a spread limit in points (0 = off). Put both files in the same folder (or the .mqh file in MQL5\Include) and compile the script.
The picture shows the real output on a demo account on a Saturday: everything is OK except the trading session, so the report says why no trade can be opened.
Notes
Spread Monitor Alert
Spread monitor for Gold (XAUUSD) and any symbol on MT5. Shows the spread now, its average and the highest of the day in a small panel and alerts when the spread opens above your limit or above twice the average. Open source code.
Pivot Points Daily Weekly Monthly
Pivot points for Gold (XAUUSD) and any symbol on MT5. Classic or Fibonacci P, R1 to R3 and S1 to S3 from the previous day, week or month, one set per period, with an optional alert when a candle closes across a level. Open source code.
Broker Time Panel - server clock, local zone, measured offset, candle close countdown
The panel prints the broker's server clock, your local clock with its GMT zone, the offset between the two to the minute, and the countdown to the close of the chart's current candle. The offset is measured from the terminal's own clocks on every pass, so nothing is typed in and no broker zone is assumed. If you set a lead in seconds and enable a channel, it sends one alert per candle while a bid is available, with the seconds left and the bid; its eight objects stay out of the object list and cannot be selected.
ADR Levels: Average Daily Range, range used in percent, projected high and low (no repaint)
Average Daily Range from finished days, ADR high / low projected from today's low and high or from the open, range used in percent, a small panel and alerts at 80 / 100 percent. Day from broker or New York time. No repaint.