投资者咨询:关于文华9测试版,参数不能为小数,输入0.5 (文华财经)
来源:文华财经 日期:2020-10-4 12:43
公式怎么表述,举例指导下
技术人员回复
日期:2020-10-4 13:20
参考;
Params
Numeric Length(26);
Numeric Offset(26);
Numeric P(2);
Vars
Numeric UpLine; //上轨
Numeric DownLine; //下轨
NumericSeries MidLine; //中间线
NumericSeries TMP2;
Begin
MidLine = Ma(Close, Length);//求Length个周期的收盘价均线,称为布林通道中轨
TMP2 = Std(Close, Offset); //求Offset个周期内的收盘价的标准差
UpLine = MidLine + (P/10) * TMP2;//布林通道上轨
DownLine = MidLine - (P/10) * TMP2; //布林通道下轨
PlotNumeric("UpLine", UpLine);
PlotNumeric("DownLine", DownLine);
PlotNumeric("MidLine", MidLine);
End