MT5 EA源码:BBRSI EA 布林带配合 RSI 反转交易|星钻会员尊享 - 资源合集论坛 - Meta Trade 4 - BBTrading

MT5 EA源码:BBRSI EA 布林带配合 RSI 反转交易|星钻会员尊享

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

这个 EA 用布林带配合 RSI 超买超卖信号做反转交易,默认参数针对 XAUUSD 5 分钟。本帖文件为 MT5 源码,打包成 zip 下载,解压后在 MetaEditor 里编译使用,参数与文件开头见下方源码预览。

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

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

可调参数(33 个)

  • int BBLen = 500;(BB Period)
  • double BBDev = 2;(BB Deviations)
  • int RSILen = 7;(RSI Period)
  • double TPCoef = 1;(TP Coefficient)
  • double SLCoef = 0.9;(SL Coefficient)
  • int SLDev = 0;(SL Deviation (Points))
  • bool CloseOrders = false;(Check For Closing Conditions)
  • bool CloseOnProfit = true;(Close Only On Profit)
  • bool Reverse = false;(Reverse Signal)
  • double Risk = 1.0;
  • ENUM_RISK RiskMode = RISK_DEFAULT;(Risk Mode)
  • bool IgnoreSL = true;(Ignore SL)
  • bool IgnoreTP = true;(Ignore TP)
  • bool Trail = true;(Trailing Stop)
  • double TrailingStopLevel = 50;(Trailing Stop Level (%))
  • double EquityDrawdownLimit = 0;(Equity Drawdown Limit (%) (0: Disable))
  • bool Grid = true;(Grid Enable)
  • double GridVolMult = 1.1;(Grid Volume Multiplier)
  • double GridTrailingStopLevel = 0;(Grid Trailing Stop Level (%) (0: Disable))
  • int GridMaxLvl = 20;(Grid Max Levels)
  • bool News = false;(News Enable)
  • ENUM_NEWS_IMPORTANCE NewsImportance = NEWS_IMPORTANCE_MEDIUM;(News Importance)
  • int NewsMinsBefore = 60;(News Minutes Before)
  • int NewsMinsAfter = 60;(News Minutes After)
  • int NewsStartYear = 0;(News Start Year to Fetch for Backtesting (0: Disable))
  • bool OpenNewPos = true;(Allow Opening New Position)
  • bool MultipleOpenPos = false;(Allow Having Multiple Open Positions)
  • double MarginLimit = 300;(Margin Limit (%) (0: Disable))
  • int SpreadLimit = -1;(Spread Limit (Points) (-1: Disable))
  • int Slippage = 30;(Slippage (Points))
  • int TimerInterval = 30;(Timer Interval (Seconds))
  • ulong MagicNumber = 1000;(Magic Number)
  • ENUM_FILLING Filling = FILLING_DEFAULT;(Order Filling)
//+------------------------------------------------------------------+
//|                                                        BBRSI.mq5 |
//|                                          Copyright 2023, Geraked |
//|                                       https://www.b123.com/ |
//+------------------------------------------------------------------+
#property copyright   "Copyright 2023, Geraked"
#property link        "https://www.b123.com/"
#property version     "1.6"
#property description "A strategy using Bollinger Bands and RSI"
#property description "XAUUSD-5M  2021.02.26 - 2023.09.15"

#include <EAUtils.mqh>

input group "Indicator Parameters"
input int BBLen = 500; // BB Period
input double BBDev = 2; // BB Deviations
input int RSILen = 7; // RSI Period

input group "General"
input double TPCoef = 1; // TP Coefficient
input double SLCoef = 0.9; // SL Coefficient
input int SLDev = 0; // SL Deviation (Points)
input bool CloseOrders = false; // Check For Closing Conditions
input bool CloseOnProfit = true; // Close Only On Profit
input bool Reverse = false; // Reverse Signal

input group "Risk Management"
input double Risk = 1.0; // Risk
input ENUM_RISK RiskMode = RISK_DEFAULT; // Risk Mode
input bool IgnoreSL = true; // Ignore SL
input bool IgnoreTP = true; // Ignore TP
input bool Trail = true; // Trailing Stop
input double TrailingStopLevel = 50; // Trailing Stop Level (%)
input double EquityDrawdownLimit = 0; // Equity Drawdown Limit (%) (0: Disable)

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

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

请登录后发表评论