Params
Numeric MA1Length(5); // 5日均线
Numeric MA2Length(10); // 10日均线
Vars
Series<Numeric> MA1; // 5日均线
Series<Numeric> MA2; // 10日均线
Bool IsBullish(false); // 是否多头排列
Bool IsBearish(false); // 是否空头排列
Events
// 初始化
OnReady()
{
SetBackBarMaxCount(500);
}
// 每分钟触发
OnBar(ArrayRef<Integer> indexs)
{
// 计算移动平均线
MA1 = Average(Close, MA1Length); // 5日均线
MA2 = Average(Close, MA2Length); // 10日均线
Commentary(text(StandardDev(close[1],30,1)));
IsBullish = MA1[1] > MA2[1];
IsBearish = MA1[1] < MA2[1];
If(IsBullish)
{
Commentary(text(StandardDev(close[1],30,1)));
}
If(IsBearish)
{
Commentary(text(StandardDev(close[1],30,1)));
}
}
这段代码里两个Commentary为什么数据不一样?

建议开拓者公司给你”乐于助人“奖励😆