单双持股双线持币单线持股通达信公式 主图 源码附图
单线持股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 (VOL=0)),MA(CLOSE,N1),((SUM(AMOUNT,N1)/SUM(VOL,N1))/100));
M1:=REF(MM,1);
{DRAWTEXT(CROSS(0.9,1/VOL*1000>0.01 AND "KDJ.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((卖出>0));
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>0 AND CT=1,OPEN,(CLOSE+OPEN)/2,3,0), COLOR0044FF;
STICKLINE(BJ>0 AND CT=1,OPEN,(CLOSE+OPEN)/2,2.6,0), COLOR0077FF;
STICKLINE(BJ>0 AND CT=1,OPEN,(CLOSE+OPEN)/2,2.2,0), COLOR1199FF;
STICKLINE(BJ>0 AND CT=1,OPEN,(CLOSE+OPEN)/2,1.8,0), COLOR22BBFF;
STICKLINE(BJ>0 AND CT=1,OPEN,(CLOSE+OPEN)/2,1.4,0), COLOR33DDFF;
STICKLINE(BJ>0 AND CT=1,OPEN,(CLOSE+OPEN)/2,1,0), COLOR33FFFF;
STICKLINE(BJ>0 AND CT=1,CLOSE,(CLOSE+OPEN)/2,3,0), COLOR000055;
STICKLINE(BJ>0 AND CT=1,CLOSE,(CLOSE+OPEN)/2,2.6,0), COLOR000077;
STICKLINE(BJ>0 AND CT=1,CLOSE,(CLOSE+OPEN)/2,2.2,0), COLOR000099;
STICKLINE(BJ>0 AND CT=1,CLOSE,(CLOSE+OPEN)/2,1.8,0), COLOR0000BB;
STICKLINE(BJ>0 AND CT=1,CLOSE,(CLOSE+OPEN)/2,1.4,0), COLOR0000DD;
STICKLINE(BJ>0 AND CT=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;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
单线持股2赋值:LLV(MA(最高价,(2)),1),LINETHICK2,COLOR0000FF
单线持股赋值:LLV(MA(最高价,(1)),1),LINETHICK1,COLOR0000FF
DA赋值:6
FA赋值:5
CT赋值:1
P赋值:0
N赋值:3
NS:=IF((HHV(((HHV(收盘价,DA的绝对值/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)),收盘价的N1日简单移动平均,((N1的AMOUNT日累和/N1的成交量日累和)/100))
M1赋值:1日前的MM
{DRAWTEXT(0.9上穿1/成交量*1000>0.01 AND "KDJ.J"<0,H*1.08,'地量'),COLOR00FFFF
输出}
买卖:M1,LINETHICK0,画红色
输出明日:MM,画黄色,LINETHICK0
DRAWNUMBER(收盘价上穿M1 ,L*0.99,买卖),画红色
DRAWNUMBER(M1上穿收盘价 ,H*1.03,买卖),COLORGREEN
DA1:=3
NS1:=IF((HHV(((HHV(收盘价,DA1的绝对值/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 (成交量=0)),收盘价的N11日简单移动平均,((N11的AMOUNT日累和/N11的成交量日累和)/100))
M11:=1日前的MM1
买入赋值:IF(收盘价上穿M1,M1,0)
卖出赋值:IF(M1上穿收盘价,M1,0)
当满足条件买入时,在最低价*0.98和'买入'位置书写文字
当满足条件卖出时,在最高价*1.02和'卖出'位置书写文字
DW赋值:上次(卖出>0距今天数)
EX10赋值:HHV((买入>0),(DW+1))
BJ赋值:IF((EX10>1日前的EX10),买入,0)
SJ赋值:IF((EX10<1日前的EX10),卖出,0)
DRAWICON(收盘价上穿M1,(最低价*0.995),1)
DRAWICON(M1上穿收盘价,(最高价*1.005),2)
STICKLINE(BJ>0 AND CT=1,OPEN,(收盘价+OPEN)/2,3,0), COLOR0044FF
STICKLINE(BJ>0 AND CT=1,OPEN,(收盘价+OPEN)/2,2.6,0), COLOR0077FF
STICKLINE(BJ>0 AND CT=1,OPEN,(收盘价+OPEN)/2,2.2,0), COLOR1199FF
STICKLINE(BJ>0 AND CT=1,OPEN,(收盘价+OPEN)/2,1.8,0), COLOR22BBFF
STICKLINE(BJ>0 AND CT=1,OPEN,(收盘价+OPEN)/2,1.4,0), COLOR33DDFF
STICKLINE(BJ>0 AND CT=1,OPEN,(收盘价+OPEN)/2,1,0), COLOR33FFFF
STICKLINE(BJ>0 AND CT=1,收盘价,(收盘价+OPEN)/2,3,0), COLOR000055
STICKLINE(BJ>0 AND CT=1,收盘价,(收盘价+OPEN)/2,2.6,0), COLOR000077
STICKLINE(BJ>0 AND CT=1,收盘价,(收盘价+OPEN)/2,2.2,0), COLOR000099
STICKLINE(BJ>0 AND CT=1,收盘价,(收盘价+OPEN)/2,1.8,0), COLOR0000BB
STICKLINE(BJ>0 AND CT=1,收盘价,(收盘价+OPEN)/2,1.4,0), COLOR0000DD
STICKLINE(BJ>0 AND CT=1,收盘价,(收盘价+OPEN)/2,1,0), COLOR0033FF
STICKLINE(((SJ>0) AND (CT=1)),收盘价,(收盘价+OPEN)/2,3.0,0),COLORFF4400
STICKLINE(((SJ>0) AND (CT=1)),收盘价,(收盘价+OPEN)/2,2.6,0),COLORFF7700
STICKLINE(((SJ>0) AND (CT=1)),收盘价,(收盘价+OPEN)/2,2.2,0),COLORFF9911
STICKLINE(((SJ>0) AND (CT=1)),收盘价,(收盘价+OPEN)/2,1.8,0),COLORFFBB22
STICKLINE(((SJ>0) AND (CT=1)),收盘价,(收盘价+OPEN)/2,1.4,0),COLORFFDD33
STICKLINE(((SJ>0) AND (CT=1)),收盘价,(收盘价+OPEN)/2,1,0),COLORFFFF33
STICKLINE(((SJ>0) AND (CT=1)),OPEN,(收盘价+OPEN)/2,3.0,0),COLOR550000
STICKLINE(((SJ>0) AND (CT=1)),OPEN,(收盘价+OPEN)/2,2.6,0),COLOR770000
STICKLINE(((SJ>0) AND (CT=1)),OPEN,(收盘价+OPEN)/2,2.2,0),COLOR990000
STICKLINE(((SJ>0) AND (CT=1)),OPEN,(收盘价+OPEN)/2,1.8,0),COLORBB0000
STICKLINE(((SJ>0) AND (CT=1)),OPEN,(收盘价+OPEN)/2,1.4,0),COLORDD0000
STICKLINE(((SJ>0) AND (CT=1)),OPEN,(收盘价+OPEN)/2,1,0),COLORFF0000