大盘趋势(副图 源码)
AR:=SMA((INDEXH+INDEXC*2+INDEXL)/4,5,2);
趋势:=(SMA(MAX(INDEXC-AR,0),5,2))/(SMA(ABS(INDEXC-AR),5,2))*100;
DRAWICON(趋势>50 AND (趋势<65 OR 趋势>65) AND 趋势>REF(趋势,1),60,10);
DRAWICON(趋势>=65 AND (趋势<80 OR 趋势>80) AND 趋势>REF(趋势,1),70,10);
DRAWICON(趋势>=80 AND (趋势<95 OR 趋势>95) AND 趋势>REF(趋势,1),80,10);
DRAWICON(趋势>=95 AND 趋势>REF(趋势,1),90,10);
DRAWICON((趋势<REF(趋势,1) OR 趋势<50) AND 趋势>10,50,11);
DRAWICON((趋势<REF(趋势,1) OR 趋势<50) AND 趋势>10,40,11);
DRAWICON((趋势<REF(趋势,1) OR 趋势<50) AND 趋势<10,30,11);
DRAWICON((趋势<REF(趋势,1) OR 趋势<50) AND 趋势<10,40,11);
DRAWICON((趋势<REF(趋势,1) OR 趋势<50) AND 趋势<10,50,11);
DRAWICON((趋势<REF(趋势,1) OR 趋势<50) AND 趋势<1,20,11);
VAR1:=HHV(INDEXH,7)-LLV(INDEXL,7);
VAR2:=HHV(INDEXH,7)-INDEXC;
VAR3:=INDEXC-LLV(INDEXL,7);
VAR4:=VAR2/VAR1*100-70;
VAR5:=SMA(VAR3/VAR1*100,3,1);
VAR6:=SMA(VAR5,3,1)-SMA(VAR4,3,1);
VAR7:=IF(VAR6>100,VAR6-100,0);
VAR8:=VAR7*2;
VAR9:=SMA(VAR8,6,3);
M1:=IF(CROSS(VAR9,VAR8),1,0);
M2:=COUNT(INDEXC/REF(INDEXC,21)>=1.18,7)>=1;
M3:=COUNT(INDEXC/REF(INDEXC,13)>=1.09,7)>=1;
M4:=COUNT(INDEXC/REF(INDEXC,7)>=1.05,5)>=1;
DRAWICON(M1=1 AND 趋势>50,90,12);
DRAWICON(M1=1 AND 趋势>50 AND M2,90,12);
DRAWICON(M1=1 AND 趋势>50 AND (M2 OR M3 OR M4),80,12);
DRAWICON(M1=1 AND 趋势>50 AND (M2 OR M3),70,12);
DRAWICON(M1=1 AND 趋势>50 AND (M2 OR M3),60,12);
0,color111111;
- 上一篇公式:将军令(开心短线 红线升 双线跌)
- 下一篇公式:主图水平并排叠加MACD、KDJ、RSI