查看: 546|回复: 1
打印 上一主题 下一主题

[意见反馈] 如何跨周期调用MACD指标

[复制链接]
跳转到指定楼层
1
 楼主| 发表于 2022-12-2 13:39:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
求助:如何在5分钟图上调用日线MACD指标啊 :





2
 楼主| 发表于 2022-12-2 19:31:06 | 只看该作者
//------------------------------------------------------------------------ // 简称:MACD15M // 名称:MACD15M // 类别: 交易指令 // 类型: 用户应用 //------------------------------------------------------------------------ Params     //参数定义  Integer LongPrd(26);  Integer ShortPrd(12);  Integer M(9); GlobalVars   //全局变量定义 Vars    //局部变量定义 Begin    //策略执行区      String filepath("D:\\11.txt");//文件路径      NumericArray m15 = HisData(Enum_Data_Close, Enum_Period_Day, 1);    Numeric iDEA;  Numeric iDIFF;  iMACD(m15, iDIFF, iDEA, ShortPrd, LongPrd, m);    Numeric ret = 2*(iDIFF-iDEA);    PlotNumeric("DIFF",iDIFF);  PlotNumeric("DEA",iDEA);    FileAppend("D:\\11.txt","当前k线的日期、时间、对应日线的DIFF、DEA值分别为:"+Text(CurrentDate)+"--"+Text(CurrentTime)+"=="+Text(iDIFF)+"=="+Text(iDEA));//写入数据,方便对照    if(ret>0)  {   PlotStickLine("MACD",ret,0,ColorUp());  }  Else  {   PlotStickLine("MACD",ret,0,ColorDown());  }  End
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册入住  

本版积分规则

易家网  ©2015-2023  郑州期米信息技术有限公司版权所有  豫公网安备 41010502005136号 豫ICP备16010300号