In MQL5 'hot paths', environment API calls like TerminalInfoInteger(TERMINAL_TRADE_ALLOWED)
and MQLInfoInteger(MQL_TRADE_ALLOWED) can be a significant bottleneck during high tick frequency.
This commit optimizes IsTradingAllowed in ExpertMAPSARSizeOptimized_Improved.mq5 by caching
these states for 1 second using a static datetime flag to control refresh frequency,
significantly reducing terminal API overhead during rapid price ticks.