Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 5 Libraries | ASQ Order Executor | Free Download

Discover expert developed MetaTrader tools that can complement professional solutions.

Image for ASQ Order Executor

FEATURES:

- Automatic retry logic with configurable max attempts and delay
- Requote handling with separate retry path from rejections
- Slippage calculation in pips with violation detection
- Auto-normalization of SL/TP against broker stop level
- Auto-detection of fill policy (FOK / IOC / RETURN)
- Full execution statistics (success rate, avg slippage, avg exec time, volume)
- Market orders (Buy / Sell) and pending orders (Limit / Stop, Buy / Sell)
- Position management (close, partial close, modify SL/TP, close-all-by-magic)
- Human-readable result codes with 10 execution states

- Verbose logging toggle for debugging

Smooth out market noise with the Heiken Ashi Expert Advisor for MT4 and MT5. Reliable trend-following automation. Details here.

Image for ASQ Order Executor


DEMO EA INCLUDED:
Attach to any chart:
— Dashboard with BUY, SELL, CLOSE ALL action buttons
— Live execution statistics with color-coded metrics
— Success rate gauge (green >=95%, amber >=80%, red below)
— Total attempts, successful, rejections, requotes, timeouts, slippage violations
— Avg and max slippage in pips, avg execution time in ms, total volume executed
— RESET button to clear stats mid-session

USAGE:
#include "ASQ_OrderExecutor.mqh"
CASQOrderExecutor exec;
exec.Initialize(_Symbol, 20260417);
exec.SetMaxRetries(3);
exec.SetMaxSlippage(30);
exec.SetVerboseLogging(true);

ENUM_ASQ_EXEC_RESULT result = exec.Buy(0.10, sl, tp, "Strategy A");
if(result == ASQ_EXEC_SUCCESS)
Print("Executed at ", exec.GetStats().avgSlippagePips, " pips slip");

exec.CloseAllByMagic();

Place both files in the same folder — compiles instantly, no subfolder setup needed.

This is the open-source execution engine behind Quant Athena Gold v2 on the MQL5 Market. Same retry logic, same slippage control — the Market version adds the CORTEX AI adaptive execution layer.

FILES:
- ASQ_OrderExecutor.mqh — Library (960 lines)
- ASQ_OrderExecutor_Demo.mq5 — Demo EA (334 lines)

MetaTrader 5, all brokers, all instruments, all timeframes.
Free and open-source. 1,294 lines of production MQL5.

Thanks for reading. Discover premium MetaTrader solutions at RobotFX.

72025

Best MetaTrader Indicators + Profitable Expert Advisors