以下是通达信单双持股主图指标公式源码和使用说明
通达信单双持股主图指标公式源码:
VAR1:=Ema(CLOSE,8);
持股H1:VAR1,CoLorFF00FF;
H2:EMA(VAR1,20),CoLor00FF00;
LH:EMA(CLOSE,240),CoLorFFFFFF;
stICKLINE((VAR1 H2),VAR1,H2,0,0),CoLorFFFF00;
STICKLINE((VAR1 H2),VAR1,H2,0,0),CoLor0000FF;
VAR2:=crOSS(VAR1,H2)AND((VAR1 MA(CLOSE,120))or(VAR1 H2));
VAR3:=CROSS(VAR1,H2)AND(VAR1 EMA(CLOSE,120))AND(COUNT(CLOSE,0) 120);
VAR4:=((HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36)))*(100);
VAR5:=SMA(VAR4,5,1);
VAR6:=SMA(VAR5,8,1);
VAR7:=CROSS(VAR5,VAR6)AND(VAR6
VAR8:=(CLOSE LLV(CLOSE,60)+(0.3)*(LLV(CLOSE,60)))ANDVAR7;
VAR9:=IF((CLOSE 1000),VAR7,VAR8);
DRAWICON(VAR2,LOW-(LOW)*(0.01),1),CoLor008000;
DRAWICON(VAR3,LOW-(LOW)*(0.01),1),CoLorFF0000;
DRAWICON(VAR9,HIGH+(HIGH)*(0.02),2),CoLor000080;
双线持币:HHV(MA(HIGH,(3)),2),LINETHICK2,COLOR00FF00;
单线持股3:LLV(MA(HIGH,(3)),1),LINETHICK3,COLOR0000FF;
单线持股2:=LLV(MA(HIGH,(2)),1),LINETHICK2,COLOR0000FF;
单线持股:=LLV(MA(HIGH,(1)),1),LINETHICK1,COLOR0000FF;
DA:=6;FA:=5;CT:=1;P:=0;N:=3;
NS:=IF((HHV(Abs(((HHV(CLOSE,DA)/LLV(CLOSE,DA))-1)),DA) (10/100)),3,DA);
N1:=IF((MINUTE=5),(NS*48),IF((MINUTE=15),(NS*16),IF((MINUTE=30),(NS*8),IF((MINUTE=60),(NS*4),NS))));
MM:=IF(((P=0)OR(=0)),MA(CLOSE,N1),((SUM(AMOUNT,N1)/SUM(VOL,N1))/100));
M1:=REF(MM,1);
{DRAWTEXT(crOSS(0.9,1/VOL*1000 0.01AND".J" 0),H*1.08,'地量'),COLOR00FFFF;}
:M1,LINETHICK0,COLORRED;
明日:MM,COLORYELLOW,LINETHICK0;
DRAWNUMBER(CROSS(CLOSE,M1),L*0.99,买卖),COLORRED;
DRAWNUMBER(CROSS(M1,CLOSE),H*1.03,买卖),COLORGREEN;
DA1:=3;
NS1:=IF((HHV(ABS(((HHV(CLOSE,DA1)/LLV(CLOSE,DA1))-1)),DA1) (10/100)),1,DA1);
N11:=IF((MINUTE=5),(NS1*48),IF((MINUTE=15),(NS1*16),IF((MINUTE=30),(NS1*8),IF((MINUTE=60),(NS1*4),NS1))));
MM1:=IF(((P=0)OR(VOL=0)),MA(CLOSE,N11),((SUM(AMOUNT,N11)/SUM(VOL,N11))/100));
M11:=REF(MM1,1);
买入:=IF(CROSS(CLOSE,M1),M1,0);
卖出:=IF(CROSS(M1,CLOSE),M1,0);
DRAWTEXT(买入,LOW*0.98,'买入'),COLORRED;
DRAWTEXT(卖出,HIGH*1.02,'卖出'),COLORGREEN;
DW:=BArslAST((卖出
EX10:=HHV((买入 0),(DW+1));
BJ:=IF((EX10 REF(EX10,1)),买入,0);
SJ:=IF((EX10 REF(EX10,1)),卖出,0);
DRAWICON(CROSS(CLOSE,M1),(LOW*0.995),1);
DRAWICON(CROSS(M1,CLOSE),(HIGH*1.005),2);
STICKLINE(BJ 0ANDCT=1,OPEN,(CLOSE+OPEN)/2,3,0),COLOR0044FF;
STICKLINE(BJ 0ANDCT=1,OPEN,(CLOSE+OPEN)/2,2.6,0),COLOR0077FF;
STICKLINE(BJ 0ANDCT=1,OPEN,(CLOSE+OPEN)/2,2.2,0),COLOR1199FF;
STICKLINE(BJ 0ANDCT=1,OPEN,(CLOSE+OPEN)/2,1.8,0),COLOR22BBFF;
STICKLINE(BJ 0ANDCT=1,OPEN,(CLOSE+OPEN)/2,1.4,0),COLOR33ddfF;
STICKLINE(BJ 0ANDCT=1,OPEN,(CLOSE+OPEN)/2,1,0),COLOR33FFFF;
STICKLINE(BJ 0ANDCT=1,CLOSE,(CLOSE+OPEN)/2,3,0),COLOR000055;
STICKLINE(BJ 0ANDCT=1,CLOSE,(CLOSE+OPEN)/2,2.6,0),COLOR000077;
STICKLINE(BJ 0ANDCT=1,CLOSE,(CLOSE+OPEN)/2,2.2,0),COLOR000099;
STICKLINE(BJ 0ANDCT=1,CLOSE,(CLOSE+OPEN)/2,1.8,0),COLOR0000BB;
STICKLINE(BJ 0ANDCT=1,CLOSE,(CLOSE+OPEN)/2,1.4,0),COLOR0000DD;
STICKLINE(BJ 0ANDCT=1,CLOSE,(CLOSE+OPEN)/2,1,0),COLOR0033FF;
STICKLINE(((SJ 0)AND(CT=1)),CLOSE,(CLOSE+OPEN)/2,3.0,0),COLORFF4400;
STICKLINE(((SJ 0)AND(CT=1)),CLOSE,(CLOSE+OPEN)/2,2.6,0),COLORFF7700;
STICKLINE(((SJ 0)AND(CT=1)),CLOSE,(CLOSE+OPEN)/2,2.2,0),COLORFF9911;
STICKLINE(((SJ 0)AND(CT=1)),CLOSE,(CLOSE+OPEN)/2,1.8,0),COLORFFBB22;
STICKLINE(((SJ 0)AND(CT=1)),CLOSE,(CLOSE+OPEN)/2,1.4,0),COLORFFDD33;
STICKLINE(((SJ 0)AND(CT=1)),CLOSE,(CLOSE+OPEN)/2,1,0),COLORFFFF33;
STICKLINE(((SJ 0)AND(CT=1)),OPEN,(CLOSE+OPEN)/2,3.0,0),COLOR550000;
STICKLINE(((SJ 0)AND(CT=1)),OPEN,(CLOSE+OPEN)/2,2.6,0),COLOR770000;
STICKLINE(((SJ 0)AND(CT=1)),OPEN,(CLOSE+OPEN)/2,2.2,0),COLOR990000;
STICKLINE(((SJ 0)AND(CT=1)),OPEN,(CLOSE+OPEN)/2,1.8,0),COLORBB0000;
STICKLINE(((SJ 0)AND(CT=1)),OPEN,(CLOSE+OPEN)/2,1.4,0),COLORDD0000;
STICKLINE(((SJ 0)AND(CT=1)),OPEN,(CLOSE+OPEN)/2,1,0),COLORFF0000;
VAR1:=(HHV(HIGH,13)-LLV(LOW,13));
VAR2:=(HHV(HIGH,13)-CLOSE);
VAR3:=(CLOSE-LLV(LOW,13));
VAR4:=(((VAR2/VAR1)*100)-70);
VAR5:=(((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60)))*100);
VAR6:=((((2*CLOSE)+HIGH)+LOW)/4);
VAR7:=SMA(((VAR3/VAR1)*100),3,1);
VAR8:=LLV(LOW,34);
VAR9:=(SMA(VAR7,3,1)-SMA(VAR4,9,1));
VAR10:=IF((VAR9 100),(VAR9-100),0);
VAR11:=HHV(HIGH,34);
VAR12:=EMA((((VAR6-VAR8)/(VAR11-VAR8))*100),13);
VAR13:=EMA(((0.667*REF(VAR12,1))+(0.333*VAR12)),2);
STICKLINE(((VAR12-VAR13) 0),VAR12,VAR13,12,0),COLOR0000FF;
STICKLINE(((VAR12-VAR13) 0),VAR12,VAR13,8,0),COLOR00FF00;
绿色变红看多:EMA(VAR13,5),COLOR0000FF;
红色变绿减仓:99,,COLOR00FF00;
通达信单双持股主图指标公式截图