以下是通达信红蓝三角选股公式源码红蓝三角选股源码
红蓝三角选股源码
VAR1:=REF(HIGH,3)=HHV(HIGH,2*3+1);
VAR2:=FILTER(VAR1,3);
VAR3:=BACKSET(VAR2,3+1);
VAR4:=FILTER(VAR3,3);
VAR5:=REF(LOW,3)=LLV(LOW,2*3+1);
VAR6:=FILTER(VAR5,3);
VAR7:=BACKSET(VAR6,3+1);
VAR8:=FILTER(VAR7,3);
VAR9:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;
VAR10:=(HIGH+LOW)/2;
VAR11:=VAR4 AND NOT(VAR8 AND VAR9>=VAR10) OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
VAR12:=VAR8 AND NOT(VAR4 AND VAR9<VAR10);
VAR13:=VAR4 AND NOT(VAR8 AND VAR9>=VAR10);
VAR14:=REF(BARSLAST(VAR11),1)+1;
VAR15:=BACKSET(VAR11 AND COUNT(VAR12,VAR14)>0,LLVBARS(IF(VAR12,LOW,10000),VAR14));
VAR16:=VAR15>REF(VAR15,1);
VAR17:=BACKSET(VAR16,2);
VAR18:=VAR17>REF(VAR17,1);
VAR19:=VAR18 OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
VAR20:=REF(BARSLAST(VAR19),1)+1;
VAR21:=BACKSET(VAR19 AND COUNT(VAR13,VAR20)>0,HHVBARS(IF(VAR13,HIGH,0),VAR20));
VAR22:=VAR21>REF(VAR21,1);
VAR23:=BACKSET(VAR22,2);
VAR24:=VAR23>REF(VAR23,1);
VAR25:=BACKSET(BARSTATUS,BARSLAST(VAR18)+1);
VAR26:=VAR25>REF(VAR25,1);
VAR27:=BACKSET(BARSTATUS,BARSLAST(VAR24)+1);
VAR28:=VAR27>REF(VAR27,1);
VAR29:=REF(LOW,BARSLAST(VAR26));
VAR30:=REF(HIGH,BARSLAST(VAR28));
选股:CROSS(CLOSE,VAR30);
评论(0)