通达信【主力进场擒黑马】主副图指标 源码附图
{主力进场擒副源码如下}
N:=30;
M:=13;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100;
RSIF:=90-RSI1,COLOR33DD33;
A4:=((C-LLV(L,33))/(HHV(H,33)-LLV(L,33)))*67;
ABC1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
ABC2:=SMA(ABC1,9,1)+100;
ABC3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
ABC4:=SMA(ABC3,3,1);
ABC5:=SMA(ABC4,3,1)+100;
ABC6:=ABC5-ABC2;
趋势:IF(ABC6>45,ABC6-45,0);
STICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),2,0),COLORMAGENTA;
STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),2,0),COLORGREEN;
强弱分界:=50,COLORFFFFCC;
底部:=0,COLOR00FFFF;
安全:=20,COLORFFFF66,LINETHICK1;
预警:=80,COLORFFFF66,LINETHICK1;
顶部:=100,COLORFFFF33;
V1:=LLV(LOW,10);
V2:=HHV(H,25);
价位线:=EMA((C-V1)/(V2-V1)*4,4);
DRAWTEXT(CROSS(价位线,0.3),20+4,'●买'),COLORRED;
DRAWTEXT(CROSS(3.5,价位线),趋势,'●卖'),COLORWHITE;
ABC2Q:=REF(LOW,1);
ABC3Q:=SMA(ABS(LOW-ABC2Q),3,1)/SMA(MAX(LOW-ABC2Q,0),3,1)*100;
ABC4Q:=EMA(IF(CLOSE*1.3,ABC3Q*10,ABC3Q/10),3);
ABC5Q:=LLV(LOW,30);
ABC6Q:=HHV(ABC4Q,30);
ABC7Q:=IF(MA(CLOSE,58),1,0);
ABC8Q:=EMA(IF(LOW<=ABC5Q,(ABC4Q+ABC6Q*2)/2,0),3)/618*ABC7Q;
ABC9Q:=IF(ABC8Q>100,100,ABC8Q);
ACB3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
ACB4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
ACB5:=SMA(ACB4,13,8);
走势:=CEILING(SMA(ACB5,13,8));
ACB6:=SMA(ACB3,21,8);
卖临界:=STICKLINE(走势-ACB6>85,103,100,15,1),COLORRED,LINETHICK2;
主力线:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2* SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK2,COLORBLUE;
超短线:=(((主力线-LLV(主力线,21))/(HHV(主力线,21)-LLV(主力线,21)))*(4))*(25),LINETHICK2,COLORBLUE;
ABC11:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
ABC21:=SMA(ABS(LOW-ABC11),13,1)/SMA(MAX(LOW-ABC11,0),10,1);
ABC31:=EMA(ABC21,10);
ABC41:=LLV(LOW,33);
ABC51:=EMA(IF(LOW<=ABC41,ABC31,0),3);
主力吸筹:IF(ABC51>REF(ABC51,1),ABC51,0),COLORRED,NODRAW;
STICKLINE(ABC51>REF(ABC51,1),0,ABC51,3,0 ),COLOR000055;
STICKLINE(ABC51>REF(ABC51,1),0,ABC51,2.6,0 ),COLOR000077;
STICKLINE(ABC51>REF(ABC51,1),0,ABC51,2.1,0 ),COLOR000099;
STICKLINE(ABC51>REF(ABC51,1),0,ABC51,1.5,0 ),COLOR0000BB;
STICKLINE(ABC51>REF(ABC51,1),0,ABC51,0.9,0 ),COLOR0000DD;
STICKLINE(ABC51>REF(ABC51,1),0,ABC51,0.3,0 ),COLOR0000FF;
ABC12:=3;
ABC28:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) - (2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1));
动态底部:=EMA(IF(L<= LLV(L,30),SMA(ABS(L-REF(L,1)),30,1)/SMA(MAX(L-REF(L,1),0),99,1),0)*5,3);
准备买入:=CROSS(C,(CLOSE,N,1)*1.02);
低点:IF(动态底部 AND 准备买入,50,0),COLORWHITE,LINETHICK3;
RSV11:=(CLOSE-LLV(LOW,19))/(HHV(HIGH,19)-LLV(LOW,19))*100;
K:=SMA(RSV11,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
短线:=EMA(J,6),COLORRED;
浮筹:=MA(短线,28)*1,LINETHICK2,COLORGREEN;
空方:=MA(100*(HHV(HIGH,35)-CLOSE)/(HHV(HIGH,35)-LLV(LOW,35)),3),COLORYELLOW;
DRAWICON(CROSS(短线,浮筹) AND 短线< 36,20+4,9),COLORBLUE, LINETHICK1;
DRAWTEXT(CROSS(浮筹,空方),浮筹,' 追'),COLORWHITE;
{主力进场擒黑码如下}
MA5:MA(CLOSE,5)DOTLINE COLORWHITE;
N:=30;
M:=13;
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100;
RSIF:=90-RSI1,COLOR33DD33;
A4:=((C-LLV(L,33))/(HHV(H,33)-LLV(L,33)))*67;
AAC22:=LLV(LOW,10);
AAC33:=HHV(HIGH,25);
动力线:=EMA((CLOSE-AAC22)/(AAC33-AAC22)*4,4);
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
ABB1:=SMA(RSV,3,1);
ABB2:=SMA(ABB1,3,1);
ABB3:=3*ABB1-2*ABB2;
ABC1:=(LOW+HIGH+CLOSE*2)/4;
ABC2:= MA(ABC1,4);
ABC3:=HHV(ABC2,10);
ABC4:=MA(ABC3,3);
ABC5:=1.25*ABC4-0.25*ABC3;
XKKJ:=IF(ABC5>ABC3,ABC3,ABC5);
ACB1:=LLV(ABC2,10);
ACB2:=MA(ACB1,3);
ACB3:=1.25*ACB2-0.25*ACB1;
DKKJ:=IF(ACB3< ACB1,ACB1,ACB3);
MA13:=MA(C,13);
ZDHM:=CROSS(C,DKKJ) AND CROSS(C,MA13) AND CROSS(C,XKKJ);
ZHM:=CROSS(C,MA13) AND CROSS(C,XKKJ);
DRAWICON((ZDHM OR ZHM),L,13);
STICKLINE((ZDHM OR ZHM),C,O,2,0),COLORMAGENTA;
DRAWTEXT((ZDHM OR ZHM),L,' ★黑马'),COLORYELLOW;
STICKLINE(动力线>0 AND ((ABB3>ABB1 AND ABB3< REF(ABB3,1)) OR ABB3>ABB1),C,O,1,0),COLORGRAY;
STICKLINE(动力线>=0.2 AND 动力线< 0.5 AND ((ABB3>ABB1 AND ABB3< REF(ABB3,1)) OR ABB3>ABB1),C,O,1,0),COLORGRAY;
STICKLINE(动力线>=0.5 AND 动力线< 1.75 AND ((ABB3>ABB1 AND ABB3< REF(ABB3,1)) OR ABB3>ABB1),C,O,1,0),COLORYELLOW;
STICKLINE(动力线>=1.75 AND 动力线< 3.2 AND ((ABB3>ABB1 AND ABB3< REF(ABB3,1)) OR ABB3>ABB1),C,O,1,0),COLORRED;
STICKLINE(动力线>=3.2 AND 动力线< 3.45 AND ((ABB3>ABB1 AND ABB3< REF(ABB3,1)) OR ABB3>ABB1),C,O,1,0),COLORLIRED;
STICKLINE(动力线>=3.45,C,O,1,0) AND ABB3< ABB1,COLORCYAN;
STICKLINE(ABB3< ABB1,C,O,1,0),COLORGREEN;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{主力进场擒副源码如下}N赋值:30
M赋值:13
LC赋值:1日前的收盘价
RSI1赋值:SMA(收盘价-LC和0较大值,13,1)/SMA(收盘价-LC的绝对值,13,1)*100
RSIF赋值:90-RSI1,COLOR33DD33
A4赋值:((C-33日内L最低值)/(33日内H最高值-33日内L最低值))*67
ABC1赋值:(9日内最高价最高值-收盘价)/(9日内最高价最高值-9日内最低价最低值)*100-70
ABC1的9日[1日权重]移动平均
ABC3赋值:(收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100
ABC3的3日[1日权重]移动平均
ABC4的3日[1日权重]移动平均
ABC6赋值:ABC5-ABC2
如果ABC6>45返回ABC6-45否则返回0
STICKLINE(1日前的趋势< 趋势, 趋势,1日前的趋势,2,0),COLORMAGENTA
STICKLINE(1日前的趋势> 趋势, 趋势,1日前的趋势,2,0),COLORGREEN
强弱分界赋值:50,COLORFFFFCC
底部赋值:0,COLOR00FFFF
安全赋值:20,COLORFFFF66,LINETHICK1
预警赋值:80,COLORFFFF66,LINETHICK1
顶部赋值:100,COLORFFFF33
V1赋值:10日内最低价最低值
V2赋值:25日内H最高值
价位线赋值:EMA((C-V1)/(V2-V1)*4,4)
DRAWTEXT(价位线上穿0.3,20+4,'●买'),COLORRED
DRAWTEXT(3.5上穿价位线,趋势,'●卖'),画白色
ABC2Q:=1日前的最低价
ABC3Q:=SMA(最低价-ABC2Q的绝对值,3,1)/SMA(最低价-ABC2Q和0较大值,3,1)*100
如果收盘价*1.3返回ABC3Q*10否则返回ABC3Q/10
ABC5Q:=30日内最低价最低值
ABC6Q:=30日内ABC4Q最高值
ABC7Q赋值:IF(收盘价的58日简单移动平均,1,0)
ABC8Q赋值:EMA(IF(最低价<=ABC5Q,(ABC4Q+ABC6Q*2)/2,0),3)/618*ABC7Q
如果ABC8Q>100返回100否则返回ABC8Q
ACB3赋值:(21日内最高价最高值-收盘价)/(21日内最高价最高值-21日内最低价最低值)*100-10
ACB4赋值:(收盘价-21日内最低价最低值)/(21日内最高价最高值-21日内最低价最低值)*100
ACB4的13日[8日权重]移动平均
ACB5的13日[8日权重]移动平均
ACB3的21日[8日权重]移动平均
当满足条件走势-ACB6>85时,在103和100之间画柱状线
主力线赋值:3*SMA((收盘价-27日内最低价最低值)/(27日内最高价最高值-27日内最低价最低值)*100,5,1)-2* SMA(SMA((收盘价-27日内最低价最低值)/(27日内最高价最高值-27日内最低价最低值)*100,5,1),3,1),LINETHICK2, 画蓝色
超短线赋值:(((主力线-21日内主力线最低值)/(21日内主力线最高值-21日内主力线最低值))*(4))*(25),LINETHICK2, 画蓝色
ABC11:=REF((最低价+OPEN+收盘价+最高价)/4,1)
ABC21:=SMA(最低价-ABC11的绝对值,13,1)/SMA(最低价-ABC11和0较大值,10,1)
ABC31:=ABC21的10日指数移动平均
ABC41:=33日内最低价最低值
如果最低价<=ABC41返回ABC31否则返回0
输出主力吸筹:IF(ABC51>1日前的ABC51,ABC51,0),COLORRED,NODRAW
STICKLINE(ABC51>1日前的ABC51,0,ABC51,3,0 ),COLOR000055
STICKLINE(ABC51>1日前的ABC51,0,ABC51,2.6,0 ),COLOR000077
STICKLINE(ABC51>1日前的ABC51,0,ABC51,2.1,0 ),COLOR000099
STICKLINE(ABC51>1日前的ABC51,0,ABC51,1.5,0 ),COLOR0000BB
STICKLINE(ABC51>1日前的ABC51,0,ABC51,0.9,0 ),COLOR0000DD
STICKLINE(ABC51>1日前的ABC51,0,ABC51,0.3,0 ),COLOR0000FF
ABC12:=3
ABC28:=(3)*(SMA(((收盘价 - 27日内最低价最低值)/(27日内最高价最高值 - 27日内最低价最低值))*(100),5,1)) - (2)*(SMA(SMA(((收盘价 - 27日内最低价最低值)/(27日内最高价最高值 - 27日内最低价最低值))*(100),5,1),3,1))
动态底部赋值:EMA(IF(L<= 30日内L最低值,SMA(L-1日前的L的绝对值,30,1)/SMA(L-1日前的L和0较大值,99,1),0)*5,3)
准备买入赋值:CROSS(C,(收盘价,N,1)*1.02)
如果动态底部 AND 准备买入返回50否则返回0
RSV11:=(收盘价-19日内最低价最低值)/(19日内最高价最高值-19日内最低价最低值)*100
RSV11的3日[1日权重]移动平均
K的3日[1日权重]移动平均
J赋值:3*K-2*D
短线赋值:J的6日指数移动平均,COLORRED
浮筹赋值:短线的28日简单移动平均*1,LINETHICK2,COLORGREEN
空方赋值:MA(100*(35日内最高价最高值-收盘价)/(35日内最高价最高值-35日内最低价最低值),3),画黄色
DRAWICON(短线上穿浮筹 AND 短线< 36,20+4,9), 画蓝色, LINETHICK1
DRAWTEXT(浮筹上穿空方,浮筹,' 追'),画白色
{主力进场擒黑码如下}MA5:收盘价的5日简单移动平均DOTLINE 画白色
N赋值:30
M赋值:13
LC := 1日前的收盘价
RSI1赋值:SMA(收盘价-LC和0较大值,13,1)/SMA(收盘价-LC的绝对值,13,1)*100
RSIF赋值:90-RSI1,COLOR33DD33
A4赋值:((C-33日内L最低值)/(33日内H最高值-33日内L最低值))*67
AAC22赋值:10日内最低价最低值
AAC33赋值:25日内最高价最高值
动力线赋值:EMA((收盘价-AAC22)/(AAC33-AAC22)*4,4)
RSV赋值:(C-9日内L最低值)/(9日内H最高值-9日内L最低值)*100
RSV的3日[1日权重]移动平均
ABB1的3日[1日权重]移动平均
ABB3赋值:3*ABB1-2*ABB2
ABC1赋值:(最低价+最高价+收盘价*2)/4
ABC2赋值: ABC1的4日简单移动平均
ABC3赋值:10日内ABC2最高值
ABC4赋值:ABC3的3日简单移动平均
ABC5赋值:1.25*ABC4-0.25*ABC3
如果ABC5>ABC3返回ABC3否则返回ABC5
ACB1赋值:10日内ABC2最低值
ACB2赋值:ACB1的3日简单移动平均
ACB3赋值:1.25*ACB2-0.25*ACB1
如果ACB3< ACB1返回ACB1否则返回ACB3
MA13:=C的13日简单移动平均
ZDHM赋值:C上穿DKKJ AND C上穿MA13 AND C上穿XKKJ
ZHM赋值:C上穿MA13 AND C上穿XKKJ
DRAWICON((ZDHM OR ZHM),L,13)
STICKLINE((ZDHM OR ZHM),C,O,2,0),COLORMAGENTA
DRAWTEXT((ZDHM OR ZHM),L,' ★黑马'),画黄色
STICKLINE(动力线>0 AND ((ABB3>ABB1 AND ABB3< 1日前的ABB3) OR ABB3>ABB1),C,O,1,0),COLORGRAY
STICKLINE(动力线>=0.2 AND 动力线< 0.5 AND ((ABB3>ABB1 AND ABB3< 1日前的ABB3) OR ABB3>ABB1),C,O,1,0),COLORGRAY
STICKLINE(动力线>=0.5 AND 动力线< 1.75 AND ((ABB3>ABB1 AND ABB3< 1日前的ABB3) OR ABB3>ABB1),C,O,1,0),画黄色
STICKLINE(动力线>=1.75 AND 动力线< 3.2 AND ((ABB3>ABB1 AND ABB3< 1日前的ABB3) OR ABB3>ABB1),C,O,1,0),COLORRED
STICKLINE(动力线>=3.2 AND 动力线< 3.45 AND ((ABB3>ABB1 AND ABB3< 1日前的ABB3) OR ABB3>ABB1),C,O,1,0),COLORLIRED
当满足条件动力线>=3.45时,在C和O之间画柱状线
当满足条件ABB3< ABB1时,在C和O之间画柱状线