MT4 EA源码:Breakout Martin Gale Expert Advisor for mql4 突破型马丁恢复加仓|星钻会员尊享 - 资源合集论坛 - Meta Trade 4 - BBTrading

MT4 EA源码:Breakout Martin Gale Expert Advisor for mql4 突破型马丁恢复加仓|星钻会员尊享

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

这个 EA 是突破型马丁恢复 EA,按账户余额百分比计算手数与止盈目标,亏损后按恢复乘数加仓摊平,可调止盈点数、可用余额百分比、余额止盈/止损百分比、恢复启动阈值与 MagicNumber,属于马丁加仓逻辑,高风险。依赖同页 ExpertFunctions.mqh。本帖文件为 MT4 源码,打包成 zip 下载,解压后在 MetaEditor 里编译使用,参数与文件开头见下方源码预览。

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

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

可调参数(7 个)

  • int TakeProfPoints = 50
  • double BalancePercentageAvailable = 50
  • double TP_Percentage_of_Balance = 0.1
  • double SL_Percentage_of_Balance = 10
  • double Start_The_Recovery = 0.2
  • double TP_Points_Multiplier = 1
  • int MagicNumber = 89758029
//+------------------------------------------------------------------+
//|                                           NewExpertformarket.mq4 |
//|                                  Copyright 2023, MetaQuotes Ltd. |
//|                                            https://www.b123.com/ |
//+------------------------------------------------------------------+
#property copyright "Müller Péter"
#property link      "https://www.b123.com/"
#property version   "1.00"
#property strict

#include  <ExpertFunctions.mqh>

input int TakeProfPoints = 50;
input double BalancePercentageAvailable = 50;
input double TP_Percentage_of_Balance = 0.1;
input double SL_Percentage_of_Balance = 10;
input double Start_The_Recovery = 0.2;
input double TP_Points_Multiplier = 1;
input int MagicNumber = 89758029;

int OnInit()
  {
   return(INIT_SUCCEEDED);
  }
void OnDeinit(const int reason)
  {
  }
void OnTick()
{
   static double StopLoss = SL_Percentage_of_Balance*Start_The_Recovery*AccountBalance()/100;
   static double TakeProfit = TP_Percentage_of_Balance*AccountBalance()/100;
   double CurrentProfit = Profits(MagicNumber,_Symbol);
   static bool Recovering = false;
   double Balance = AccountBalance();
   if(CurrentProfit < -StopLoss || CurrentProfit > TakeProfit)

风险提示:这类 EA 带网格/马丁类加仓逻辑,顺风时看不出来,单边行情里仓位和浮亏会一起放大。上实盘前先在模拟盘跑够样本,把最大层数和总手数按自己能承受的回撤设死,不要用默认参数直接跑。

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

请登录后发表评论