거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
스크립트

MT5 Order Preflight - Read-Only Validation - MetaTrader 5용 스크립트

Arnold Holm
Arnold Holm
I develop production-ready MQL4/MQL5 Expert Advisors, indicators, dashboards and trade-management tools from explicit trading rules. I also convert authorized TradingView/Pine Script logic to MetaTrader 5 and turn rough ideas into testable technical specifications.
조회수:
164
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Purpose

MT5 Order Preflight is a read-only diagnostic script for checking a hypothetical market, limit or stop order against the rules currently advertised for the chart symbol. It helps isolate common request problems before the same values are tested inside a larger Expert Advisor.

The script never sends, modifies or cancels a trade. It creates a plain-text validation report in the Experts tab and, optionally, in the terminal-wide Common\Files folder.

What it checks

  • availability of a current Bid and Ask tick;
  • symbol trade mode and long-only, short-only or close-only restrictions;
  • support for market, limit or stop orders;
  • minimum, maximum and step-aligned volume;
  • tick-size normalization of a hypothetical pending price;
  • pending-order distance against the current stops level;
  • stop-loss and take-profit support and minimum distance;
  • advertised FOK, IOC or BOC filling flags.

How to use

  1. Copy SCA_MT5OrderPreflight.mq5 to MQL5\Scripts\StratCoreAlpha and compile it.
  2. Run the script on the symbol that exhibits the order problem.
  3. Select the hypothetical order scenario, volume and distances.
  4. Review every PASS, WARN and FAIL line in the Experts tab or saved text report.
  5. Add the actual trade retcode and nearby Experts or Journal lines when preparing a reproducible bug report.

Inputs

  • InpScenario — market buy/sell, buy/sell limit or buy/sell stop.
  • InpVolume — hypothetical order volume.
  • InpPendingDistancePoints — pending distance from the current Ask or Bid.
  • InpStopLossPoints and InpTakeProfitPoints — protective distances; zero disables the corresponding check.
  • InpWriteTextFile and InpPrintToExperts — report destinations.
  • InpFilePrefix — prefix for the Common\Files text report.

Reading the result

PASS means the supplied value is consistent with the inspected symbol metadata. WARN identifies a disabled or broker-dependent check that needs review. FAIL means the hypothetical request conflicts with at least one current rule.

[PASS] Volume range: 0.10000000 is inside the advertised range. [PASS] Volume alignment: 0.10000000 matches step 0.01000000. [FAIL] Stop loss distance: 5 points is below the current stops level of 20. Result: DO NOT SEND AS CONFIGURED

Privacy and safety

The report excludes account login, owner name, broker server, balance, equity, positions, orders, history, files, keys and credentials. Review the generated text before sharing it.

A passing preflight cannot guarantee trade-server acceptance, execution price or trading results. Market state and broker rules can change between the diagnostic run and a later request.

Source and license

The source is released under the MIT License. The versioned source and installation guide are available at the public GitHub release. MT5 Order Preflight read-only validation

MT5 Broker Environment Report MT5 Broker Environment Report

Prints a privacy-conscious snapshot of the current MT5 broker, account, symbol and terminal environment to the Experts log for diagnostics and support.

Trend Regime Inspector for MetaTrader 5 Trend Regime Inspector for MetaTrader 5

Open-source indicator combining moving-average direction, ADX and Kaufman's Efficiency Ratio into a transparent trend-condition score. Informational only; no trade execution.

Risk Position Size Calculator Risk Position Size Calculator

Set your risk %, drag the stop, and get the exact lot size priced in your account currency — margin and target included. Calculates only, never trades.

Trend Execution Planner - Regime and Risk Panel Trend Execution Planner - Regime and Risk Panel

Free open-source MT5 read-only chart utility that scores current trend conditions and builds broker-normalized long and short risk plans. It uses moving-average direction and slope, ADX, Efficiency Ratio, ATR, spread, account currency and symbol specifications. It never opens, modifies or closes trades.