通达信主图组合指标 集合了九转 顶底支撑画线 趋势评分 源码附图
{LX高量柱组合主图}
DRAWGBK(C>0,RGB(0,0,110),RGB(0,25,0),0,' ',0);
总涨幅:(H-LLV(L,180))/LLV(L,180)*100,NODRAW,COLORMAGENTA;
日时转换:=IF(PERIOD=5,120,240);
VAR30:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;
{牛熊线:EMA(VAR30,日时转换),LINETHICK1,COLORYELLOW;}
{止盈止损}
CC111:=IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLOR888888,NODRAW;
止赢:1.05*CC111,COLORMAGENTA,LINETHICK1;
{DRAWTEXT(ISLASTBAR,止赢,'止赢'),LINETHICK1;}
止损:0.97*CC111,COLORYELLOW,LINETHICK1;
{DRAWTEXT(ISLASTBAR,止损,'止损'),LINETHICK1;}
{DRAWNUMBER(ISLASTBAR ,C,C),COLORWHITE;}
DRAWBAND(止赢,RGB(65,105,225),止损,RGB(00,00,00));
{金牛}
DRAWTEXT_FIX(1,0.88,5,0,''),COLORRED;
HZZ:=1220601;
HZ:=IF(DATE<HZZ,1,DRAWNULL);
Z1:=STRCAT(HYBLOCK,' ')*HZ;
Z2:=STRCAT(Z1,DYBLOCK)*HZ;
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED;
金牛:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25)*HZ,DOTLINE,COLORYELLOW;
金钻趋势:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK1,COLORRED,DOTLINE;
金牛2:=EMA(金钻趋势,25)COLORCYAN,LINETHICK2;
DRAWKLINE(H,O,L,C);
STICKLINE(金钻趋势>LOW AND 金钻趋势<HIGH,金钻趋势,MIN(MIN(OPEN,CLOSE),金钻趋势),2,0),COLORYELLOW;
STICKLINE(金钻趋势>MIN(C,O) AND 金钻趋势<MAX(C,O),金钻趋势,MIN(OPEN,CLOSE),2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(金钻趋势>HIGH,HIGH,LOW,0,0),COLORYELLOW;
VAR23:=100*XMA(XMA((C-REF(C,1)),6),6)/XMA(XMA(ABS((C-REF(C,1))),6),6);
回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) AND CROSS(VAR23,MA(VAR23,2));
XG:=金钻趋势>HIGH AND 回调买 AND L<=金钻趋势;
DRAWBAND(金钻趋势,RGB(55,0,0),金牛2,RGB(0,91,0));
DRAWTEXT(XG,L,'买'),COLORRED;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
V5:=SMA(V2*120/FROMOPEN*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=CURRBARSCOUNT=1 AND C<REF(C,1);
DY2:=REF(V2,1)-DY;
XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<金牛;
DRAWTEXT(XG2 AND L<金钻趋势,L,'金钻起涨'),COLORMAGENTA;
N10:=3;
N20:=6;
N3:=12;
N4:=24;
BBI:(MA(CLOSE,N10)+MA(CLOSE,N20)+MA(CLOSE,N3)+MA(CLOSE,N4))/4,COLORRED,LINETHICK2; BB:=BBI<REF(BBI,1);
IF(BB,BBI,DRAWNULL)COLORGREEN,LINETHICK2;
{顶底}
DRAWTEXT(CROSS(ZIG(3,8),REF(ZIG(3,8),1)),LOW*0.978,'底'),LINETHICK2,COLORYELLOW;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.02,'顶'),LINETHICK2,COLORYELLOW;
DRAWKLINE(H,O,L,C);
TJ:=VOL>=REF(V,1)*2.8 AND C>REF(C,1)*1.01;
{DRAWTEXT(TJ,LOW*0.986,'↖高量柱'),COLORYELLOW;}
STICKLINE(TJ,OPEN,CLOSE,1.5,0),COLORYELLOW;
K1:=SUMBARS(TJ,1);
STICKLINE(K1,REF(C,K1-1),REF(C,K1-1),1,0),COLORYELLOW;
STICKLINE(K1,REF(O,K1-1),REF(O,K1-1),1,0),COLORYELLOW;
TJ1:=VOL>=REF(V,1)*3;
{DRAWTEXT(TJ1,LOW*0.986,'↖高量柱'),COLORYELLOW;}
STICKLINE(TJ1,OPEN,CLOSE,1.5,0),COLORYELLOW;
K2:=SUMBARS(TJ1,1);
STICKLINE(K2,REF(C,K2-1),REF(C,K2-1),1,0),COLORYELLOW;
STICKLINE(K1,REF(O,K2-1),REF(O,K2-1),1,0),COLORYELLOW;
{趋势评分}
X01:=IF(MA(C,5)>MA(C,10),20,0);
X02:=IF(MA(C,20)>MA(C,60),10,0);
X3:=IF(KDJ.J>KDJ.K,10,0);
X4:=IF(MACD.DIF>MACD.DEA,10,0);
X5:=IF(MACD.MACD>0,10,0);
X6:=IF(V>MA(V,60),10,0);
X7:=IF(WINNER(C)>0.5,10,0);
X8:=IF(C/REF(C,1)>1.03,10,0);
XX:=X01+X02+X3+X4+X5+X6+X7+X8;
DRAWTEXT_FIX(V>O,0.55,0.05,0,STRCAT('趋势评分: ',STRCAT(CON2STR(XX,0),' '))),COLORYELLOW;
{上涨下跌数}
上涨:"999999$ADVANCE"+"399001$ADVANCE",COLORRED,NODRAW;
下跌:"999999$DECLINE"+"399001$DECLINE",COLORLIGREEN,NODRAW;
{涨跌:上涨/(上涨+下跌)*100,NODRAW;}
DRAWTEXT_FIX(1,0.2,0.05,0,STRCAT('上涨:',STRCAT(CON2STR(上涨,0),' '))),COLORRED;
DRAWTEXT_FIX(1,0.35,0.05,0,STRCAT('下跌:',STRCAT(CON2STR(下跌,0),' '))),COLORGREEN;
E:=(HIGH+LOW+OPEN+2*CLOSE)/5;
明日阻力:=2*E-LOW;
明日支撑:=2*E-HIGH;
明日突破:=E+(HIGH-LOW);
明日反转:=E-(HIGH-LOW);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
DRAWTEXT_FIX(C!=0,0.92,0.05,0,STRCAT('今日阻力:',STRCAT(CON2STR(今日阻力,2),' 元'))),COLORFFFF00;
DRAWTEXT_FIX(C!=0,0.92,0.1,0,STRCAT('今日支撑:',STRCAT(CON2STR(今日支撑,2),' 元'))),COLORRED;
DRAWTEXT_FIX(C!=0,0.92,0.15,0,STRCAT('明日突破:',STRCAT(CON2STR(明日突破,2),' 元'))),COLORFF00FF;
DRAWTEXT_FIX(C!=0,0.92,0.2,0,STRCAT('明日阻力:',STRCAT(CON2STR(明日阻力,2),' 元'))),COLORFFFF00;
DRAWTEXT_FIX(C!=0,0.92,0.25,0,STRCAT('明日支撑:',STRCAT(CON2STR(明日支撑,2),' 元'))),COLORRED;
DRAWTEXT_FIX(C!=0,0.92,0.3,0,STRCAT('明日反转:',STRCAT(CON2STR(明日反转,2),' 元'))),COLORYELLOW;
{分析分析}
HAN:=DATE<1301230;
TT:=240/FROMOPEN;
比:=TT;
促进指数MFL:=(HIGH-LOW)*1000000/(VOL*比),COLORRED;
AY2:=EMA(CLOSE,12)-EMA(CLOSE,26);
AZ2:=EMA(AY2,9);
LT2:=(AY2-AZ2);
L211:=IF(LT2,LLV(L,21),DRAWNULL),COLOR217158,CIRCLEDOT;
ZGD:=HHV(H,80)*0.99;
ZGD2:=CONST(ZGD);
ZDD:=LLV(L211,80);
ZDD2:=CONST(ZDD);
YYA4:=MA(CLOSE,20);
YYA5:=(CLOSE > MA(CLOSE,5));
YYA6:=(MA(CLOSE,5) > MA(CLOSE,10));
YYA7:=(CLOSE > MA(CLOSE,10));
YYA8:=(MA(CLOSE,5) > MA(CLOSE,20));
YYA9:=(CLOSE > MA(CLOSE,20));
YYA10:=REF(YYA4,1);
YYA11:=(YYA4 > YYA10);
YYAVX:=(((((IF(YYA5,10,(0 - 10)) + IF(YYA6,10,(0 - 10))) + IF(YYA7,10,(0 - 10))) + IF(YYA8,10,(0 - 10))) + IF(YYA9,10,(0 -
10))) + IF(YYA11,10,(0 - 10)));
DSLX:=(CLOSE / INDEXC);
DSLX1:=MA(DSLX,5);
YYV1:=MA(VOL,5);
YYV2:=MA(VOL,10);
情况1:=CONST(IF(((CROSS(YYAVX,1) AND (YYV1 >= YYV2)) AND (DSLX >= DSLX1)),1,0));
情况2:=CONST(IF(((CROSS(YYAVX,1) AND (YYV1 < YYV2)) AND (DSLX >= DSLX1)),1,0));
情况3:=CONST(IF(((CROSS(YYAVX,1) AND (YYV1 > YYV2)) AND (DSLX < DSLX1)),1,0));
情况4:=CONST(IF(((CROSS(YYAVX,1) AND (YYV1 <= YYV2)) AND (DSLX < DSLX1)),1,0));
情况9:=CONST(IF(((((YYAVX >= 1) AND (REF(YYAVX,1) > 0)) AND (YYV1 >= YYV2)) AND (DSLX >= DSLX1)),1,0));
情况10:=CONST(IF(((((YYAVX >= 1) AND (REF(YYAVX,1) > 0)) AND (YYV1 < YYV2)) AND (DSLX >= DSLX1)),1,0));
大盘3:=CONST(IF((CROSS(1,YYAVX) AND (YYV1 >= YYV2)),1,0));
大盘5:=CONST(IF((((YYAVX >= 1) AND (REF(YYAVX,1) > 0)) AND (YYV1 >= YYV2)),1,0));
DRAWTEXT(情况1=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'量能理想,明显走强,仓位在2/3左右'),COLOR00FFFF;
DRAWTEXT(情况2=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'走势趋强,量能不足,短线进场,仓位在1/2左右'),COLOR00FFFF;
DRAWTEXT(情况3=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'量价良好,并没有明显走强,短线进场,仓位1/2左右。 '),COLOR00FFFF;
DRAWTEXT(情况4=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'形态尚可,量能不足,未完全走强,短线参与,仓位1/3左右'),COLOR00FFFF;
DRAWTEXT(情况9=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'该股形态良好,强势明显,量能充足,可以继续持有。 '),COLOR00FFFF;
DRAWTEXT(情况10=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险 '),COLOR00FFFF;
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'进'),LINETHICK1,COLOR0066FF;
VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;
指标王:=CROSS(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1),SMA(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1),3,1)) AND SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1)<20;
DRAWTEXT(指标王,L,'建'),COLORYELLOW;
DRAWTEXT(VAR1,L*0.98,'买'),COLORYELLOW;
DRAWTEXT(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*0.98,'加'),COLORMAGENTA;
DRAWTEXT(CROSS(ZIG(3,8),REF(ZIG(3,8),1)),LOW*0.978,'底'),LINETHICK2,COLORYELLOW;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.02,'顶'),LINETHICK2,COLORYELLOW;
AH:=HHV(H,60);
AL:=LLV(L,60);
A0:=(AH-AL)/21;
{九转}A1:=C>REF(C,4);NT:=BARSLASTCOUNT(A1);TJ11:=NT=9;TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;DRAWTEXT(AY>0,H+1.1*A0,VAR2STR(AY,0)),COLORYELLOW;DRAWTEXT(NT=9,H+1.1*A0,'9'),COLORGREEN;DRAWTEXT(NT=13,H+1.1*A0,'13'),COLORGREEN;DRAWTEXT(NT=18,H+1.1*A0,'18'),COLORGREEN;B1:=C<REF(C,4);NT0:=BARSLASTCOUNT(B1);TJ21:=NT0=9 ;TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;DRAWTEXT(AY1>0,L-1*A0,VAR2STR(AY1,0)),COLORLIGREEN;DRAWTEXT(NT0=9,H+1.1*A0,'9'),COLORYELLOW;DRAWTEXT(NT0=13,H+1.1*A0,'13'),COLORYELLOW;DRAWTEXT(NT0=18,H+1.1*A0,'18'),COLORYELLOW;ZF:=(C-REF(C,1))/REF(C,1)*100;假阳线:=C>O AND ZF<0 AND O<REF(L,1);STICKLINE(假阳线,O,C,0.5,0),COLORMAGENTA;
{筹码峰}
STICKLINE(ISLASTBAR,HHV(C,5),HHV(C,5),80,1)COLORBBBBBB;
STICKLINE(ISLASTBAR,HHV(C,5)*0.95,HHV(C,5)*0.95,80,1)COLORBBBBBB;
{DRAWTEXT_FIX(1,0.95,0.9,0,'筹码峰 '),COLORBBBBBB;};
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:BACKSET
该公式包含未来函数:WINNER
该公式包含未来函数:CAPITAL
该公式包含未来函数:XMA
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{LX高量柱组合主图} 填充背景(C>0,RGB(0,0,110),RGB(0,25,0),0,' ',0)
输出总涨幅:(H-180日内L最低值)/180日内L最低值*100,NODRAW,COLORMAGENTA
如果PERIOD=5返回120否则返回240
VAR30赋值:(CLOSE的30日指数移动平均+CLOSE的72日指数移动平均)/2
输出{牛熊线:VAR30的日时转换日指数移动平均,LINETHICK1,COLORYEL最低价
}{止盈止损}CC111赋值:IF(CURRBARSCOUNT<18,CONST(1日前的C),DRAWNULL),COLOR888888,NODRAW
输出止赢:1.05*CC111,COLORMAGENTA,LINETHICK1
当满足条件ISLASTBAR时,在止赢和'止赢'位置书写文字
输出}止损:0.97*CC111,COLORYEL最低价,LINETHICK1
当满足条件ISLASTBAR时,在止损和'止损'位置书写文字
}{DRAWNUMBER(ISLASTBAR ,C,C),COLORWHITE
}DRAWBAND(止赢,RGB(65,105,225),止损,RGB(00,00,00))
当满足条件1时,在横轴0.88纵轴5位置书写文字
HZZ赋值:1220601
如果DATEZ1赋值:STRCAT(HYBLOCK,' ')*HZ
Z2赋值:STRCAT(Z1,DYBLOCK)*HZ
Z3赋值:STRCAT(Z2,' ')
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED
金牛赋值:(XXH的25日简单移动平均,25)-XXL的25日简单移动平均,25))*1+XXH的25日简单移动平均,25)*HZ,DOTLINE,COLORYEL最低价
输出金钻趋势:XXL的25日简单移动平均,25)-(XXH的25日简单移动平均,25)-XXL的25日简单移动平均,25))*1,LINETHICK1,COLORRED,DOTLINE
金牛2:=金钻趋势的25日指数移动平均画青色,LINETHICK2
DRAWKLINE(H,O,L,C)
STICKLINE(金钻趋势>最低价 AND 金钻趋势<最高价,金钻趋势,OPEN和CLOSE的较小值,金钻趋势),2,0),COLORYEL最低价
STICKLINE(金钻趋势>C和O的较小值 AND 金钻趋势当满足条件金钻趋势>最高价时,在OPEN和CLOSE之间画柱状线
当满足条件金钻趋势>最高价时,在最高价和最低价之间画柱状线
VAR23赋值:100*XMA(XMA((C-1日前的C),6),6)/XMA(XMA((C-1日前的C的绝对值),6),6)
回调买赋值:2日内VAR23最低值=7日内VAR23最低值 AND 统计2日满足VAR23<0的天数 AND CROSS(VAR23,VAR23的2日简单移动平均)
XG赋值:金钻趋势>最高价 AND 回调买 AND L<=金钻趋势
DRAWBAND(金钻趋势,RGB(55,0,0),金牛2,RGB(0,91,0))
当满足条件XG时,在L和'买'位置书写文字
JJ赋值:(最高价+最低价+CLOSE)/3
如果最高价=最低价返回4否则返回最高价-最低价
QJ1赋值:IF(CAPITAL=0,QJ0*(JJ-CLOSE和OPEN的较小值),QJ0*IF(最高价=最低价,1,(OPEN和CLOSE的较小值-最低价)))
QJ2赋值:IF(CAPITAL=0,QJ0*(OPEN和CLOSE的较小值-最低价),QJ0*IF(最高价=最低价,1,(JJ-CLOSE和OPEN的较小值)))
QJ3赋值:IF(CAPITAL=0,QJ0*(最高价-OPEN和CLOSE较大值),QJ0*IF(最高价=最低价,1,(最高价-OPEN和CLOSE较大值)))
QJ4赋值:IF(CAPITAL=0,QJ0*(CLOSE和OPEN较大值-JJ),QJ0*IF(最高价=最低价,1,(CLOSE和OPEN较大值-JJ)))
如果CAPITAL=0返回10000否则返回10000
V2赋值:SMA(IF(C>=1日前的C,DDX,-DDX/100),2,1)
V2*120/FROMOPEN*5的2日[1日权重]移动平均
V5的5日[1日权重]移动平均
V10的5日[1日权重]移动平均
DY赋值:CURRBARSCOUNT=1 AND C<1日前的C
DY2:=1日前的V2-DY
XG2:=C>O AND DY2<0.02 AND C的5日简单移动平均>C的60日简单移动平均 AND C/1日前的C>=1.02 AND H<金牛
当满足条件XG2 AND L<金钻趋势时,在L和'金钻起涨'位置书写文字
N10赋值:3
N20赋值:6
N3赋值:12
N4赋值:24
输出BBI:(CLOSE的N10日简单移动平均+CLOSE的N20日简单移动平均+CLOSE的N3日简单移动平均+CLOSE的N4日简单移动平均)/4,COLORRED,LINETHICK2
BB赋值:BBI<1日前的BBI
如果BB返回BBI否则返回DRAWNULL
{顶底}DRAWTEXT(CROSS(ZIG(3,8),REF(ZIG(3,8),1)),最低价*0.978,'底'),LINETHICK2,COLORYEL最低价
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),最高价*1.02,'顶'),LINETHICK2,COLORYEL最低价
DRAWKLINE(H,O,L,C)
TJ赋值:成交量>=1日前的V*2.8 AND C>1日前的C*1.01
当满足条件TJ时,在最低价*0.986和'↖高量柱'位置书写文字
当满足条件TJ时,在OPEN和CLOSE之间画柱状线
K1赋值:TJ累加至1的天数
STICKLINE(K1,K1-1日前的C,K1-1日前的C,1,0),COLORYEL最低价
STICKLINE(K1,K1-1日前的O,K1-1日前的O,1,0),COLORYEL最低价
TJ1:=成交量>=1日前的V*3
当满足条件TJ1时,在最低价*0.986和'↖高量柱'位置书写文字
当满足条件TJ1时,在OPEN和CLOSE之间画柱状线
K2赋值:TJ1累加至1的天数
STICKLINE(K2,K2-1日前的C,K2-1日前的C,1,0),COLORYEL最低价
STICKLINE(K1,K2-1日前的O,K2-1日前的O,1,0),COLORYEL最低价
{趋势评分}X01赋值:IF(C的5日简单移动平均>C的10日简单移动平均,20,0)
X02赋值:IF(C的20日简单移动平均>C的60日简单移动平均,10,0)
如果KDJ.J>KDJ.K返回10否则返回0
如果MACD.D>MACD.DEA返回10否则返回0
如果MACD.MACD>0返回10否则返回0
X6赋值:IF(V>V的60日简单移动平均,10,0)
X7赋值:IF(C计算的获利盘比例>0.5,10,0)
X8赋值:IF(C/1日前的C>1.03,10,0)
XX赋值:X01+X02+X3+X4+X5+X6+X7+X8
DRAWTEXT_FIX(V>O,0.55,0.05,0,STRCAT('趋势评分: ',STRCAT(CON2STR(XX,0),' '))),COLORYEL最低价
输出{上涨下跌数}上涨:"999999$ADVANCE"+"399001$ADVANCE",COLORRED,NODRAW
输出下跌:"999999$DECLINE"+"399001$DECLINE",COLORLIGREEN,NODRAW
输出{涨跌:上涨/(上涨+下跌)*100,NODRAW
输出}DRAWTEXT_FIX(1,0.2,0.05,0,STRCAT('上涨:',STRCAT(CON2STR(上涨,0),' '))),COLORRED
DRAWTEXT_FIX(1,0.35,0.05,0,STRCAT('输出下跌:',STRCAT(CON2STR(下跌,0),' '))),COLORGREEN
E赋值:(最高价+最低价+OPEN+2*CLOSE)/5
明日阻力赋值:2*E-最低价
明日支撑赋值:2*E-最高价
明日突破赋值:E+(最高价-最低价)
明日反转赋值:E-(最高价-最低价)
今日阻力赋值: 1日前的明日阻力
今日支撑赋值: 1日前的明日支撑
DRAWTEXT_FIX(C!=0,0.92,0.05,0,STRCAT('今日阻力:',STRCAT(CON2STR(今日阻力,2),' 元'))),COLORFFFF00
DRAWTEXT_FIX(C!=0,0.92,0.1,0,STRCAT('今日支撑:',STRCAT(CON2STR(今日支撑,2),' 元'))),COLORRED
DRAWTEXT_FIX(C!=0,0.92,0.15,0,STRCAT('明日突破:',STRCAT(CON2STR(明日突破,2),' 元'))),COLORFF00FF
DRAWTEXT_FIX(C!=0,0.92,0.2,0,STRCAT('明日阻力:',STRCAT(CON2STR(明日阻力,2),' 元'))),COLORFFFF00
DRAWTEXT_FIX(C!=0,0.92,0.25,0,STRCAT('明日支撑:',STRCAT(CON2STR(明日支撑,2),' 元'))),COLORRED
DRAWTEXT_FIX(C!=0,0.92,0.3,0,STRCAT('明日反转:',STRCAT(CON2STR(明日反转,2),' 元'))),COLORYEL最低价
{分析分析}HAN赋值:DATE<1301230
TT赋值:240/FROMOPEN
比赋值:TT
促进指数MFL赋值:(最高价-最低价)*1000000/(成交量*比),COLORRED
AY2赋值:CLOSE的12日指数移动平均-CLOSE的26日指数移动平均
AZ2赋值:AY2的9日指数移动平均
LT2赋值:(AY2-AZ2)
L211赋值:IF(LT2,21日内L最低值,DRAWNULL),COLOR217158,CIRCLEDOT
ZGD赋值:80日内H最高值*0.99
ZGD2:=CONST(ZGD)
ZDD赋值:80日内L211最低值
ZDD2:=CONST(ZDD)
YYA4赋值:CLOSE的20日简单移动平均
YYA5赋值:(CLOSE > CLOSE的5日简单移动平均)
YYA6赋值:(CLOSE的5日简单移动平均 > CLOSE的10日简单移动平均)
YYA7赋值:(CLOSE > CLOSE的10日简单移动平均)
YYA8赋值:(CLOSE的5日简单移动平均 > CLOSE的20日简单移动平均)
YYA9赋值:(CLOSE > CLOSE的20日简单移动平均)
YYA10赋值:1日前的YYA4
YYA11赋值:(YYA4 > YYA10)
YYAVX赋值:(((((IF(YYA5,10,(0 - 10)) + IF(YYA6,10,(0 - 10))) + IF(YYA7,10,(0 - 10))) + IF(YYA8,10,(0 - 10))) + IF(YYA9,10,(0 -10))) + IF(YYA11,10,(0 - 10)))
DSLX赋值:(CLOSE / INDEXC)
DSLX1:=DSLX的5日简单移动平均
YYV1赋值:成交量的5日简单移动平均
YYV2赋值:成交量的10日简单移动平均
情况1赋值:CONST(IF(((YYAVX上穿1 AND (YYV1 >= YYV2)) AND (DSLX >= DSLX1)),1,0))
情况2赋值:CONST(IF(((YYAVX上穿1 AND (YYV1 < YYV2)) AND (DSLX >= DSLX1)),1,0))
情况3赋值:CONST(IF(((YYAVX上穿1 AND (YYV1 > YYV2)) AND (DSLX < DSLX1)),1,0))
情况4赋值:CONST(IF(((YYAVX上穿1 AND (YYV1 <= YYV2)) AND (DSLX < DSLX1)),1,0))
情况9赋值:CONST(IF(((((YYAVX >= 1) AND (1日前的YYAVX > 0)) AND (YYV1 >= YYV2)) AND (DSLX >= DSLX1)),1,0))
情况10:=CONST(IF(((((YYAVX >= 1) AND (1日前的YYAVX > 0)) AND (YYV1 < YYV2)) AND (DSLX >= DSLX1)),1,0))
大盘3赋值:CONST(IF((1上穿YYAVX AND (YYV1 >= YYV2)),1,0))
大盘5赋值:CONST(IF((((YYAVX >= 1) AND (1日前的YYAVX > 0)) AND (YYV1 >= YYV2)),1,0))
DRAWTEXT(情况1=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'量能理想,明显走强,仓位在2/3左右'),COLOR00FFFF
DRAWTEXT(情况2=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'走势趋强,量能不足,短线进场,仓位在1/2左右'),COLOR00FFFF
DRAWTEXT(情况3=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'量价良好,并没有明显走强,短线进场,仓位1/2左右。 '),COLOR00FFFF
DRAWTEXT(情况4=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'形态尚可,量能不足,未完全走强,短线参与,仓位1/3左右'),COLOR00FFFF
DRAWTEXT(情况9=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'该股形态良好,强势明显,量能充足,可以继续持有。 '),COLOR00FFFF
DRAWTEXT(情况10=1 AND (CLOSE < 200) AND CURRBARSCOUNT=70,1,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险 '),COLOR00FFFF
VAR11赋值:ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3)
DRAWTEXT(VAR11 AND 统计30日满足VAR11的天数=1,最低价*0.95,'进'),LINETHICK1,COLOR0066FF
VAR1赋值:(CLOSE的30日指数移动平均+CLOSE的72日指数移动平均)/2
指标王赋值:CROSS(SMA((CLOSE-8日内最低价最低值)/(8日内最高价最高值-8日内最低价最低值)*100,3,1),SMA(SMA((CLOSE-8日内最低价最低值)/(8日内最高价最高值-8日内最低价最低值)*100,3,1),3,1)) AND SMA((CLOSE-8日内最低价最低值)/(8日内最高价最高值-8日内最低价最低值)*100,3,1)<20
当满足条件指标王时,在L和'建'位置书写文字
当满足条件VAR1时,在L*0.98和'买'位置书写文字
DRAWTEXT(CROSS(C的3日简单移动平均,C的9日简单移动平均) AND C>=1日前的C AND C>O,L*0.98,'加'),COLORMAGENTA
DRAWTEXT(CROSS(ZIG(3,8),REF(ZIG(3,8),1)),最低价*0.978,'底'),LINETHICK2,COLORYEL最低价
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),最高价*1.02,'顶'),LINETHICK2,COLORYEL最低价
AH赋值:60日内H最高值
AL赋值:60日内L最低值
A0赋值:(AH-AL)/21
{九转}A1赋值:C>4日前的C
NT赋值:BARSLASTCOUNT(A1)
TJ11:=NT=9
TJ13:=ISLASTBAR AND BETWEEN(NT,5,8)
AY赋值:(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT
DRAWTEXT(AY>0,H+1.1*A0,VAR2STR(AY,0)),COLORYEL最低价
当满足条件NT=9时,在H+1.1*A0和'9'位置书写文字
当满足条件NT=13时,在H+1.1*A0和'13'位置书写文字
当满足条件NT=18时,在H+1.1*A0和'18'位置书写文字
B1赋值:C<4日前的C
NT0:=BARSLASTCOUNT(B1)
TJ21:=NT0=9
TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8)
AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0
DRAWTEXT(AY1>0,L-1*A0,VAR2STR(AY1,0)),COLORLIGREEN
当满足条件NT0=9时,在H+1.1*A0和'9'位置书写文字
当满足条件NT0=13时,在H+1.1*A0和'13'位置书写文字
当满足条件NT0=18时,在H+1.1*A0和'18'位置书写文字
ZF赋值:(C-1日前的C)/1日前的C*100
假阳线赋值:C>O AND ZF<0 AND O<1日前的L
当满足条件假阳线时,在O和C之间画柱状线
{筹码峰}STICKLINE(ISLASTBAR,5日内C最高值,5日内C最高值,80,1)COLORBBBBBB
STICKLINE(ISLASTBAR,5日内C最高值*0.95,5日内C最高值*0.95,80,1)COLORBBBBBB
当满足条件1时,在横轴0.95纵轴0.9位置书写文字
}