通达信简单修改后的三剑合壁
A1:=MA(MAX(HHV(H,13),C),2);
A2:=MA(MAX(HHV(H,5),A1),2);
A3:=MA(MAX(HHV(H,3),A2),2);
A4:=MA(MIN(LLV(A3,13),A3),2);
A5:=MA(MIN(LLV(L,13),A4),2);
A6:=(A1+A4+A5)/3;
DRAWRECTREL(200,10,800,990,90);
DRAWRECTREL(500,100,501,990,60);
DRAWRECTREL(200,100,800,100,60);
DRAWRECTREL(200,200,800,200,60);
DRAWRECTREL(200,300,800,300,60);
DRAWRECTREL(200,400,800,400,60);
DRAWRECTREL(200,500,800,500,60);
DRAWRECTREL(200,600,800,600,60);
DRAWRECTREL(200,700,800,700,60);
DRAWRECTREL(200,800,800,800,60);
DRAWRECTREL(200,900,800,900,60);
DRAWTEXT_FIX(1,0.53,0.05,1,'个 股 综 评'),COLORYELLOW;
DRAWTEXT_FIX(1,0.35,0.15,1,'买 入 条 件'),COLORYELLOW;
DRAWTEXT_FIX(1,0.65,0.15,1,'卖 出 理 由'),COLORYELLOW;
DRAWTEXT_FIX(1,0.285,0.25,1,'股价上穿短B'),COLORYELLOW;
DRAWTEXT_FIX(1,0.29,0.35,1,'股价上穿中线'),COLORYELLOW;
DRAWTEXT_FIX(1,0.29,0.45,1,'股价上穿长线'),COLORYELLOW;
DRAWTEXT_FIX(1,0.322,0.55,1,'股价收阳且小于3点'),COLORYELLOW;
DRAWTEXT_FIX(1,0.288,0.65,1,'量大于昨同期'),COLORYELLOW;
DRAWTEXT_FIX(1,0.292,0.75,1,'乖离率小于1.2'),COLORYELLOW;
DRAWTEXT_FIX(1,0.26,0.95,1,'买入评分'),COLORYELLOW;
DRAWTEXT_FIX(1,0.58,0.25,1,'股价下穿短A'),COLORGREEN;
DRAWTEXT_FIX(1,0.585,0.35,1,'股价下穿中线'),COLORGREEN;
DRAWTEXT_FIX(1,0.585,0.45,1,'股价下穿长线'),COLORGREEN;
DRAWTEXT_FIX(1,0.61,0.55,1,'股价收阴且小于-2'),COLORGREEN;
DRAWTEXT_FIX(1,0.585,0.65,1,'量小于昨同期'),COLORGREEN;
DRAWTEXT_FIX(1,0.59,0.75,1,'乖离率大于1.2'),COLORGREEN;
DRAWTEXT_FIX(1,0.56,0.95,1,'卖出评分'),COLORGREEN;
DRAWKLINE(H,O,L,C);
中线:EMA(SLOPE(MA(C,2),21)*20+MA(C,2),55),COLORGREEN,LINETHICK3;
长线:MA(中线,20);
AC:=IF(C>中线,C*0.98,L),COLORYELLOW;
短A:MA(AC,5);
A8:=IF(C>中线,A1,中线*1.02);
A9:=IF(C>中线,A2,中线*1.02);
A10:=IF(C>中线,A3,中线*1.02);
A11:=(A8+A9+A10)/3;
A12:=MA(A11,10);
短B:MA(短A,5),COLORYELLOW;
DRAWTEXT(CROSS(C,短B),短B,'★'),COLORRED;
DRAWTEXT(CROSS(C,中线),中线,'★'),COLORRED;
DRAWTEXT(CROSS(C,长线),长线,'★'),COLORRED;
T1:=CROSS(C,短B)AND EXIST(CROSS(中线,C),5);DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.48,0.25,1,T1);
T2:=CROSS(C,中线);DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.48,0.35,1,T2);
T3:=CROSS(C,长线);DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.48,0.45,1,T3);
T4:=C>REF(C,1) AND C/REF(C,1)<1.031;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.48,0.55,1,T4);
T5:=V>REF(V,1)*FROMOPEN/240;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.48,0.65,1,T5);
T6:=C/中线<1.21;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.48,0.75,1,T6);
买入评分:=T1+T2+T3+T4+T5+T6;
STICKLINE(CURRBARSCOUNT=1 AND C>REF(C,1),C,中线,3,1),COLORRED;
STICKLINE(CURRBARSCOUNT=1 AND C>REF(C,1),长线,中线,2,0),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.48,0.95,1,买入评分);
DRAWRECTREL(930,500,970,990,0);
DRAWRECTREL(930,CONST(990-买入评分*100),970,990,95);
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.95,0.95,1,买入评分),COLORRED;
DRAWTEXT_FIX(1,0.98,0.75,1,'买入评分'),COLORYELLOW;
T7:=CROSS(短A,C);DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.78,0.25,1,T7);
T8:=CROSS(中线,C);DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.78,0.35,1,T8);
T9:=CROSS(中线,C);DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.78,0.45,1,T9);
T10:=C/REF(C,1)<0.98;DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.78,0.55,1,T10);
T11:=V<REF(V,1)*FROMOPEN/240;DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.78,0.65,1,T11);
T12:=C/中线>1.2;DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.78,0.75,1,T12);
卖出评分:=T7+T8+T9+T10+T11+T12;DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.78,0.95,1,卖出评分);
量比前1:=V/(REF(V,1)*FROMOPEN/240);
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.35,0.65,1,量比前1);
{BZ-预测明天(主图)-----------------<<预测明天公式>> 通达信修改版}
P1:=5;
P2:=10;
P3:=20;
P4:=30;
P5:=60;
P6:=120;
P7:=240;
P8:=340;
N:=4;
WX:=MA(CLOSE,0);
M1:=MA(CLOSE,P1);
M2:=(MA(CLOSE,P2) * IF((N < 2),WX,1));
M3:=(MA(CLOSE,P3) * IF((N < 3),WX,1));
M4:=(MA(CLOSE,P4) * IF((N < 4),WX,1));
M5:=(MA(CLOSE,P5) * IF((N < 5),WX,1));
M6:=(MA(CLOSE,P6) * IF((N < 6),WX,1));
M7:=(MA(CLOSE,P7) * IF((N < 7),WX,1));
M8:=(MA(CLOSE,P8) * IF((N < 8),WX,1));
C1:=REF(CLOSE,1);
C2:=HHV(C1,2);
C3:=LLV(C1,1);
ET:=HHV(C1,2);
ET1:=REF(ET,1);
XB:=LLV(C1,1);
XB1:=REF(XB,1);
M:=BARSLAST(((CLOSE < XB) AND (C1 >= XB1)));
M11:=REF(M,1);
N9:=BARSLAST(((CLOSE > ET) AND (C1 <= ET1)));
N1:=REF(N9,1);
M21:=(BARSLAST((((M - N9) > 0) AND (M11 <= N1))) + 1);
N2:=(BARSLAST((((N9 - M) > 0) AND (N1 <= M11))) + 1);
ET2:=HHV(ET,M21);
XB2:=LLV(XB,N2);
A:=IF((((M - N9) > 0) AND (M11 <= N1)),1,IF((((N9 - M) > 0) AND (N1 <= M11)),0,2));
H1:=IF(((M - N9) > 0),CLOSE,ET2);
H2:=IF((A = 1),CLOSE,C2);
H3:=IF(((M - N9) < 0),CLOSE,XB2);
H4:=IF((A = 1),CLOSE,XB2);
H5:=IF((((M - N9) > 0) OR (A = 1)),CLOSE,H3);
H6:=REF(H5,1);
H7:=REF(H5,2);
H8:=(H5 > H6);
H9:=(((H4 = REF(H4,1)) AND (REF(H4,1) < REF(H4,2))) AND (H5 > REF(H5,2)));
H10:=(((H2 = REF(H2,1)) AND (H4 = REF(H4,1))) AND (H5 = REF(H5,2)));
W:=((H8 OR H9) OR H10);
T90:=((H5 < H6) AND (H5 < REF(H5,2)));
T100:=((H4 = REF(H4,1)) AND (H5 < REF(H5,2)));
T110:=((H3 > REF(H3,1)) AND (H5 < REF(H5,1)));
T120:=((H5 = REF(H5,1)) AND (H3 = H4));
T130:=((H2 = REF(H2,1)) AND (H2 = H5));
TW:=((((T90 OR T100) OR T110) OR T120) OR T130);
PK:=((AMOUNT * (((OPEN + CLOSE) + HIGH) + LOW)) / 4);
PK1:=IF((VOL > 0),(PK / AMOUNT),((((OPEN + CLOSE) + HIGH) + LOW) / 4));
BBP:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);
STICKLINE((ISLASTBAR AND W),(H5 * 1.025),(H5 * 0.99),0.5,0),COLORFF8800;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,8,0),COLOR102088;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,7,0),COLOR102099;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,6,0),COLOR1020AA;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,5,0),COLOR1020BB;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,4,0),COLOR1020CC;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,3,0),COLOR1020DD;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,2,0),COLOR1020EE;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,1,0),COLOR1020FF;
DRAWTEXT((ISLASTBAR AND (BBP >= 96.5)),(H5 * 1.022),'明见\N 短高\N 龙头\N 除外'),COLORRED;
DRAWTEXT((ISLASTBAR AND (BBP < 1)),((H5 + H4) / 1.96),'明见\N 短低\N 跌停\N 除外'),COLORGREEN;
DRAWTEXT(((ISLASTBAR AND W) AND (BBP < 96.5)),(H5 * 1.022),'明日\N 看涨'),COLORYELLOW;
DRAWTEXT(((ISLASTBAR AND TW) AND (BBP > 1)),((H5 + H4) / 2),'明日\N 看跌'),COLORGREEN;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A1赋值:MA(MAX(13日内H最高值,C),2)
A2赋值:MA(MAX(5日内H最高值,A1),2)
A3赋值:MA(MAX(3日内H最高值,A2),2)
A4赋值:MA(MIN(13日内A3最低值,A3),2)
A5赋值:MA(MIN(13日内L最低值,A4),2)
A6赋值:(A1+A4+A5)/3
DRAWRECTREL(200,10,800,990,90)
DRAWRECTREL(500,100,501,990,60)
DRAWRECTREL(200,100,800,100,60)
DRAWRECTREL(200,200,800,200,60)
DRAWRECTREL(200,300,800,300,60)
DRAWRECTREL(200,400,800,400,60)
DRAWRECTREL(200,500,800,500,60)
DRAWRECTREL(200,600,800,600,60)
DRAWRECTREL(200,700,800,700,60)
DRAWRECTREL(200,800,800,800,60)
DRAWRECTREL(200,900,800,900,60)
当满足条件1时,在横轴0.53纵轴0.05位置书写文字
当满足条件1时,在横轴0.35纵轴0.15位置书写文字
当满足条件1时,在横轴0.65纵轴0.15位置书写文字
当满足条件1时,在横轴0.285纵轴0.25位置书写文字
当满足条件1时,在横轴0.29纵轴0.35位置书写文字
当满足条件1时,在横轴0.29纵轴0.45位置书写文字
当满足条件1时,在横轴0.322纵轴0.55位置书写文字
当满足条件1时,在横轴0.288纵轴0.65位置书写文字
当满足条件1时,在横轴0.292纵轴0.75位置书写文字
当满足条件1时,在横轴0.26纵轴0.95位置书写文字
当满足条件1时,在横轴0.58纵轴0.25位置书写文字
当满足条件1时,在横轴0.585纵轴0.35位置书写文字
当满足条件1时,在横轴0.585纵轴0.45位置书写文字
当满足条件1时,在横轴0.61纵轴0.55位置书写文字
当满足条件1时,在横轴0.585纵轴0.65位置书写文字
当满足条件1时,在横轴0.59纵轴0.75位置书写文字
当满足条件1时,在横轴0.56纵轴0.95位置书写文字
DRAWKLINE(H,O,L,C)
输出中线:EMA(SLOPE(MA(C,2),21)*20+MA(C,2),55),COLORGREEN,LINETHICK3
输出长线:中线的20日简单移动平均
如果C>中线返回C*0.98否则返回L
输出短A:AC的5日简单移动平均
如果C>中线返回A1否则返回中线*1.02
如果C>中线返回A2否则返回中线*1.02
如果C>中线返回A3否则返回中线*1.02
A11:=(A8+A9+A10)/3
A12:=A11的10日简单移动平均
输出短B:短A的5日简单移动平均,COLORYELLOW
DRAWTEXT(C上穿短B,短B,'★'),画红色
DRAWTEXT(C上穿中线,中线,'★'),画红色
DRAWTEXT(C上穿长线,长线,'★'),画红色
T1赋值:C上穿短BAND 最近5日存在中线上穿C
当满足条件CURRBARSCOUNT=1时,在横轴0.48纵轴0.25位置书写数字
T2赋值:C上穿中线
当满足条件CURRBARSCOUNT=1时,在横轴0.48纵轴0.35位置书写数字
T3赋值:C上穿长线
当满足条件CURRBARSCOUNT=1时,在横轴0.48纵轴0.45位置书写数字
T4赋值:C>1日前的C AND C/1日前的C<1.031
当满足条件CURRBARSCOUNT=1时,在横轴0.48纵轴0.55位置书写数字
T5赋值:V>1日前的V*FROMOPEN/240
当满足条件CURRBARSCOUNT=1时,在横轴0.48纵轴0.65位置书写数字
T6赋值:C/中线<1.21
当满足条件CURRBARSCOUNT=1时,在横轴0.48纵轴0.75位置书写数字
买入评分赋值:T1+T2+T3+T4+T5+T6
STICKLINE(CURRBARSCOUNT=1 AND C>1日前的C,C,中线,3,1),画红色
STICKLINE(CURRBARSCOUNT=1 AND C>1日前的C,长线,中线,2,0),COLORYELLOW
当满足条件CURRBARSCOUNT=1时,在横轴0.48纵轴0.95位置书写数字
DRAWRECTREL(930,500,970,990,0)
DRAWRECTREL(930,CONST(990-买入评分*100),970,990,95)
当满足条件CURRBARSCOUNT=1时,在横轴0.95纵轴0.95位置书写数字
当满足条件1时,在横轴0.98纵轴0.75位置书写文字
T7赋值:短A上穿C
当满足条件CURRBARSCOUNT=1时,在横轴0.78纵轴0.25位置书写数字
T8赋值:中线上穿C
当满足条件CURRBARSCOUNT=1时,在横轴0.78纵轴0.35位置书写数字
T9赋值:中线上穿C
当满足条件CURRBARSCOUNT=1时,在横轴0.78纵轴0.45位置书写数字
T10:=C/1日前的C<0.98
当满足条件CURRBARSCOUNT=1时,在横轴0.78纵轴0.55位置书写数字
T11:=V<1日前的V*FROMOPEN/240
当满足条件CURRBARSCOUNT=1时,在横轴0.78纵轴0.65位置书写数字
T12:=C/中线>1.2
当满足条件CURRBARSCOUNT=1时,在横轴0.78纵轴0.75位置书写数字
卖出评分赋值:T7+T8+T9+T10+T11+T12
当满足条件CURRBARSCOUNT=1时,在横轴0.78纵轴0.95位置书写数字
量比前1赋值:V/(1日前的V*FROMOPEN/240)
当满足条件CURRBARSCOUNT=1时,在横轴0.35纵轴0.65位置书写数字
{BZ-预测明天(主图)-----------------<<预测明天公式>> 通达信修改版}
P1赋值:5
P2赋值:10
P3赋值:20
P4赋值:30
P5赋值:60
P6赋值:120
P7赋值:240
P8赋值:340
N赋值:4
WX赋值:收盘价的0日简单移动平均
M1赋值:收盘价的P1日简单移动平均
M2赋值:(收盘价的P2日简单移动平均 * IF((N < 2),WX,1))
M3赋值:(收盘价的P3日简单移动平均 * IF((N < 3),WX,1))
M4赋值:(收盘价的P4日简单移动平均 * IF((N < 4),WX,1))
M5赋值:(收盘价的P5日简单移动平均 * IF((N < 5),WX,1))
M6赋值:(收盘价的P6日简单移动平均 * IF((N < 6),WX,1))
M7赋值:(收盘价的P7日简单移动平均 * IF((N < 7),WX,1))
M8赋值:(收盘价的P8日简单移动平均 * IF((N < 8),WX,1))
C1赋值:1日前的收盘价
C2赋值:2日内C1最高值
C3赋值:1日内C1最低值
ET赋值:2日内C1最高值
ET1赋值:1日前的ET
XB赋值:1日内C1最低值
XB1:=1日前的XB
M赋值:上次((收盘价 < XB距今天数 AND (C1 >= XB1)))
M11:=1日前的M
N9:=上次((收盘价 > ET距今天数 AND (C1 <= ET1)))
N1:=1日前的N9
M21:=(上次(((M - N9距今天数 > 0) AND (M11 <= N1))) + 1)
N2:=(上次(((N9 - M距今天数 > 0) AND (N1 <= M11))) + 1)
ET2赋值:M21日内ET最高值
XB2:=N2日内XB最低值
A赋值:IF((((M - N9) > 0) AND (M11 <= N1)),1,IF((((N9 - M) > 0) AND (N1 <= M11)),0,2))
H1赋值:IF(((M - N9) > 0),收盘价,ET2)
H2赋值:IF((A = 1),收盘价,C2)
H3赋值:IF(((M - N9) < 0),收盘价,XB2)
H4赋值:IF((A = 1),收盘价,XB2)
H5赋值:IF((((M - N9) > 0) OR (A = 1)),收盘价,H3)
H6赋值:1日前的H5
H7赋值:2日前的H5
H8赋值:(H5 > H6)
H9赋值:(((H4 = 1日前的H4) AND (1日前的H4 < 2日前的H4)) AND (H5 > 2日前的H5))
H10:=(((H2 = 1日前的H2) AND (H4 = 1日前的H4)) AND (H5 = 2日前的H5))
W赋值:((H8 OR H9) OR H10)
T90:=((H5 < H6) AND (H5 < 2日前的H5))
T100:=((H4 = 1日前的H4) AND (H5 < 2日前的H5))
T110:=((H3 > 1日前的H3) AND (H5 < 1日前的H5))
T120:=((H5 = 1日前的H5) AND (H3 = H4))
T130:=((H2 = 1日前的H2) AND (H2 = H5))
TW赋值:((((T90 OR T100) OR T110) OR T120) OR T130)
PK赋值:((AMOUNT * (((OPEN + 收盘价) + 最高价) + LOW)) / 4)
PK1:=IF((成交量 > 0),(PK / AMOUNT),((((OPEN + 收盘价) + 最高价) + LOW) / 4))
BBP赋值:(((收盘价 - 9日内LOW最低值) / (9日内最高价最高值 - 9日内LOW最低值)) * 100)
STICKLINE((ISLASTBAR AND W),(H5 * 1.025),(H5 * 0.99),0.5,0),COLORFF8800
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,8,0),COLOR102088
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,7,0),COLOR102099
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,6,0),COLOR1020AA
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,5,0),COLOR1020BB
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,4,0),COLOR1020CC
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,3,0),COLOR1020DD
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,2,0),COLOR1020EE
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,1,0),COLOR1020FF
DRAWTEXT((ISLASTBAR AND (BBP >= 96.5)),(H5 * 1.022),'明见\N 短高\N 龙头\N 除外'),画红色
DRAWTEXT((ISLASTBAR AND (BBP < 1)),((H5 + H4) / 1.96),'明见\N 短低\N 跌停\N 除外'),COLORGREEN
DRAWTEXT(((ISLASTBAR AND W) AND (BBP < 96.5)),(H5 * 1.022),'明日\N 看涨'),COLORYELLOW
DRAWTEXT(((ISLASTBAR AND TW) AND (BBP > 1)),((H5 + H4) / 2),'明日\N 看跌'),COLORGREEN