指标名称:QC交易面板
版本:MT4 ver. 10.08(EA)
QC交易面板是一款多功能的下单面板
自定义修改止盈止损,一键平仓,一键锁仓,一键反手,显示订单均价线,显示订单信息面板。
达到预定风险值,自动强平。
净值低于多少,发邮件提醒等等功能!
参数:
部分代码展示:
//+------------------------------------------------------------------+
//| QC交易面板.mq4 |
//| Copyright © 2009-2024, www.QChaos.com |
//| https://www.qchaos.com/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 量化混沌, www.qchaos.com"
#property link "https://www.qchaos.com"
#property version "10.8"
#property strict
#property description "---------------------------------------------"
#property description "EA、指标公式分享"
#property description "EA、指标编写业务承接"
#property description "---------------------------------------------"
#property description "---------------------------------------------"
#property description "交易面板是一款多功能交易辅助工具,加载到任意图表"
#property description "特色功能:复盘功能,设置EA参数,在历史回测当中可点击 图表按钮 下单和平仓。\n"
#property strict
input string comm0X="--------①EA运行参数设置---------";//--------EA运行参数设置---------
bool 是否显示信息框=false;
color 信息显示颜色=clrYellow;
input int ordermagic=2024118; //魔术码
extern string orderComment="QC交易面板"; //订单注释
extern double 初始下单量=0.01;
extern double 止损点数=0;
extern double 止盈点数=0;
extern bool 统一止盈开关=false;
extern double 统一止盈点数=100;
input string comm5X="-------②风控预警发邮件设置-------";//-------风控预警发邮件设置-------
datetime yjtime=0;
extern bool 发送邮件开关=false;
extern double 净值低于多少发邮件=1000;
input string comm6X="-------③资金最大亏损设置-------";//-------资金最大亏损设置-------
extern double 最大资金回撤百分比止损平仓=30;
double 移动止损=0;
double 移动止盈=0;
double 挂单买入=0;
double 挂单卖出=0;
double avgbuyprice=0; //均价
double avgsellprice=0;
string comm10X="--------按钮参数设置--------";
ENUM_BASE_CORNER 按钮定位=CORNER_RIGHT_UPPER;
int 按钮X间隔=35;
int 按钮Y间隔=75;
string 对象名称="QC"; //对象名称。
int 按钮X=70;
int 按钮Y=25;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int OnInit()
{
diancha=MarketInfo(Symbol(),MODE_SPREAD);
EventSetTimer(1);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
cleanall();
EventKillTimer();
}