MT4 EA源码:The Doji Candelstick Pattern 十字星形态自动检测报警|星钻会员尊享 - 资源合集论坛 - Meta Trade 4 - BBTrading

MT4 EA源码:The Doji Candelstick Pattern 十字星形态自动检测报警|星钻会员尊享

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

这个 EA 自动检测经典十字星形态(开收盘价差小于 3 点、且开收盘位于 K 线区间中轴 ±10% 内),在图表上画红色箭头与 Doji 标签并弹窗报警;不自动下单,是纯信号提示工具。本帖文件为 MT4 源码,打包成 zip 下载,解压后在 MetaEditor 里编译使用,参数与文件开头见下方源码预览。

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

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

可调参数(0 个)

    //+------------------------------------------------------------------+
    //|                                                       DojiEN.mq4 |
    //|                                  Copyright 2024, MetaQuotes Ltd. |
    //|                                                          https://www.b123.com/ |
    //+------------------------------------------------------------------+
    #property copyright "Copyright 2024, MetaQuotes Ltd."
    #property link      "https://www.b123.com/"
    #property version   "1.00"
    #property strict
    //+------------------------------------------------------------------+
    //| Expert initialization function                                   |
    //+------------------------------------------------------------------+
    int OnInit()
      {
       // Enable alerts when EA is initialized
       Print("EA for detecting classic Doji pattern initialized.");
       return(INIT_SUCCEEDED);
      }
    //+------------------------------------------------------------------+
    //| Expert deinitialization function                                 |
    //+------------------------------------------------------------------+
    void OnDeinit(const int reason)
      {
       // When EA is deinitialized, objects can be removed (if you want to keep them, you can disable this)
       Print("EA for detecting Doji pattern deinitialized.");
      }
    //+------------------------------------------------------------------+
    //| Expert tick function                                             |
    //+------------------------------------------------------------------+
    void OnTick()
      {
       // Check if a classic Doji pattern appeared on the previous closed candle
       if(IsDoji())
         {
          // Mark the Doji pattern on the chart

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

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

    请登录后发表评论