将大智慧形态指标改成通达信能用的
2019/12/17 19:08:45
公式编写说明:
input:D(15),Fire(3,1,3);MACD:=last("MACD.MACD">ref("MACD.MACD",1))>=3;A:=ZIG(4,D); B:=REF(A,1);G:=CROSS(A,B); F:=CROSS(B,A);VAR1:=REF(LOW,SUMBARS(G,3)); {左肩起涨低价}VAR2:=REF(HIGH,SUMBARS(F,2)); {左肩最高价}VAR3:=REF(HIGH,SUMBARS(F,1)); {右肩最高价}VAR4:=REF(LOW,SUMBARS(G,2)); {头肩底价}VAR5:=REF(LOW,SUMBARS(G,1)); {右肩回调低价}买点1:=if(var3>1.01*var2 and var5>1.01*var1 and var41.01*var2 and var5>1.01*var1 and var41.01*var2 and var5>1.01*var1 and var4公式源码回答:
D:=15;FIRE:=3;
MACD:=BARSLASTCOUNT("MACD.MACD">REF("MACD.MACD",1))>=3;
A:=ZIG(4,D); B:=REF(A,1);
G:=CROSS(A,B); F:=CROSS(B,A);
VAR1:=REF(LOW,SUMBARS(G,3)); {左肩起涨低价}
VAR2:=REF(HIGH,SUMBARS(F,2)); {左肩最高价}
VAR3:=REF(HIGH,SUMBARS(F,1)); {右肩最高价}
VAR4:=REF(LOW,SUMBARS(G,2)); {头肩底价}
VAR5:=REF(LOW,SUMBARS(G,1)); {右肩回调低价}
买点1:=IF(VAR3>1.01*VAR2 AND VAR5>1.01*VAR1 AND VAR4<VAR1 AND BARSLAST(G)<3 AND MACD,1,0);
买点2:=IF(VAR3>1.01*VAR2 AND VAR5>1.01*VAR1 AND VAR4<VAR1 AND CROSS(CLOSE,VAR2),2,0);
买点3:=IF(VAR3>1.01*VAR2 AND VAR5>1.01*VAR1 AND VAR4<VAR1 AND CROSS(CLOSE,VAR3),3,0);
CHOICE:IF(FIRE=1,买点1,IF(FIRE=2,买点2,买点3));
投股 票网 www.tou18. cn
股市公式下载推荐