通达信疯牛预测模型预测主升浪主副图指标 预测主力跟庄主升浪信号准 源码
{疯牛预测模型主图源码如下}
N:=3;
A1:=REF(HIGH,N)=HHV(HIGH,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);
A2:=REF(LOW,N)=LLV(LOW,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);
E1:=(REF(LLV(LOW,2*N),1)+REF(HHV(HIGH,2*N),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT(D1 AND E1< E2));
H2:=(D1 AND NOT(D2 AND E1>=E2));
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
J1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HD),BARSLAST(LD))+1);
J2:=J1>REF(J1,1);
A3:=H< REF(H,REF(BARSLAST(HD),1)+1);
B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD;
E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);
HH:=E3>REF(E3,1);
A4:=L>REF(L,REF(BARSLAST(LD),1)+1);
B4:=REF(L,REF(BARSLAST(LD),1)+1)< REF(L,REF(BARSLAST(LD),1)+2+REF(BARSLAST(LD),REF(BARSLAST(LD),1)+2));
D4:=A4 AND B4 AND LD;
E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2);
LL:=E4>REF(E4,1);
H3:=HH OR ISLASTBAR OR BARSCOUNT(C)=1;
X3:=REF(BARSLAST(H3),1)+1;
F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3));
G3:=F3>REF(F3,1);
I3:=BACKSET(G3,2);
LZ:=I3>REF(I3,1);
L4:=LZ OR ISLASTBAR OR BARSCOUNT(C)=1;
X4:=REF(BARSLAST(L4),1)+1;
F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4));
G4:=F4>REF(F4,1);
I4:=BACKSET(G4,2);
HZ:=I4>REF(I4,1);
K1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HZ),BARSLAST(LZ))+1);
K2:=K1>REF(K1,1);
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
YY:=BACKSET(XX,REF(BARSLAST(LD),1)+2);
ZZ:=YY>REF(YY,1);
YY2:=BACKSET(XX2,REF(BARSLAST(HD),1)+2);
ZZ2:=YY2>REF(YY2,1);
前一低:=REF(L,BARSLAST(VV));
前二低:=REF(L,BARSLAST(XX));
前一高:=REF(H,BARSLAST(VV2));
前二高:=REF(H,BARSLAST(XX2));
前三低:=REF(L,BARSLAST(ZZ));
前三高:=REF(H,BARSLAST(ZZ2));
DQD1:CONST(BARSLAST(VV)),NODRAW;
DQD2:=CONST(BARSLAST(XX));
DQH1:CONST(BARSLAST(VV2)),NODRAW;
DQH2:=CONST(BARSLAST(XX2));
DQH3:=CONST(BARSLAST(ZZ2));
DQD3:=CONST(BARSLAST(ZZ2));
HQD1:=REF(L,BARSLAST(VV));
HQD2:=REF(L,BARSLAST(XX));
HQH1:=REF(H,BARSLAST(VV2));
HQH2:=REF(H,BARSLAST(XX2));
HQH3:=REF(H,BARSLAST(ZZ2));
HQD3:=REF(L,BARSLAST(ZZ));
XAA1:DRAWLINE(CURRBARSCOUNT=(IF(DQH1>DQD1,CONST(BARSLAST(XX2)+1),CONST(BARSLAST(XX))+1)),(IF(DQH1>DQD1,前二高,前二低)),CURRBARSCOUNT=IF(DQH1>DQD1,CONST(BARSLAST(XX))+1,CONST(BARSLAST(XX2))+1),(IF(DQH1>DQD1,前二低,前二高)),0),COLORRED,LINETHICK1;
XAA2:DRAWLINE(CURRBARSCOUNT=(IF(DQH1>DQD1,CONST(BARSLAST(XX)+1),CONST(BARSLAST(XX2))+1)),(IF(DQH1>DQD1,前二低,前二高)),CURRBARSCOUNT=IF(DQH1>DQD1,CONST(BARSLAST(VV2))+1,CONST(BARSLAST(VV))+1),(IF(DQH1>DQD1,前一高,前一低)),0),COLORRED,LINETHICK1;
XAA3:DRAWLINE(CURRBARSCOUNT=(IF(DQH1>DQD1,CONST(BARSLAST(VV2)+1),CONST(BARSLAST(VV))+1)),(IF(DQH1>DQD1,前一高,前一低)),CURRBARSCOUNT=IF(DQH1>DQD1,CONST(BARSLAST(VV))+1,CONST(BARSLAST(VV2))+1),(IF(DQH1>DQD1,前一低,前一高)),1),DOTLINE,COLORRED;
XAA4:DRAWLINE(CURRBARSCOUNT=(IF(DQH1>DQD1,CONST(BARSLAST(VV2)+1),CONST(BARSLAST(VV))+1)),(IF(DQH1>DQD1,前一高,前一低)),CURRBARSCOUNT=IF(DQH1>DQD1,CONST(BARSLAST(VV))+1,CONST(BARSLAST(VV2))+1),(IF(DQH1>DQD1,前一低,前一高)),0),COLORRED,LINETHICK3;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1,0.02,0.01,0,STRCAT('【最后一笔主形态】','【**下跌**】')),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1,0.02,0.01,0,STRCAT('【最后一笔主形态】','【**上升**】')),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.08,0,STRCAT('【形态识别】:【收盘价未突破箱体】',' ')),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.15,0,STRCAT('【操盘策略】:【短线看跌】',' ')),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.22,0,STRCAT('【适用模型】:','【下跌反弹测卖点】')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C>CONST(HQH1),0.02,0.08,0,STRCAT('【形态识别】:【收盘价破前高点】',' ')),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C>CONST(HQH1),0.02,0.15,0,STRCAT('【操盘策略】:【短线看涨】',' ')),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C>CONST(HQH1),0.02,0.22,0,STRCAT('【预测模型】:','【下跌转涨测卖点】')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C< CONST(HQD1),0.02,0.08,0,STRCAT('【形态识别】:【收盘价破前低点】',' ')),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C< CONST(HQD1),0.02,0.15,0,STRCAT('【操盘策略】:【短线看跌】',' ')),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C< CONST(HQD1),0.02,0.22,0,STRCAT('【预测模型】:','【下跌寻底测买点】')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.08,0,STRCAT('【形态识别】:【收盘价未破高低点】',' ')),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.15,0,STRCAT('【操盘策略】:【短线看跌】',' ')),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.22,0,STRCAT('【预测模型】:','【上升回调测买点】')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C>CONST(HQH1),0.02,0.08,0,STRCAT('【形态识别】:【收盘价突破前高点】',' ')),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C>CONST(HQH1),0.02,0.15,0,STRCAT('【操盘策略】:【短线看涨】',' ')),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C>CONST(HQH1),0.02,0.22,0,STRCAT('【预测模型】:','【突破上涨测卖点】')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C< CONST(HQD1),0.02,0.08,0,STRCAT('【形态识别】:【收盘价破前低点】',' ')),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C< CONST(HQD1),0.02,0.15,0,STRCAT('【操盘策略】:【短线看跌】',' ')),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C< CONST(HQD1),0.02,0.22,0,STRCAT('【预测模型】:','【上升转跌测买点】')),COLORRED;
主力潜伏8:=CONST(HQH1),NODRAW;
DDL8:=CONST(HQD1),NODRAW;
MIMA8:=主力潜伏8/DDL8;
捉妖筹码1:=SQRT(MIMA8);
捉妖筹码2:=SQRT(捉妖筹码1);
捉妖筹码3:=(捉妖筹码1+捉妖筹码2-1);
主力突破1:=IF(DQD1>DQH1,CONST(主力潜伏8/捉妖筹码1),CONST(DDL8*捉妖筹码1));
主力突破2:=IF(DQD1>DQH1,CONST(主力潜伏8/捉妖筹码2),CONST(DDL8*捉妖筹码2));
主力突破3:=IF(DQD1>DQH1,CONST(主力潜伏8/捉妖筹码3),CONST(DDL8*捉妖筹码3));
SZHTW0:DRAWLINE(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(HQH1),CURRBARSCOUNT=ISLASTBAR,CONST(HQH1),1),COLORMAGENTA;
SZHTW4:DRAWLINE(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(HQD1),CURRBARSCOUNT=ISLASTBAR,CONST(HQD1),1),COLORMAGENTA;
SZHTW1:DRAWLINE(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(主力突破1),CURRBARSCOUNT=ISLASTBAR,CONST(主力突破1),1),COLORRED;
SZHTW2:DRAWLINE(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(主力突破2),CURRBARSCOUNT=ISLASTBAR,CONST(主力突破2),1),COLORRED;
SZHTW3:DRAWLINE(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(主力突破3),CURRBARSCOUNT=ISLASTBAR,CONST(主力突破3),1),COLORRED;
STICKLINE(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(HQH1),CONST(HQD1),0,0),COLORRED;
STICKLINE(ISLASTBAR,CONST(HQH1),CONST(HQD1),0,0),COLORRED;
STICKLINE(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD1)+1,CONST(DQH1)+1),IF(DQD1< DQH1,CONST(HQD1),CONST(HQH1)),CONST(HQD1),0,1),COLORRED;
STICKLINE(C>O,C,O,2.5,0),COLORRED;
STICKLINE(C< O,C,O,2.5,0),COLORGRAY;
STICKLINE(C=O,C,O,2.5,0),COLORWHITE;
STICKLINE(C>O,H,L,0,0),COLORRED;
STICKLINE(C< O,H,L,0,0),COLORGRAY;
STICKLINE(C=O,H,L,0,0),COLORWHITE;
起飞筹码01:=STRCAT('压力位:',CON2STR(CONST(HQH1),2));
起飞筹码02:=STRCAT('回调位:',CON2STR(CONST(主力突破1),2));
起飞筹码03:=STRCAT('弱回调:',CON2STR(CONST(主力突破2),2));
起飞筹码04:=STRCAT('强回调:',CON2STR(CONST(主力突破3),2));
起飞筹码05:=STRCAT('支撑位:',CON2STR(CONST(HQD1),2));
DRAWTEXT(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(HQH1),起飞筹码01),COLORRED,DRAWABOVE;
DRAWTEXT(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(主力突破1),起飞筹码02),COLORMAGENTA,DRAWABOVE;
DRAWTEXT(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(主力突破2),起飞筹码03),COLORWHITE,DRAWABOVE;
DRAWTEXT(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(主力突破3),起飞筹码04),COLORGREEN,DRAWABOVE;
DRAWTEXT(CURRBARSCOUNT=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(HQD1),起飞筹码05),COLORRED,DRAWABOVE;
共振筹码1:=STRCAT('买1:',CON2STR(CONST(HQD1),2));
共振筹码2:=STRCAT('买2:',CON2STR(CONST(HQD2),2));
起飞筹码1:=STRCAT('卖1:',CON2STR(CONST(HQH1),2));
起飞筹码2:=STRCAT('卖2:',CON2STR(CONST(HQH2),2));
DRAWTEXT(CURRBARSCOUNT=CONST(DQD1)+1,L*0.99,共振筹码1),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=CONST(DQH1)+1,H*1.01,起飞筹码1),COLORGREEN;
CXGDW01:=CONST(HQD1)*(2*CONST(捉妖筹码1)*CONST(捉妖筹码1)-1),NODRAW;
CXGDW011:=CONST(HQD1)*(2*CONST(捉妖筹码2)*CONST(捉妖筹码2)-1),NODRAW;
CXGDW012:=CONST(HQD1)*(2*CONST(捉妖筹码3)*CONST(捉妖筹码3)-1),NODRAW;
CXGDW03:=IF(CONST(DQD1)>CONST(DQH1),CONST(HQH2),CONST(HQH1))*CONST(HQD1)/CONST(HQD2),NODRAW;
CXGDW04:=IF(CONST(DQD1)>CONST(DQH1),CONST(HQH3),CONST(HQH2))*CONST(HQD1)/CONST(HQD2),NODRAW;
适用条件:IF(ISLASTBAR AND H>CONST(HQH1),1,0),NODRAW;
台阶预测1:=IF(适用条件>0 AND CXGDW01>CONST(HQH1),CXGDW01,DRAWNULL),NODRAW;
台阶预测2:=IF(适用条件>0 AND CXGDW011>CONST(HQH1),CXGDW011,DRAWNULL),NODRAW;
台阶预测3:=IF(适用条件>0 AND CXGDW012>CONST(HQH1),CXGDW012,DRAWNULL),NODRAW;
四边形预测1:=IF(适用条件>0 AND CXGDW03>CONST(HQH1),CXGDW03,DRAWNULL),NODRAW;
四边形预测2:=IF(适用条件>0 AND CXGDW04>CONST(HQH1),CXGDW04,DRAWNULL),NODRAW;
TTT:=IF(适用条件>0,MAX(CXGDW01,MAX(CXGDW011,MAX(CXGDW012,MAX(CXGDW03,CXGDW04)))),DRAWNULL);
STICKLINE(CURRBARSCOUNT=CONST(DQD1)+1,CONST(HQD1),CONST(TTT),0,1),COLORRED;
正常位:DRAWLINE(CURRBARSCOUNT=CONST(DQD1)+1,CONST(台阶预测1),ISLASTBAR,CONST(台阶预测1),0),COLORRED;
弱势位:DRAWLINE(CURRBARSCOUNT=CONST(DQD1)+1,CONST(台阶预测2),ISLASTBAR,CONST(台阶预测2),0),COLORRED;
强势位:DRAWLINE(CURRBARSCOUNT=CONST(DQD1)+1,CONST(台阶预测3),ISLASTBAR,CONST(台阶预测3),0),COLORRED;
小四位:DRAWLINE(CURRBARSCOUNT=CONST(DQD1)+1,CONST(四边形预测1),ISLASTBAR,CONST(四边形预测1),0),COLORRED;
大四位:DRAWLINE(CURRBARSCOUNT=CONST(DQD1)+1,CONST(四边形预测2),ISLASTBAR,CONST(四边形预测2),0),COLORRED;
TJYC02:=STRCAT('目标位:',CON2STR(CONST(正常位),2));
TJYC03:=STRCAT('弱势位:',CON2STR(CONST(弱势位),2));
TJYC01:=STRCAT('强势位:',CON2STR(CONST(强势位),2));
HDYC01:=STRCAT('右低翅:',CON2STR(CONST(小四位),2));
HDYC02:=STRCAT('右高翅:',CON2STR(CONST(大四位),2));
DRAWTEXT(CURRBARSCOUNT=CONST(DQD1)+1 AND 正常位>0,正常位*0.99,TJYC02),COLORRED;
DRAWTEXT(CURRBARSCOUNT=CONST(DQD1)+1 AND 弱势位>0,弱势位*0.99,TJYC03),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=CONST(DQD1)+1 AND 强势位>0,强势位*0.99,TJYC01),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=CONST(DQD1)+1 AND 小四位>0,小四位*0.99,HDYC01),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=CONST(DQD1)+1 AND 大四位>0,大四位*0.99,HDYC02),COLORWHITE;
上升斜线:DRAWLINE(CURRBARSCOUNT=CONST(DQD1)+1,CONST(HQD1),ISLASTBAR,CONST(TTT),0),COLORWHITE,DOTLINE,LINETHICK1;
{疯牛预测模型副图源码如下}
VAR1:=EMA(EMA(CLOSE,8),8);
潜伏:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
STICKLINE(潜伏< 0,潜伏,0,3,0),COLORGREEN;
A10:=CROSS(潜伏,0);
BB:5;
STICKLINE(潜伏>REF(潜伏,1) AND 潜伏>0,潜伏,0,3,0),COLORRED;
机构潜伏:IF(潜伏>REF(潜伏,1) AND 潜伏>0,潜伏,0),COLORRED,NODRAW;
VAR2:=100*WINNER(CLOSE*0.95);
STICKLINE(VAR2>50 AND COST(85)< CLOSE AND 潜伏>0,潜伏,0,3,0),COLORFF00FF;
机构高度潜伏:IF(VAR2>50 AND COST(85)< CLOSE AND 潜伏>0,潜伏,0),COLORFF00FF,NODRAW;
STICKLINE(潜伏< REF(潜伏,1) AND 潜伏>0,潜伏,0,3,0),COLORD9D919,NODRAW;
机构出货:=IF(潜伏< REF(潜伏,1) AND 潜伏>0,潜伏,0),COLORD9D919;
机构撤退:IF(潜伏< 0,潜伏,0),COLORGREEN,NODRAW;
机构试盘:IF(A10,5,0),LINETHICK1,COLOR00FFFF,NODRAW;
STICKLINE(机构试盘>0,0,5,3,0),COLOR00FFFF;
散户活跃:( 机构潜伏=0 AND 机构撤退=0 AND 机构高度潜伏=0),NODRAW;
STICKLINE(散户活跃=1 ,-0.3,0.3,3,0);
未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:WINNER
该公式包含未来函数:COST
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{疯牛预测模型主图源码如下}N赋值:3
A1赋值:N日前的最高价=2*N+1日内最高价最高值
B1赋值:A1的N过滤
C1赋值:BACKSET(B1,N+1)
D1赋值:C1的N过滤
A2赋值:N日前的最低价=2*N+1日内最低价最低值
B2赋值:A2的N过滤
C2赋值:BACKSET(B2,N+1)
D2赋值:C2的N过滤
E1赋值:(REF(2*N日内最低价最低值,1)+REF(2*N日内最高价最高值,1))/2
E2赋值:(最高价+最低价)/2
H1赋值:(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR 收盘价的有效数据周期数=1
L1赋值:(D2 AND NOT(D1 AND E1< E2))
H2赋值:(D1 AND NOT(D2 AND E1>=E2))
X1赋值:REF(上次H1距今天数,1)+1
如果L1返回最低价否则返回10000
G1赋值:F1>1日前的F1
I1赋值:BACKSET(G1,2)
LD赋值:I1>1日前的I1
L2赋值:LD OR ISLASTBAR OR 收盘价的有效数据周期数=1
X2赋值:REF(上次L2距今天数,1)+1
如果H2返回最高价否则返回0
G2赋值:F2>1日前的F2
I2赋值:BACKSET(G2,2)
HD赋值:I2>1日前的I2
J1赋值:BACKSET(ISLASTBAR,MIN(上次HD距今天数,BARSLAST(LD))+1)
J2赋值:J1>1日前的J1
A3赋值:H< REF(H,REF(上次HD距今天数,1)+1)
B3赋值:REF(H,REF(上次HD距今天数,1)+1)>REF(H,REF(上次HD距今天数,1)+2+REF(上次HD距今天数,REF(上次HD距今天数,1)+2))
D3赋值:A3 AND B3 AND HD
E3赋值:BACKSET(D3,REF(上次HD距今天数,1)+2)
HH赋值:E3>1日前的E3
A4赋值:L>REF(L,REF(上次LD距今天数,1)+1)
B4赋值:REF(L,REF(上次LD距今天数,1)+1)< REF(L,REF(上次LD距今天数,1)+2+REF(上次LD距今天数,REF(上次LD距今天数,1)+2))
D4赋值:A4 AND B4 AND LD
E4赋值:BACKSET(D4,REF(上次LD距今天数,1)+2)
LL赋值:E4>1日前的E4
H3赋值:HH OR ISLASTBAR OR C的有效数据周期数=1
X3赋值:REF(上次H3距今天数,1)+1
F3赋值:BACKSET(H3 AND 统计X3日满足LL的天数>0,LLVBARS(IF(LL,L,POW(10,20)),X3))
G3赋值:F3>1日前的F3
I3赋值:BACKSET(G3,2)
LZ赋值:I3>1日前的I3
L4赋值:LZ OR ISLASTBAR OR C的有效数据周期数=1
X4赋值:REF(上次L4距今天数,1)+1
F4赋值:BACKSET(L4 AND 统计X4日满足HH的天数>0,HHVBARS(IF(HH,H,-POW(10,20)),X4))
G4赋值:F4>1日前的F4
I4赋值:BACKSET(G4,2)
HZ赋值:I4>1日前的I4
K1赋值:BACKSET(ISLASTBAR,MIN(上次HZ距今天数,BARSLAST(LZ))+1)
K2赋值:K1>1日前的K1
UU赋值:BACKSET(ISLASTBAR,上次LD距今天数+1)
VV赋值:UU>1日前的UU
WW赋值:BACKSET(VV,REF(上次LD距今天数,1)+2)
XX赋值:WW>1日前的WW
UU2:=BACKSET(ISLASTBAR,上次HD距今天数+1)
VV2:=UU2>1日前的UU2
WW2:=BACKSET(VV2,REF(上次HD距今天数,1)+2)
XX2赋值:WW2>1日前的WW2
YY赋值:BACKSET(XX,REF(上次LD距今天数,1)+2)
ZZ赋值:YY>1日前的YY
YY2:=BACKSET(XX2,REF(上次HD距今天数,1)+2)
ZZ2:=YY2>1日前的YY2
前一低赋值:REF(L,上次VV距今天数)
前二低赋值:REF(L,上次XX距今天数)
前一高赋值:REF(H,上次VV2距今天数)
前二高赋值:REF(H,上次XX2距今天数)
前三低赋值:REF(L,上次ZZ距今天数)
前三高赋值:REF(H,上次ZZ2距今天数)
DQ输出D1:CONST(上次VV距今天数),NODRAW
DQD2赋值:CONST(上次XX距今天数)
DQ输出H1:CONST(上次VV2距今天数),NODRAW
DQH2赋值:CONST(上次XX2距今天数)
DQH3赋值:CONST(上次ZZ2距今天数)
DQD3赋值:CONST(上次ZZ2距今天数)
HQD1赋值:REF(L,上次VV距今天数)
HQD2赋值:REF(L,上次XX距今天数)
HQH1赋值:REF(H,上次VV2距今天数)
HQH2赋值:REF(H,上次XX2距今天数)
HQH3赋值:REF(H,上次ZZ2距今天数)
HQD3赋值:REF(L,上次ZZ距今天数)
XA输出A1:DRAWLINE( 到最后交易的周期=(IF(DQH1>DQD1,CONST(上次XX2距今天数+1),CONST(BARSLAST(XX))+1)),(IF(DQH1>DQD1,前二高,前二低)), 到最后交易的周期=IF(DQH1>DQD1,CONST(BARSLAST(XX))+1,CONST(上次XX2距今天数)+1),(IF(DQH1>DQD1,前二低,前二高)),0),画红色,LINETHICK1
XA输出A2:DRAWLINE( 到最后交易的周期=(IF(DQH1>DQD1,CONST(上次XX距今天数+1),CONST(BARSLAST(XX2))+1)),(IF(DQH1>DQD1,前二低,前二高)), 到最后交易的周期=IF(DQH1>DQD1,CONST(BARSLAST(VV2))+1,CONST(BARSLAST(VV))+1),(IF(DQH1>DQD1,前一高,前一低)),0),画红色,LINETHICK1
XA输出A3:DRAWLINE( 到最后交易的周期=(IF(DQH1>DQD1,CONST(上次VV2距今天数+1),CONST(BARSLAST(VV))+1)),(IF(DQH1>DQD1,前一高,前一低)), 到最后交易的周期=IF(DQH1>DQD1,CONST(BARSLAST(VV))+1,CONST(上次VV2距今天数)+1),(IF(DQH1>DQD1,前一低,前一高)),1),DOTLINE,画红色
XA输出A4:DRAWLINE( 到最后交易的周期=(IF(DQH1>DQD1,CONST(上次VV2距今天数+1),CONST(BARSLAST(VV))+1)),(IF(DQH1>DQD1,前一高,前一低)), 到最后交易的周期=IF(DQH1>DQD1,CONST(BARSLAST(VV))+1,CONST(上次VV2距今天数)+1),(IF(DQH1>DQD1,前一低,前一高)),0),画红色, 线宽为3
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1,0.02,0.01,0,STRCAT('【最后一笔主形态】','【**下跌**】')),画洋红色
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1,0.02,0.01,0,STRCAT('【最后一笔主形态】','【**上升**】')),画洋红色
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.08,0,STRCAT('【形态识别】:【收盘价未突破箱体】',' ')),画绿色
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.15,0,STRCAT('【操盘策略】:【短线看跌】',' ')),COLORYELLOW
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.22,0,STRCAT('【适用模型】:','【下跌反弹测卖点】')),画红色
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C>CONST(HQH1),0.02,0.08,0,STRCAT('【形态识别】:【收盘价破前高点】',' ')),画绿色
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C>CONST(HQH1),0.02,0.15,0,STRCAT('【操盘策略】:【短线看涨】',' ')),COLORYELLOW
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C>CONST(HQH1),0.02,0.22,0,STRCAT('【预测模型】:','【下跌转涨测卖点】')),画红色
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C< CONST(HQD1),0.02,0.08,0,STRCAT('【形态识别】:【收盘价破前低点】',' ')),画绿色
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C< CONST(HQD1),0.02,0.15,0,STRCAT('【操盘策略】:【短线看跌】',' ')),COLORYELLOW
DRAWTEXT_FIX(ISLASTBAR AND DQH1>DQD1 AND C< CONST(HQD1),0.02,0.22,0,STRCAT('【预测模型】:','【下跌寻底测买点】')),画红色
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.08,0,STRCAT('【形态识别】:【收盘价未破高低点】',' ')),画绿色
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.15,0,STRCAT('【操盘策略】:【短线看跌】',' ')),COLORYELLOW
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND BETWEEN(C,CONST(HQH1),CONST(HQD1)),0.02,0.22,0,STRCAT('【预测模型】:','【上升回调测买点】')),画红色
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C>CONST(HQH1),0.02,0.08,0,STRCAT('【形态识别】:【收盘价突破前高点】',' ')),画绿色
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C>CONST(HQH1),0.02,0.15,0,STRCAT('【操盘策略】:【短线看涨】',' ')),COLORYELLOW
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C>CONST(HQH1),0.02,0.22,0,STRCAT('【预测模型】:','【突破上涨测卖点】')),画红色
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C< CONST(HQD1),0.02,0.08,0,STRCAT('【形态识别】:【收盘价破前低点】',' ')),画绿色
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C< CONST(HQD1),0.02,0.15,0,STRCAT('【操盘策略】:【短线看跌】',' ')),COLORYELLOW
DRAWTEXT_FIX(ISLASTBAR AND DQH1< DQD1 AND C< CONST(HQD1),0.02,0.22,0,STRCAT('【预测模型】:','【上升转跌测买点】')),画红色
主力潜伏8赋值:CONST(HQH1),NODRAW
DDL8赋值:CONST(HQD1),NODRAW
MIMA8赋值:主力潜伏8/DDL8
捉妖筹码1赋值:SQRT(MIMA8)
捉妖筹码2赋值:SQRT(捉妖筹码1)
捉妖筹码3赋值:(捉妖筹码1+捉妖筹码2-1)
主力突破1赋值:IF(DQD1>DQH1,CONST(主力潜伏8/捉妖筹码1),CONST(DDL8*捉妖筹码1))
主力突破2赋值:IF(DQD1>DQH1,CONST(主力潜伏8/捉妖筹码2),CONST(DDL8*捉妖筹码2))
主力突破3赋值:IF(DQD1>DQH1,CONST(主力潜伏8/捉妖筹码3),CONST(DDL8*捉妖筹码3))
输出SZHTW0:DRAWLINE( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(HQH1), 到最后交易的周期=ISLASTBAR,CONST(HQH1),1),画洋红色
输出SZHTW4:DRAWLINE( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(HQD1), 到最后交易的周期=ISLASTBAR,CONST(HQD1),1),画洋红色
输出SZHTW1:DRAWLINE( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(主力突破1), 到最后交易的周期=ISLASTBAR,CONST(主力突破1),1),画红色
输出SZHTW2:DRAWLINE( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(主力突破2), 到最后交易的周期=ISLASTBAR,CONST(主力突破2),1),画红色
输出SZHTW3:DRAWLINE( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(主力突破3), 到最后交易的周期=ISLASTBAR,CONST(主力突破3),1),画红色
STICKLINE( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+1,CONST(DQH2)+1),CONST(HQH1),CONST(HQD1),0,0),画红色
STICKLINE(ISLASTBAR,CONST(HQH1),CONST(HQD1),0,0),画红色
STICKLINE( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD1)+1,CONST(DQH1)+1),IF(DQD1< DQH1,CONST(HQD1),CONST(HQH1)),CONST(HQD1),0,1),画红色
当满足条件C>O时,在C和O之间画柱状线
当满足条件C< O时,在C和O之间画柱状线
当满足条件C=O时,在C和O之间画柱状线
当满足条件C>O时,在H和L之间画柱状线
当满足条件C< O时,在H和L之间画柱状线
当满足条件C=O时,在H和L之间画柱状线
起飞筹码01:=STRCAT('压力位:',CON2STR(CONST(HQH1),2))
起飞筹码02:=STRCAT('回调位:',CON2STR(CONST(主力突破1),2))
起飞筹码03:=STRCAT('弱回调:',CON2STR(CONST(主力突破2),2))
起飞筹码04:=STRCAT('强回调:',CON2STR(CONST(主力突破3),2))
起飞筹码05:=STRCAT('支撑位:',CON2STR(CONST(HQD1),2))
DRAWTEXT( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(HQH1),起飞筹码01),画红色,DRAWABOVE
DRAWTEXT( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(主力突破1),起飞筹码02),画洋红色,DRAWABOVE
DRAWTEXT( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(主力突破2),起飞筹码03),画白色,DRAWABOVE
DRAWTEXT( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(主力突破3),起飞筹码04),画绿色,DRAWABOVE
DRAWTEXT( 到最后交易的周期=IF(DQD1< DQH1,CONST(DQD2)+5,CONST(DQH2)+5),CONST(HQD1),起飞筹码05),画红色,DRAWABOVE
共振筹码1:=STRCAT('买1:',CON2STR(CONST(HQD1),2))
共振筹码2:=STRCAT('买2:',CON2STR(CONST(HQD2),2))
起飞筹码1:=STRCAT('卖1:',CON2STR(CONST(HQH1),2))
起飞筹码2:=STRCAT('卖2:',CON2STR(CONST(HQH2),2))
DRAWTEXT( 到最后交易的周期=CONST(DQD1)+1,L*0.99,共振筹码1),COLORYELLOW
DRAWTEXT( 到最后交易的周期=CONST(DQH1)+1,H*1.01,起飞筹码1),画绿色
CXGDW01赋值:CONST(HQD1)*(2*CONST(捉妖筹码1)*CONST(捉妖筹码1)-1),NODRAW
CXGDW011:=CONST(HQD1)*(2*CONST(捉妖筹码2)*CONST(捉妖筹码2)-1),NODRAW
CXGDW012:=CONST(HQD1)*(2*CONST(捉妖筹码3)*CONST(捉妖筹码3)-1),NODRAW
CXGDW03赋值:IF(CONST(DQD1)>CONST(DQH1),CONST(HQH2),CONST(HQH1))*CONST(HQD1)/CONST(HQD2),NODRAW
CXGDW04赋值:IF(CONST(DQD1)>CONST(DQH1),CONST(HQH3),CONST(HQH2))*CONST(HQD1)/CONST(HQD2),NODRAW
输出适用条件:IF(ISLASTBAR AND H>CONST(HQH1),1,0),NODRAW
台阶预测1赋值:IF(适用条件>0 AND CXGDW01>CONST(HQH1),CXGDW01,DRAWNULL),NODRAW
台阶预测2赋值:IF(适用条件>0 AND CXGDW011>CONST(HQH1),CXGDW011,DRAWNULL),NODRAW
台阶预测3赋值:IF(适用条件>0 AND CXGDW012>CONST(HQH1),CXGDW012,DRAWNULL),NODRAW
四边形预测1赋值:IF(适用条件>0 AND CXGDW03>CONST(HQH1),CXGDW03,DRAWNULL),NODRAW
四边形预测2赋值:IF(适用条件>0 AND CXGDW04>CONST(HQH1),CXGDW04,DRAWNULL),NODRAW
TTT赋值:IF(适用条件>0,MAX(CXGDW01,MAX(CXGDW011,MAX(CXGDW012,MAX(CXGDW03,CXGDW04)))),DRAWNULL)
STICKLINE( 到最后交易的周期=CONST(DQD1)+1,CONST(HQD1),CONST(TTT),0,1),画红色
输出正常位:DRAWLINE( 到最后交易的周期=CONST(DQD1)+1,CONST(台阶预测1),ISLASTBAR,CONST(台阶预测1),0),画红色
输出弱势位:DRAWLINE( 到最后交易的周期=CONST(DQD1)+1,CONST(台阶预测2),ISLASTBAR,CONST(台阶预测2),0),画红色
输出强势位:DRAWLINE( 到最后交易的周期=CONST(DQD1)+1,CONST(台阶预测3),ISLASTBAR,CONST(台阶预测3),0),画红色
输出小四位:DRAWLINE( 到最后交易的周期=CONST(DQD1)+1,CONST(四边形预测1),ISLASTBAR,CONST(四边形预测1),0),画红色
输出大四位:DRAWLINE( 到最后交易的周期=CONST(DQD1)+1,CONST(四边形预测2),ISLASTBAR,CONST(四边形预测2),0),画红色
TJYC02:=STRCAT('目标位:',CON2STR(CONST(正常位),2))
TJYC03:=STRCAT('输出弱势位:',CON2STR(CONST(弱势位),2))
TJYC01:=STRCAT('输出强势位:',CON2STR(CONST(强势位),2))
HDYC01:=STRCAT('右低翅:',CON2STR(CONST(小四位),2))
HDYC02:=STRCAT('右高翅:',CON2STR(CONST(大四位),2))
DRAWTEXT( 到最后交易的周期=CONST(DQD1)+1 AND 正常位>0,正常位*0.99,TJYC02),画红色
DRAWTEXT( 到最后交易的周期=CONST(DQD1)+1 AND 弱势位>0,弱势位*0.99,TJYC03),画绿色
DRAWTEXT( 到最后交易的周期=CONST(DQD1)+1 AND 强势位>0,强势位*0.99,TJYC01),COLORYELLOW
DRAWTEXT( 到最后交易的周期=CONST(DQD1)+1 AND 小四位>0,小四位*0.99,HDYC01),画洋红色
DRAWTEXT( 到最后交易的周期=CONST(DQD1)+1 AND 大四位>0,大四位*0.99,HDYC02),画白色
输出上升斜线:DRAWLINE( 到最后交易的周期=CONST(DQD1)+1,CONST(HQD1),ISLASTBAR,CONST(TTT),0),画白色,DOTLINE,LINETHICK1
{疯牛预测模型副图源码如下}VAR1赋值:收盘价的8日指数移动平均,8)
潜伏赋值:(VAR1-1日前的VAR1)/1日前的VAR1*1000
当满足条件潜伏< 0时,在潜伏和0之间画柱状线
A10:=潜伏上穿0
输出BB:5
STICKLINE(潜伏>1日前的潜伏 AND 潜伏>0,潜伏,0,3,0),画红色
机构输出潜伏:IF(潜伏>1日前的潜伏 AND 潜伏>0,潜伏,0),画红色,NODRAW
VAR2赋值:100*收盘价*0.95计算的获利盘比例
STICKLINE(VAR2>50 AND 获利盘为85%的成本分布< 收盘价 AND 潜伏>0,潜伏,0,3,0),COLORFF00FF
机构高度输出潜伏:IF(VAR2>50 AND 获利盘为85%的成本分布< 收盘价 AND 潜伏>0,潜伏,0),COLORFF00FF,NODRAW
STICKLINE(潜伏< 1日前的潜伏 AND 潜伏>0,潜伏,0,3,0),COLORD9D919,NODRAW
机构出货赋值:IF(潜伏< 1日前的潜伏 AND 潜伏>0,潜伏,0),COLORD9D919
如果潜伏< 0返回潜伏否则返回0
如果A10返回5否则返回0
当满足条件机构试盘>0时,在0和5之间画柱状线
输出散户活跃:( 机构潜伏=0 AND 机构撤退=0 AND 机构高度潜伏=0),NODRAW
当满足条件散户活跃=1 时,在-0.3和0.3之间画柱状线