I've made a sample script which uses a duplicated *_d.trd version from my trade script to view all active trades.
Just like my trading script, this sample script is unable to close the trades from my previous MT4 session.
There are no error messages at all in the MT4 & Zorro log files. In fact there is no sign from any trading attempts.

output:
Quote

TestCloseAllTrades
Login 0 MT4/5..
!ZorroMT4.dll V4.26
!IG Group Limited connected at UTC 04-17 21:44
Load EUR/USD prices.. 292 h
Load USD/JPY prices.. 292 h
Load GBP/USD prices.. 292 h
Load AUD/USD prices.. 292 h
Load USD/CAD prices.. 292 h
V 2.444 on Sun 22-04-17 23:42:35 ('My Name')

Trade: TestCloseAllTrades 2022-04-17
[USD/CAD::S59229] - resumed (38 lots)
[USD/JPY::L61556] - resumed (1 lots)
[EUR/USD::S67148] - resumed (1 lots)
Assets History\AssetsIG.csv
Lookback 80 bars, 2022-04-12..2022-04-17

[Tue 22-04-12 13:00] 5492 -38.26 0/3 (1.08954)
Asset: EUR/USD | Short open/pending trades: 1
Asset: USD/JPY | Long open/pending trades: 1
Asset: USD/CAD | Short open/pending trades: 1
Logout.. ok


code:
Code
int i;

function run()
	{
	assetList("History\\AssetsIG.csv");
	
	if(is(INITRUN))
		{
		asset("EUR/USD");
		asset("USD/JPY");
		asset("GBP/USD");
		asset("AUD/USD");
		asset("USD/CAD");
		}

	if(Bar > 1)
		{
		while(asset(loop("EUR/USD", "USD/JPY", "GBP/USD", "AUD/USD", "USD/CAD")))	
			{
			i = 0;
			for(current_trades)
				{
				i++;
				if(TradeIsLong)
					{
					printf("\nAsset: %s | Long open/pending trades: %i", Asset, i);	
					exitLong();//Nothing happens
					}
				else
					{
					printf("\nAsset: %s | Short open/pending trades: %i", Asset, i);	
					exitShort();//Nothing happens
					}
				}
			}
		quit();
		}
	}