等级: 标准版
- 注册:
- 2022-6-27
- 曾用名:
|
我在5分钟周期引用了
1小时的EMA(c,50);
15分钟的EMA(c,140);
数据正常
引用
4小时的EMA(c,50);
1小时的EMA(c,140):
得到的结果数据偏差比较大
试过用自定义数据,后面这两个数据偏差还是比较大
代码如下:
公式一名称 Multi_Period_Align
Minute_Align:Time,NODRAW;
公式二名称 All_Period
CCC:=ROUNDS(C,0);
OOO:=ROUNDS(O,0);
HHH:=ROUNDS(H,0);
LLL:=ROUNDS(L,0);
P:=10;
E5:EMA(CCC,5),COLORWHITE;
E10:EMA(CCC,10),COLORYELLOW;
E50:EMA(CCC,50),COLORRED;
E140:EMA(CCC,140),COLORGREEN;
公式三
// 多周期时间对齐
M15:="Multi_Period_Align.Minute_Align # MIN15",NODRAW;
Align_M15:=Time=M15,NODRAW;
M60:="Multi_Period_Align.Minute_Align # MIN60",NODRAW;
Align_M60:=Time=M60,NODRAW;
M240:="Multi_Period_Align.Minute_Align # MultiHour",NODRAW;
Align_M240:=Time=M240,NODRAW;
E50_M15: if(Align_M15=1,"All_Period.E50 # MIN15","All_Period.E50 ## MIN15"),COLORYELLOW,NODRAW;
E50_H1: if(Align_M60=1,"All_Period.E50 # MIN60","All_Period.E50 ## MIN60"),COLORYELLOW,NODRAW;
E50_H4: if(Align_M240=1,"All_Period.E50 # MultiHour","All_Period.E50 ## MultiHour"),COLORYELLOW,NODRAW;
E140_M15: if(Align_M15=1,"All_Period.E140 # MIN15","All_Period.E140 ## MIN15"),COLORYELLOW,NODRAW;
E140_H1: if(Align_M60=1,"All_Period.E140 # MIN60","All_Period.E140 ## MIN60"),COLORYELLOW,NODRAW;
E140_H4: if(Align_M240=1,"All_Period.E140 # MultiHour","All_Period.E140 ## MultiHour"),COLORYELLOW,NODRAW;
三个公式均为逐K模式并勾选了仅刷新到最后K线
请老师帮看看,是什么问题,谢谢!
补充内容 (2024-9-18 12:02):
均线设置的保留小数点后3位 |
|