缠论中枢主图,不需dll支持(通达信公式 主图 源码 测试图)
{公式名称: 缠论中枢}{主图叠加}MA5:EMA(CLOSE,5),POINTDOT;MA10:MA(CLOSE,10),POINTDOT,COLORYELLOW,LINETHICK2;黄金线:EMA(CLOSE,18),COLORYELLOW;黄金线1:EMA(CLOSE,15),COLORRED;MA60:MA(CLOSE,60),POINTDOT,COLORRED;MA90:MA(CLOSE,90),POINTDOT,COLORD89837;VAR1:=10;VAR2:=10;VAR3:=2;VAR4:=IF(PERIOD=5,1,IF(PERIOD=6,1,IF(PERIOD=7,1,IF(PERIOD=8,1,IF(PERIOD=9,1,IF(PERIOD=10,1,IF(PERIOD=11,2,IF(PERIOD=4,1,IF(PERIOD=3,1,IF(PERIOD=2,1,IF(PERIOD=1,1,1)))))))))))/10;VAR5:=PEAK(1,VAR4*VAR1,1);VAR6:=PEAK(1,VAR4*VAR1,2);VAR7:=PEAKBARS(1,VAR4*VAR1,1);VAR8:=PEAKBARS(1,VAR4*VAR1,2);VAR9:=TROUGH(2,VAR4*VAR2,1);VAR10:=TROUGH(2,VAR4*VAR2,2);VAR11:=TROUGHBARS(2,VAR4*VAR2,1);VAR12:=TROUGHBARS(2,VAR4*VAR2,2);VAR13:=VAR5>VAR9 AND VAR6>VAR10;VAR14:=MAX(VAR9,VAR10);VAR15:=MIN(VAR5,VAR6);VAR16:=MIN(VAR9,VAR10);VAR17:=MAX(VAR5,VAR6);VAR18:=FILTER(VAR15>VAR14,2);VAR19:=VAR15=REF(VAR15,BARSLAST(VAR18)) OR VAR14=REF(VAR14,BARSLAST(VAR18));VAR20:=VAR13 AND VAR18 AND NOT(VAR19);VAR21:=BETWEEN(VAR14,REF(VAR14,REF(BARSLAST(VAR20),1)),REF(VAR15,REF(BARSLAST(VAR20),1)));VAR22:=BETWEEN(VAR15,REF(VAR14,REF(BARSLAST(VAR20),1)),REF(VAR15,REF(BARSLAST(VAR20),1)));VAR23:=VAR15>REF(VAR15,REF(BARSLAST(VAR20),1)) AND VAR14<REF(VAR14,REF(BARSLAST(VAR20),1));VAR24:=VAR20 AND NOT(VAR21 OR VAR22 OR VAR23);VAR25:=IF(VAR24,VAR14,DRAWNULL);VAR26:=IF(VAR24,VAR15,DRAWNULL);VAR27:=IF(VAR24,VAR17,DRAWNULL);VAR28:=IF(VAR24,VAR16,DRAWNULL);STICKLINE(VAR24,VAR27,VAR28,0,(-1)),COLORMAGENTA;STICKLINE(VAR24,VAR25,VAR26,IF(VAR3=1,3,0),1),COLORMAGENTA;DRAWTEXT(VAR3=2,VAR27,174),COLORRED;中枢高