• 新添加量子混沌系统板块,欢迎大家访问!---“量子混沌系统”
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏我们吧

“ZigZag通道”,一款具备突破提醒与波动过滤的市场分析利器 MT4指标 免费!

指标下载 qchaos.009 3个月前 (11-14) 9206 复制链接

指标名称:ZigZag通道

版本:MT4 ver. 2.25(指标)

ZigZag通道 是一种基于 ZigZag 算法的技术指标,用于在图表中显示价格的波动模式。该指标结合了ZigZag的波动极值与突破信号,用于识别市场中的潜在高低点、突破点等关键技术信号。它支持不同的图表设置,并且可以根据价格波动做出实时提醒。

  • ZigZag极值搜索:根据指定的深度、回退步数和价格偏差来寻找市场中的高点与低点。
  • 突破信号提醒:当价格突破前期的高点或低点时,可触发实时提醒功能,提醒用户市场的突破情况。
  • 可自定义参数:提供多个自定义参数,用户可以灵活调整ZigZag的深度、回退步数等,满足不同的交易需求。
  • 显示突破位置:可选显示突破位置的箭头,帮助用户直观地识别突破发生的时刻。

参数:

部分代码展示:

//+————————————————————————————+
//+——————————————————————+
//| ZigZag通道.mq4 |
//| Copyright © 2009-2024, http://www.QChaos.com |
//| https://www.qchaos.com/ |
//+——————————————————————+

property copyright "Copyright © 量化混沌, http://www.qchaos.com"

property link "https://www.qchaos.com"

property version "2.25"

property strict

property description "———————————————"

property description "EA、指标公式分享"

property description "EA、指标编写业务承接"

property description "———————————————"

property description "更多资源,关注公众号:量化程序"

property description "微 信:QChaos001"

property description "手机号:134-8068-5281"

property description "———————————————"

define TITLE "ZigZagZug (v1.3r1) – MetaTrader 4 指标"

define ABSTRACT "带有额外功能的 ZigZag 指标"

property indicator_chart_window

property indicator_buffers 7

property indicator_width1 2

property indicator_style1 0

property indicator_color1 Silver

property indicator_width2 1

property indicator_style2 0

property indicator_color2 Aqua

property indicator_width3 1

property indicator_style3 0

property indicator_color3 Magenta

property indicator_width4 1

property indicator_style4 2

property indicator_color4 Aqua

property indicator_width5 1

property indicator_style5 2

property indicator_color5 Magenta

property indicator_width6 1

property indicator_style6 0

property indicator_color6 Aqua

property indicator_width7 1

property indicator_style7 0

property indicator_color7 Magenta

//+————————————————————————————+
// Please note that the TAB Size is based on 4, not 3
//+————————————————————————————+

//+————————————————————————————+
// 指标设置
//+————————————————————————————+

//— 主要指标设置
extern string strPrimarySettings = "— 主要指标设置 —"//主要指标设置
;
//—- 定义ZigZag参数
extern int intDepth = 12; // ZigZag极值搜索深度
extern int intBackStep = 3; // ZigZag极值回退步数

extern double dblDeviation = 5.0; // ZigZag极值的价格偏差

extern bool boolShowBreakOut = false; // 显示突破发生位置
extern bool boolAlertOnBreakOut = false; // 突破时提醒用户

//+——————————————————————+
//| |
//+——————————————————————+
extern string strBreakoutMsgUpper = "(高) 突破已发生!";
extern string strBreakoutMsgLower = "(低) 突破已发生!";

//—- 定义ZigZagZug缓存
double
dblArrayZigZag[] // ZigZag点
, dblArrayZigZagHigh[] // ZigZag高点
, dblArrayZigZagLow[] // ZigZag低点
, dblArrayHigh[] // 深度搜索中的最高值
, dblArrayLow[] // 深度搜索中的最低值
, dblArrayBreakOutHigh[] // 深度搜索中的突破高点
, dblArrayBreakOutLow[] // 深度搜索中的突破低点
;

//—- 定义额外变量

bool
boolDownloadHistory = false // 下载历史数据
;
int
intLevel = 3 // 深度重新计数
, intIndexLimit = 100 // 索引计数限制
;
datetime
dtAlertLastUpper = NULL // 上次上行突破提醒的日期/时间
, dtAlertLastLower = NULL // 上次下行突破提醒的日期/时间
;
string
strSymbolName // 当前图表符号名称
, strTimeFrameName // 当前图表时间框架名称
;

//—- Define Search States

define _SEARCHPEAK +1

define _SEARCHBOTH 0

define _SEARCHVALLEY -1

//+————————————————————————————+
// Indicator Functions
//+————————————————————————————+

//—- Initialise Buffer Index and other Properties
int init()
{
// Set Number of Buffers to be used
if(boolShowBreakOut || boolAlertOnBreakOut)
IndicatorBuffers(7);
else
IndicatorBuffers(5);

// Set Number of Digits (Precision)
IndicatorDigits(Digits);

IndicatorShortName(
StringConcatenate("ZigZag通道 – MetaTrader 4 指标",
" (", intDepth
, ",", intBackStep
, ",", dblDeviation, ")"
));

// Set Buffer Index
SetIndexBuffer(0, dblArrayZigZag);
SetIndexBuffer(1, dblArrayZigZagHigh);
SetIndexBuffer(2, dblArrayZigZagLow);
SetIndexBuffer(3, dblArrayHigh);
SetIndexBuffer(4, dblArrayLow);

// Set Index Label
SetIndexLabel(0, "ZigZag Points");
SetIndexLabel(1, "ZigZag Highs");
SetIndexLabel(2, "ZigZag Lows");
SetIndexLabel(3, "Depth High");
SetIndexLabel(4, "Depth Low");

// Set Line Style
SetIndexStyle(0, DRAW_SECTION, STYLE_SOLID);
SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID);
SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID);
SetIndexStyle(3, DRAW_LINE, STYLE_DOT);
SetIndexStyle(4, DRAW_LINE, STYLE_DOT);

// Set Arrow Types
SetIndexArrow(1, 108);
SetIndexArrow(2, 108);

// Set Empty Value
SetIndexEmptyValue(0, NULL);
SetIndexEmptyValue(1, NULL);
SetIndexEmptyValue(2, NULL);
SetIndexEmptyValue(3, NULL);
SetIndexEmptyValue(4, NULL);


量子混沌 , 版权所有丨如未注明 , 均为原创
转载请注明原文链接:“ZigZag通道”,一款具备突破提醒与波动过滤的市场分析利器 MT4指标 免费!