此资源为星钻会员专享,每日更新,收录于《大白EA宝库:星钻会员专属合集》。
这个 EA 是唐奇安通道突破剥头皮 EA,通道突破进场,含 ATR 跟踪止盈,仓位可按固定手数或风险百分比计算,可调通道周期、极值、边距、止损止盈点数与 MagicNumber。需配套指标 Donchian_Channels,安装时保持原文件名。本帖文件为 MT4 源码,打包成 zip 下载,解压后在 MetaEditor 里编译使用,参数与文件开头见下方源码预览。
源码预览(先看代码,再决定下不下)
本帖是源码 EA:G1_Donchian_Scalper_EA.mq4,全文共 358 行。下面是它的全部可调参数与文件开头,完整源码在上方下载区,星钻会员可见。
可调参数(12 个)
int MAGICMA = 3937;(MAGICMA: Magic Number to recognize the chart orders)int Slippage = 2;(Slippage: Slippage Points admitted)LotSizeCalcMode LotsCalculation = ByFixedSize;(LotsCalculation: How to compute the Lot size per trade)double Lots = 0.01;(Lots: Fixed Lots to assign to each order)double RiskPerc = 1;(RiskPerc: The percentage of the Balance to Risk if LotsCalculation != ByFixedSize)double CrossAnchor = 0;(CrossAnchor: # of Points the price retrace from opposite level before open a new Order)double StopLossPoints = 80;(StopLossPoints: # of Points from the opposite level to set the Stop Loss to (0 == level))double TakeProfitPoints = 380;(TakeProfitPoints: Fixed Take Profit Points if the order is filled and goes well)TakeProfitType TargetTPMode = CloseAtProfit;(TargetTPMode: Whether close as soon as the TP is reached or try to trail the StopLoss)TrailingProfitType TrailingProfitMode = ByATR;(TrailingProfitMode: Strategy to use for the trailing StopLoss if TargetTPMode != CloseAtProfit)bool UseExternalIndicator = true;(UseExternalIndicator: Whether use external indicator or internal code for the D.Channels)int Periods = 20;(Periods: How many bars Donchian Channels should look back)
//+------------------------------------------------------------------+ //| DonchianScalperEA.mq4 | //| Copyright 2023, MetaQuotes Ltd. | //| https://www.b123.com/ | //+------------------------------------------------------------------+ #property copyright "2023, AlFa7961" #property link "https://www.b123.com/" #property version "2.02" #property strict #include <Indicators.mqh> #include <OrderManagementFunctions.mqh> #define VER "2.02" #define EA_NAME "DonchianScalperEA" //+------------------------------------------------------------------+ //| Expert inputs | //+------------------------------------------------------------------+ input int MAGICMA = 3937; // MAGICMA: Magic Number to recognize the chart orders input int Slippage = 2; // Slippage: Slippage Points admitted input LotSizeCalcMode LotsCalculation = ByFixedSize; // LotsCalculation: How to compute the Lot size per trade input double Lots = 0.01; // Lots: Fixed Lots to assign to each order input double RiskPerc = 1; // RiskPerc: The percentage of the Balance to Risk if LotsCalculation != B input double CrossAnchor = 0; // CrossAnchor: # of Points the price retrace from opposite level before o input double StopLossPoints = 80; // StopLossPoints: # of Points from the opposite level to set the Stop Los input double TakeProfitPoints = 380; // TakeProfitPoints: Fixed Take Profit Points if the order is filled and g input TakeProfitType TargetTPMode = CloseAtProfit; // TargetTPMode: Whether close as soon as the TP is reached or try to trai input TrailingProfitType TrailingProfitMode = ByATR; // TrailingProfitMode: Strategy to use for the trailing StopLoss if Target input bool UseExternalIndicator = true; // UseExternalIndicator: Whether use external indicator or internal code f input int Periods = 20; // Periods: How many bars Donchian Channels should look back /*input*/ int Extremes = 1; /*input*/ int Margins = 1; /*input*/ int Advance = 0; /*input*/ int MaxBars = 100;
风险提示:EA 交易有风险,过往与参数表现不代表未来。正式使用前先在模拟盘跑够样本,确认在自己的点差、滑点环境下仍符合预期,再决定是否上实盘。
版本说明:资源随 MT4/MT5 版本迭代可能失效,如遇失效请在本帖留言反馈。

