- 显示:
- 2235
- 等级:
- 已发布:
- 2013.11.25 08:41
- 已更新:
- 2023.03.29 14:30
-
需要基于此代码的EA交易或指标吗?请在自由职业者服务中订购 进入自由职业者服务
真实作者:
WizardSerg
此 SlopeDirectionLine 趋势指标有能力改变平均算法和触发警报, 推送通知以及发送电子邮件。
指标输入参数:
//+-----------------------------------+ //| Indicator input parameters | //+-----------------------------------+ input Smooth_Method MA_Method1=MODE_LWMA; // 第一个平均方法 input uint Length1=12; // 第一个移动平均深度 input int Phase1=15; // 第一个移动平均参数 input Smooth_Method MA_Method2=MODE_SMA; // 第二个移动平均方法 input int Phase2=15; // 第二个平滑参数 input Applied_price_ IPC=PRICE_CLOSE; // 价格常量 input int Shift=0; // 标水平平移,单位柱线 input int PriceShift=0; // 指标垂直平移,单位点 input bool On_Push = false; // 发送消息许可 input bool On_Email = false; // 许可 发送电子邮件 input bool On_Alert = true; // 许可 触发报警 input bool On_Play_Sound = false; // 许可播放 声音信号 input string NameFileSound = "expert.wav"; // 声音信号文件名 input string CommentSirName="SlopeDirectionLine: "; // 报警注释的第一部分 input uint SignalBar=1; // 信号的主线号码
指标使用 SmoothAlgorithms.mqh 的库类(必须被复制到 客户端文件夹\MQL5\Include)。类库的使用描述可参阅文章 "Averaging price series for intermediate calculations without using additional buffers(无需使用额外的缓冲区进行平均价格序列的中间计算)"。
图例.1 SlopeDirectionLine 指标
由MetaQuotes Ltd译自俄语
原代码: https://www.mql5.com/ru/code/1489