n1:=sumbars(macd<0 and ref(macd>0,1),1);
n2:=sumbars(macd>0 and ref(macd<0,1),1);
m1:=ref(sum(macd,n2),n1);
请教关于SUMBARS函数确立的周期区间:
N1和N2周期区间是否为图示标注的区间?
M1为最高一波红柱之和?
对的。N1就是表示上次mancd死叉到现在的周期跨度。同理N2表示上次macd金叉到现在的周期跨度。
m1:=ref(sum(macd,n2),n1); 也是对的。
直接把变量输出在图表上看下 可以最快速度核实出来效果的。
n1:sumbars(macd<0 and ref(macd>0,1),1);
n2:sumbars(macd>0 and ref(macd<0,1),1);
用“:” 定义 变量就行了。