Version 3.1 2025.10.30
Key Changes in v3.1 (from v3.0):

1. Advanced Two-Step Order Execution:
* The 'SendOrder' function is fundamentally restructured to use a **Two-Step Fallback Mechanism**.
* Step 1: The EA attempts to execute the order using **ORDER_FILLING_FOK (Fill or Kill)** to ensure the *entire* required lot is filled at the requested price.
* Step 2: If the FOK attempt fails (due to partial liquidity or price movement), the EA automatically **falls back** and retries the order using **ORDER_FILLING_IOC (Immediate or Cancel)**. IOC allows for partial filling, increasing the chances of execution, even if not the full amount.

2. Minor Code Refinements:
* Added basic validation for 'point_value' and 'lot_step' to prevent division-by-zero errors.
* Improved lot normalization for increased robustness (if new_lot < lot_min, lot = lot_min).
Version 3.0 2025.10.30
Key Changes in v3.0:
1. Automatic Lot Adjustment (Auto Lot Adjust): If free margin is insufficient for InpLot, the EA automatically adjusts the lot size to the maximum affordable, prioritizing capital safety. Includes strict margin checks (OrderCalcMargin) and lot normalization (SYMBOL_VOLUME_MIN/STEP).
2. USD-based Risk Targets: Take Profit (InpTP_USD) and Stop Loss (InpSL_USD) are defined in US Dollar (USD) value, ensuring consistent financial risk management.
3. Improved Trend Filter (MTF): Buy/Sell signals (Ichimoku/MACD) must be confirmed by the Multi-Timeframe Trend Filter (MTF MA), ensuring trading aligns with the larger trend.