In this article, we will continue our series about designing a trading system using the most popular indicators and we will talk about the average directional index (ADX) indicator. We will learn this indicator in detail to understand it well and we will learn how we to use it through a simple strategy. By learning something deeply we can get more insights and we can use it better.
Comment("Simple ADX System - Signal is ",signal,"\n""ADX Value is ", ADXValue,
"\n""ADX Value Last is ", ADXValueLast, "\n""+DI Value is ", PDIValue,
"\n""-DI Value is ", NDIValue);
为了简化,你可以这样做:
Comment("Simple ADX System - Signal is ",signal,"\nADX Value is ", ADXValue,
"\nADX Value Last is ", ADXValueLast, "\n+DI Value is ", PDIValue,
"\n-DI Value is ", NDIValue);
你好,穆罕默德、
而不是
还不够吗?
谢谢、
胡安-路易斯
你好,穆罕默德、
而不是
还不够吗?
谢谢
胡安-路易斯
你好,胡安、
您说的对,也可以像您提到的那样。
谢谢、
这篇文章非常出色!不过,我发现了其中一个错误,而且我还发现了一个提供提示的机会。 该错误与 CopyBuffers 以及对相同句柄使用相同缓冲区索引 有关。 在 MQL5 中,指标句柄 只能在调用 CopyBuffer() 函数时使用相应的唯一缓冲区索引访问特定缓冲区 。
因此,当您输入
应该是
我猜这是个错别字,但觉得还是应该指出来,以防其他人混淆。 在完整代码中这是正确的,只是在示例中没有。
现在是小提示...
这不是什么大问题,但绝对能让你在写作时少敲几下键盘:
为了简化,你可以这样做:
除此之外,我觉得这篇文章信息量很大,内容也很详细。
我唯一要补充的是在 OnInit() 和 DeOnit() 中的错误处理,并将变量名从 ADXDef 改为 h_ADXDef(或 handle_ADXDef),这样在阅读代码时会更清楚,也能更好地识别变量的具体用途。
在 OnInit() 中:
以及 DeOninit() 中: