当前位置:首页 > 通达信 > 正文

【通达信源码分享】趋势操盘主图公式源码 奉献给大家 有缘人得

2022-08-27未知 编 辑:掌上指标


公式源码:
 
操盘主图
 
MA3:MA(CLOSE,3),COLORFFFFFF;
MA5:=MA(CLOSE,5),COLOR00FFFF;
X1:=(C+L+H)/3; 
X2:EMA(X1,6),LINETHICK1; 
X3:EMA(X2,5),LINETHICK1;
STICKLINE(CROSS(X2,X3),OPEN,CLOSE,5,0),COLOR0060FF; 
STICKLINE(CROSS(X2,X3),OPEN,CLOSE,3,0),COLOR0090FF; 
STICKLINE(CROSS(X2,X3),OPEN,CLOSE,2,0),COLOR0099FF; 
STICKLINE(CROSS(X2,X3),OPEN,CLOSE,1,0),COLOR00F0FF; 
{STICKLINE(CROSS(X2,X3),OPEN,CLOSE,0.4,0),COLOR0099FF; 
STICKLINE(CROSS(X2,X3),OPEN,CLOSE,0.3,0),COLOR00FFFF;}
{STICKLINE(CROSS(X3,X2),OPEN,CLOSE,1,0),COLORFF9900;}
CG:=MA(CLOSE,17);
FL:=HHV(CG,2),COLORFF9900;
FS:IF((CG < FL),(CG - (FL - CG)),FL),COLORFF9900,LINETHICK1;
SS:IF(FL>REF(FL,1),(CG - (FL - CG)),FL),COLORFF00FF,LINETHICK2;
分界线:MA(CLOSE,55),COLOR00FFFF,LINETHICK3;
MA55:MA(CLOSE,55),COLOR0033FF,LINETHICK1;
MA120:MA(C,120),COLOR003399;
MA240:MA(C,240),COLORFF0066;
发红包:=IF((TROUGHBARS(3,15,1)=0) AND (HIGH>LOW+0.01),10,(-5));
{DRAWTEXT((TROUGHBARS(3,15,1)=0) AND (HIGH>LOW+0.01) ,LOW*0.988 ,'【】' ),COLOR00FFFF,LINETHICK1;}
{DRAWTEXT((TROUGHBARS(3,15,1)=0) AND (HIGH>LOW+0.01) ,LOW*0.988 ,'  ⊙' ),COLOR0000FF;}
DRAWTEXT((TROUGHBARS(3,15,1)=0) AND (HIGH>LOW+0.01) ,LOW*0.988 ,'⊙←红包' ),COLOR0000FF;
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
A:=REF(C,BARSLAST(HD)); B:=REF(L,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
顶:IF(T1,A,A),COLORYELLOW,POINTDOT,LINETHICK4;
底:IF(T2,B,B),COLORGREEN,POINTDOT,LINETHICK4;
{分型压力}
{Y:=((HIGH + LOW) / 2); 
BLUE:=SMA(Y,13,1); 
RED:=SMA(Y,8,1); 
GREEN:=SMA(Y,5,1); 
B22:=REF(BLUE,8); 
R2:=REF(RED,5); 
G2:=REF(GREEN,3); 
KU1:=IF((HIGH = HHV(HIGH,3)),1,0); 
KD1:=IF((LOW = LLV(LOW,3)),1,0); 
UL:=IF((((REF(KU1,2) = 1) AND (REF(KU1,1) = 0)) AND (KU1 = 0)),REF(HIGH,2),REF(HIGH,(2 + BARSLAST((((REF(KU1,2) = 1) AND (REF(KU1,1) = 0)) AND (KU1 = 0)))))); 
DL:=IF((((REF(KD1,2) = 1) AND (REF(KD1,1) = 0)) AND (KD1 = 0)),REF(LOW,2),REF(LOW,(2 + BARSLAST((((REF(KD1,2) = 1) AND (REF(KD1,1) = 0)) AND (KD1 = 0)))))); 
上碎型:IF((HIGH >= R2),UL,REF(UL,BARSLAST((HIGH > R2)))),LINETHICK0,COLORFF00FF; 
下碎型:IF((LOW <= R2),DL,REF(DL,BARSLAST((LOW <= R2)))),LINETHICK0,COLOR00FFFF;} 
{STICKLINE((BARSLAST(ABS((上碎型 - REF(上碎型,1)))) < BARSLAST(((CLOSE > 上碎型) AND (REF(CLOSE,1) < REF(上碎型,1))))),上碎型,上碎型,5,1),COLORFF9900; 
STICKLINE((BARSLAST(ABS((下碎型 - REF(下碎型,1)))) < BARSLAST(((CLOSE < 下碎型) AND (REF(CLOSE,1) > REF(下碎型,1))))),下碎型,下碎型,5,1),COLORFF00FF;};
大家都爱看
查看更多热点新闻
点击进入掌上指标资源网-下载各类指标