年度星钻会员尊享!MT4 EA:Manual Trade Pad for Strategy Tester 在策略测试器里练手动交易量化交易程序 - 交易机器人 | 助力投资交易更好成功资源合集论坛量化交易程序 - 交易机器人 | 助力投资交易更好成功Meta Trade 4量化交易程序 - 交易机器人 | 助力投资交易更好成功BBTrading

年度星钻会员尊享!MT4 EA:Manual Trade Pad for Strategy Tester 在策略测试器里练手动交易

此资源为年度星钻会员专享,每日更新,收录于《大白EA宝库:星钻会员专属合集》。

这是一个手动交易面板类 EA,用途很明确:在 MT4 的策略测试器里练习手动交易,不用等实盘行情也能练下单、改单和平仓的手感。本帖文件为 MT4 源码,打包成 zip 下载,解压后在 MetaEditor 里编译使用,参数与文件开头见下方源码预览。

源码预览(先看代码,再决定下不下)

本帖是源码 EA:Manual_Trade_Pad_MT4.mq4,全文共 839 行。下面是它的全部可调参数与文件开头,完整源码在上方下载区,星钻会员可见。

可调参数(10 个)

  • int InpMagic = 5170001;(Unique magic number used to identify managed positions.)
  • ENUM_SIZE_MODE InpSizeMode = SIZE_RISK_PERCENT;(Initial volume-sizing mode.)
  • double InpFixedLot = 0.10;(Default fixed volume in lots.)
  • double InpRiskPercent = 1.0;(Default percentage of balance to risk per trade.)
  • int InpSLPoints = 300;(Default stop-loss distance in points.)
  • double InpRR = 2.0;(Default reward:risk ratio; 0 disables TP.)
  • int InpBEOffset = 10;(Break-even SL offset in points.)
  • int InpDeviation = 20;(Maximum allowed price deviation in points.)
  • int InpPanelX = 15;(Horizontal panel position in pixels.)
  • int InpPanelY = 25;(Vertical panel position in pixels.)
//+------------------------------------------------------------------+
//|                                      Manual_Trade_Pad_Tester_MT4.mq4 |
//|   Risk-based manual trading pad for the MetaTrader 4 Tester      |
//+------------------------------------------------------------------+
//| Description:                                                     |
//|   A lightweight manual trading panel designed for the visual      |
//|   Strategy Tester and chart-based manual backtesting in MetaTrader |
//|   4. The EA can open market BUY/SELL orders, calculate volume     |
//|   from a fixed lot or account-risk percentage, attach an optional  |
//|   risk/reward based take-profit, move positions to break-even,     |
//|   partially close positions, and close positions by direction.    |
//|                                                                  |
//| Position scope:                                                   |
//|   Only positions belonging to the current symbol (Symbol()) and    |
//|   the configured magic number (InpMagic) are managed.             |
//|                                                                  |
//| Keyboard shortcuts:                                               |
//|   B = BUY                                                         |
//|   S = SELL                                                        |
//|   E = Move managed positions to break-even                        |
//|   C = Close all managed positions                                 |
//|                                                                  |
//| Implementation notes:                                             |
//|   The panel uses native MQL4 OBJ_* chart objects and built-in     |
//|   trade functions: OrderSend, OrderClose and OrderModify.         |
//|   No external libraries are required.                             |
//+------------------------------------------------------------------+
#property copyright "Amirhossein Heydarijokani"
#property link      "https://www.b123.com/"
#property version   "1.000"
#property description "MT4 manual trading pad for visual Strategy Tester backtesting."
#property description "Risk-% or fixed lot sizing, automatic R:R take profit,"
#property description "break-even, partial close, side-specific close and hotkeys."
#property strict
//+------------------------------------------------------------------+

风险提示:EA 交易有风险,过往与参数表现不代表未来。正式使用前先在模拟盘跑够样本,确认在自己的点差、滑点环境下仍符合预期,再决定是否上实盘。

版本说明:资源随 MT4/MT5 版本迭代可能失效,如遇失效请在本帖留言反馈。

请登录后发表评论