感谢这篇有用的文章和整个烹饪书系列。
只是我注意到,在这篇文章中,所有代码中的字符串注释都是俄文......:(
感谢这篇有用的文章和整个烹饪书系列。
只是我注意到,在这篇文章中,代码中的所有字符串注释都是俄语......:(
对不起,已经修复,现在代码带有英文注释。
Sir:
Please help !
I need to synchronize between 3 charts. use what event and how to set ?
now I use global object setted in one chart, and use one timer for one chart, and then use OnTimer() to check the value of globe object, but there are some delay.
Is it possible use only one global timer and then response it on multi-charts with OnTimer() ??
- cn.bing.com
Sir:
Please help !
I need to synchronize between 3 charts. use what event and how to set ?
now I use global object setted in one chart, and use one timer for one chart, and then use OnTimer() to check the value of globe object, but there are some delay.
Is it possible use only one global timer and then response it on multi-charts with OnTimer() ??
I know, use CharEvent.... not timer
新文章 MQL5 Cookbook: 处理典型图表事件已发布:
在我的文章中,我打算描述并亲手实践使用 OnChartEvent() 来处理 MQL5 开发者预定义的典型(标准)事件。在 MQL5 的文章和 代码库 中已经包含了使用处理器的例程。
不过,我的目的是分析在面向事件编程 (EOP) 背景下的表现。我相信这个处理器可以成功地用于全自动和半自动交易系统。
1. "ChartEvent" 事件
那么,首先让我们来看看事件类型是什么。
根据文档,该 ChartEvent 事件会在图表工作时出现,特别是当:
所以,这个事件可以与图表交互。此外,这种交互可以是手工交易结果,也可以是某些算法操作(自动交易)。
MQL5 开发者可以通过 ENUM_CHART_EVENT 枚举中的指定类型,对 ChartEvent 事件分类。
重点注意的是,这份列表有一个用户自定义事件的范围,其作用是作为程序员的隐藏保留。MQL5 开发者可以为其定制的事件提供 65535 个标识符。
为了利用自定义事件工作,一个特殊的生成器函数 EventChartCustom() 可满足程序员的需要。尽管,本文未考虑自定义事件。
作者:Dennis Kirichenko