投资者咨询:老师帮着改写成文华公式 (文华财经WH6赢顺V6.8)
来源:文华财经 日期:2020-7-30 1:26
// 简称: DEMA
// 名称: 求双指数移动平均
// 类别: 用户函数
// 类型: 内建函数
// 输出: 数值型
//------------------------------------------------------------------------
Params
NumericSeries Price(0);
Numeric Length(10);
Vars
Numeric DEMAValue;
NumericSeries EMA1;
Numeric EMA2;
Begin
EMA1 = XAverage(Price,Length);
EMA2 = XAverage(EMA1,Length);
Return 2*EMA1 - EMA2;
End
// 简称: DEMA
// 名称: 双指数移动平均线
// 类别: 公式应用
// 类型: 内建应用
Numeric Length1(5);
Numeric Length2(22);
Numeric Length3(60);
Numeric Length4(250);
Begin
PlotNumeric("DEMA1",DEMA(Close, Length1));
PlotNumeric("DEMA2",DEMA(Close, Length2));
PlotNumeric("DEMA3",DEMA(Close, Length3));
PlotNumeric("DEMA4",DEMA(Close, Length4));
技术人员回复
日期:2020-7-30 8:01