MT5自定义均线指标(含弹窗、App、邮箱预警)

本文介绍如何在MT5平台上创建自定义均线指标,并结合弹窗、应用程序及邮箱预警功能,帮助交易者实现无需盯盘的智能交易辅助系统。
摘要由CSDN通过智能技术生成

适合懒人、不用盯盘
MQL5和C是类似的

//+------------------------------------------------------------------+
//|                                                junxianyujing.mq5 |
//|                        Copyright 2019, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property indicator_chart_window
#property indicator_buffers 4 //定义4个画线位置
#property indicator_plots   4 //画4条线
//---- plot long
#property indicator_label1  "long" //这条线的名称
#property indicator_type1   DRAW_LINE //这条线的类型是线性
#property indicator_color1  Red //这条线的颜色
#property indicator_style1  STYLE_SOLID //这条线是实线
#property indicator_width1  1 //这条线的宽度是1
//---- plot small
#property indicator_label2  "small"
#property indicator_type2   DRAW_LINE
#property indicator_color2  Yellow
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1
//---- plot up
#property indicator_label3  "up"
#property indicator_type3   DRAW_ARROW //这里我们要画箭头
#property indicator_color3  White
#property indicator_style3  STYLE_SOLID
#property indicator_width3  1
//---- plot down
#property indicator_label4  "down"
#property indicator_type4   DRAW_ARROW
#property indicator_color4  MediumBlue
#property indicator_style4  STYLE_SOLID
#property indicator_width4  1
//--- input parameters
input int      longma=50; //长均线周期(也就是上面图中我们输入的)
input int      smallma=10; //短均线周期(也就是上面图中我们输入的)
//--- indicator buffers
double         longBuffer[]; //(也就是上面图中我们输入的画线是long的时候,这里就会产生一个longBuffer[]数组)
double
  • 3
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值