通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
成交量:VOL,POINTDOT,COLORYELLOW;
买盘:IF(CLOSE OPEN,VAR1*(HIGH-LOW),IF(CLOSE OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,POINTDOT;
卖盘:IF(CLOSE OPEN,VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,VAR1*(HIGH-LOW),VOL/2)),COLOR00FF00,POINTDOT;
STICKLINE(VOL 0,VOL,0,2,0),COLORYELLOW;
STICKLINE(买盘 0,0,买盘,2,0),COLORRED;
STICKLINE(卖盘 0,0,卖盘,0.8,0),COLOR00FF00;
成交%:买盘/VOL*100,COLORWHITE,NODRAW;
万手:VOL/10000,LINETHICK0;
AA:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
预测:AA/10000;
BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买:=IF(CLOSE OPEN,BB*(HIGH-LOW),IF(CLOSE OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主买:主动买/10000,COLORRED;
主动卖:=IF(CLOSE OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,0-BB*(HIGH-LOW),0-VOL/2));
主卖:-主动卖/10000,COLORGREEN;
差额:(主动买+主动卖)/10000;
STICKLINE(CLOSE=REF(CLOSE,1),0,VOL,3.5,0),COLORWHITE;
STICKLINE(CLOSE REF(CLOSE,1),0,VOL,3.5,0),COLORRED;
STICKLINE(CLOSE REF(CLOSE,1),0,VOL,3.5,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,3.5,0),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,3.2,0),COLOR007777;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,2.7,0),COLOR009999;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,2.1,0),COLOR00BBBB;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,1.5,0),COLOR00DDEE;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,0.9,0),COLOR66FFFF;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,0.2,0),COLORFFFFFF;
STICKLINE(主动买 =0,VOL,-主动卖,3.2,0),COLOR000033;
STICKLINE(主动买 =0,VOL,-主动卖,2.7,0),COLOR000066;
STICKLINE(主动买 =0,VOL,-主动卖,2.1,0),COLOR000099;
STICKLINE(主动买 =0,VOL,-主动卖,1.5,0),COLOR0000CC;
STICKLINE(主动买 =0,VOL,-主动卖,0.9,0),COLOR0000FF;
STICKLINE(主动买 =0,VOL,-主动卖,0.2,0),COLORCC66FF;
STICKLINE(主动卖 =0,0,-主动卖,3.2,0),COLOR990000;
STICKLINE(主动卖 =0,0,-主动卖,2.7,0),COLORCC0000;
STICKLINE(主动卖 =0,0,-主动卖,2.1,0),COLORFF4400;
STICKLINE(主动卖 =0,0,-主动卖,1.5,0),COLORFF8800;
STICKLINE(主动卖 =0,0,-主动卖,0.9,0),COLORFFCC00;
STICKLINE(主动卖 =0,0,-主动卖,0.2,0),COLORCYAN;
VA:=IF(CLOSE REF(CLOSE,1),VOL,-VOL);
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0),COLORAAAAAA;
MAOBV:MA(OBV,15),COLOR000099;
MAOBV2:MA(OBV,30),COLOR00AAAA;
{箱顶:HHV(OBV,21),COLOR0000FF;
箱底:LLV(OBV,21),COLOR00FF00;}
UPPER:MAOBV+2*STD(OBV,30),COLORFFFF00,POINTDOT;
LOWER:MAOBV-2*STD(OBV,30),COLORFF0000,POINTDOT;
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);
DSLX2:=MA(DSLX,10);
YYV1:=MA(VOL,5);
YYV2:=MA(VOL,10);
J1:=CONST(IF(YYAVX 0,200,100));
J2:=CONST(IF(YYAVX 0,00,100));
J3:=CONST(IF(YYAVX 0,100,100));
ZGD3:=ZGD2;
ZDD3:=ZDD2;
ZGD4:=ZGD2;
情况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));
情况5:=CONST(IF(((CROSS(1,YYAVX)AND(YYV1 =YYV2))AND(DSLX =DSLX1)),1,0));
情况6:=CONST(IF(((CROSS(1,YYAVX)AND(YYV1 YYV2))AND(DSLX =DSLX1)),1,0));
情况7:=CONST(IF(((CROSS(1,YYAVX)AND(YYV1 =YYV2))AND(DSLX DSLX1)),1,0));
情况8:=CONST(IF(((CROSS(1,YYAVX)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));
情况11:=CONST(IF(((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2))AND(DSLX DSLX1)),1,0)),NODRAW;
情况12:=CONST(IF(((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2))AND(DSLX DSLX1)),1,0));
情况13:=CONST(IF(((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2))AND(DSLX =DSLX1)),1,0));
情况14:=CONST(IF(((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2))AND(DSLX =DSLX1)),1,0));
情况15:=CONST(IF(((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2))AND(DSLX DSLX1)),1,0));
情况16:=CONST(IF(((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2))AND(DSLX DSLX1)),1,0));
1:=CONST(IF((CROSS(YYAVX,1)AND(YYV1 =YYV2)),1,0));
大盘2:=CONST(IF((CROSS(YYAVX,1)AND(YYV1 YYV2)),1,0));
大盘3:=CONST(IF((CROSS(1,YYAVX)AND(YYV1 =YYV2)),1,0));
大盘4:=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));
大盘6:=CONST(IF((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2)),1,0));
大盘7:=CONST(IF((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2)),1,0));
大盘8:=CONST(IF((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2)),1,0));
MFI:=(HIGH-LOW)*1000000/(VOL*比);
绿灯:=MFI =REF(MFI,1)ANDVOL*比 =REF(VOL,1);
MMM1:=CONST(绿灯);
衰退:=MFI REF(MFI,1)ANDVOL*比 REF(VOL,1);
MMM2:=CONST(衰退);
伪装:=MFI =REF(MFI,1)ANDVOL*比 REF(VOL,1);
MMM3:=CONST(伪装);
蛰伏:=MFI REF(MFI,1)ANDVOL*比 =REF(VOL,1);
MMM4:=CONST(蛰伏);
TS1:=IF(情况1=1,0.06+0.06,0.06);
TS2:=IF(情况2=1,TS1+0.18,TS1);
TS3:=IF(情况3=1,TS2+0.18,TS2);
TS4:=IF(情况4=1,TS3+0.18,TS3);
TS5:=IF(情况5=1,TS4+0.18,TS4);
TS6:=IF(情况6=1,TS5+0.18,TS5);
TS7:=IF(情况7=1,TS6+0.18,TS6);
TS8:=IF(情况8=1,TS7+0.18,TS7);
TS9:=IF(情况9=1,TS8+0.18,TS8);
TS10:=IF(情况10=1,TS9+0.18,TS9);
TS11:=IF(情况11=1,TS10+0.18,TS10);
TS12:=IF(情况12=1,TS11+0.18,TS11);
TS13:=IF(情况13=1,TS12+0.18,TS12);
TS14:=IF(情况14=1,TS13+0.18,TS13);
TS15:=IF(情况15=1,TS14+0.18,TS14);
TS16:=IF(情况16=1,TS15+0.18,TS15);
TS17:=IF(大盘1=1,TS16+0.18,TS16);
TS18:=IF(大盘2=1,TS17+0.18,TS17);
TS19:=IF(大盘3=1,TS18+0.18,TS18);
TS20:=IF(大盘4=1,TS19+0.18,TS19);
TS21:=IF(大盘5=1,TS20+0.18,TS20);
TS22:=IF(大盘6=1,TS21+0.18,TS21);
TS23:=IF(大盘7=1,TS22+0.18,TS22);
TS24:=IF(大盘8=1,TS23+0.18,TS23);
TS25:=IF(MMM1=1,TS24+0.18,TS24);
TS26:=IF(MMM2=1,TS25+0.18,TS25);
TS27:=IF(MMM3=1,TS26+0.18,TS26);
TS28:=IF(MMM4=1,TS27+0.18,TS27);
DRAWTEXT_FIX(情况1=1,0.06,TS1,0, 理想,明显走强,参与,仓位在2/3左右 ),COLORFF00FF;
DRAWTEXT_FIX(情况2=1,0.06,TS2,0, 走势趋强量能不足,进场,仓位在1/2左右 ),COLORFF00FF;
DRAWTEXT_FIX(情况3=1,0.06,TS3,0, 量价良好,并没有明显走强,短线进场,仓位1/2左右。 ),COLORFF00FF;
DRAWTEXT_FIX(情况4=1,0.06,TS4,0, 形态尚可,量能不足,未完全走强,短线参与,仓位1/3左右。 ),COLORFF00FF;
DRAWTEXT_FIX(情况5=1,0.06,TS5,0, 形态变坏,走势尚可,重仓减大半,清仓者观望。 ),COLOR00FFFF;
DRAWTEXT_FIX(情况6=1,0.06,TS6,0, 随大盘一起下跌,明显缩量走势,考虑大盘风险,减持或清仓。 ),COLOR00FFFF;
DRAWTEXT_FIX(情况7=1,0.06,TS7,0, 该股放量下跌,走势明显偏弱,离场观望。 ),COLORFFFFFF;
DRAWTEXT_FIX(情况8=1,0.06,TS8,0, 该股缩量下跌,走势偏弱,离场观望。 ),COLORFFFF00;
DRAWTEXT_FIX(情况9=1,0.06,TS9,0, 该股形态良好,强势明显,量能充足,可以继续持有。 ),COLOR00FFFF;
DRAWTEXT_FIX(情况10=1,0.06,TS10,0, 该股上行不变,强势依然,但量能开始转弱,注意风险 ),COLOR00FFFF;
DRAWTEXT_FIX(情况11=1,0.06,TS11,0, 该股仍然具备上涨潜力,但股性偏弱,可考虑减仓。 ),COLORFFFFFF;
DRAWTEXT_FIX(情况12=1,0.06,TS12,0, 该股走势趋弱,量能不足,减持大部分 ),COLORFFFF00;
DRAWTEXT_FIX(情况13=1,0.06,TS13,0, 该股形态不佳,注意成交量的变化,但目前不适合参与。 ),COLORFFFF00;
DRAWTEXT_FIX(情况14=1,0.06,TS14,0, 该股趋势不明,股价偏弱,注意量能变化,目前不宜参与。
DRAWTEXT_FIX(情况15=1,0.06,TS15,0, 有走强迹象,但量能不足,趋势不明,不适合操作 ),COLORFFFF00;
DRAWTEXT_FIX(情况16=1,0.06,TS16,0, 该股走势太弱,没有参与价值。 ),COLORFFFFFF;
DRAWTEXT_FIX(大盘1,0.06,TS17,0, 总势量能理想,2/3仓位,前一轮下跌,是否最佳买点,否则谨慎介入。 ),COLOR00FF00;
DRAWTEXT_FIX(大盘2,0.06,TS18,0, 总势趋强,量能不足,若前一轮下跌,短线进场1/2,量能放大加仓。 ),COLORFF00FF;
DRAWTEXT_FIX(大盘3,0.06,TS19,0, 总势形态走坏,重仓者可以减去大部分仓位。 ),COLORAAAAAA;
DRAWTEXT_FIX(大盘4,0.06,TS20,0, 总势缩量调整,注意风险,短线清仓观望。 ),COLORFFFFFF;
DRAWTEXT_FIX(大盘5,0.06,TS21,0, 总势走势良好,量能理想,可以继续持有强势股。 ),COLOR00FFFF;
DRAWTEXT_FIX(大盘6,0.06,TS22,0, 总势形态良好,但量能稍显不足,随时准备减仓 ),COLOR00FF00;
DRAWTEXT_FIX(大盘7,0.06,TS23,0, 总势趋势不明,注意成交量变化,目前不适宜进场。 ),COLORFFFFFF;
DRAWTEXT_FIX(大盘8,0.06,TS24,0, 总势趋势向下,量能萎缩,不适合进场。 ),COLORFFFFFF;
DRAWTEXT_FIX(MMM1,0.06,TS25,0, [绿灯]实计交易量增加。MFI促进指数增加。 ),COLORFFFFFF;
DRAWTEXT_FIX(MMM2,0.06,TS26,0, [衰退]实计交易量减少。MFI促进指数减少。 ),COLORGREEN;
DRAWTEXT_FIX(MMM3,0.06,TS27,0, [伪装]实计交易量减少。MFI促进指数增加。 ),COLORGREEN;
DRAWTEXT_FIX(MMM4,0.06,TS28,0, [蛰伏]实计交易量增加。MFI促进指数减少。 ),COLORYELLOW;
持币:IF(SAR(10,2,20) =H,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORBLUE;
持股:IF(SAR(10,2,20) =L,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORRED;WJ:=(H+L+C)/3;
V1:=IF(H=L,1,H-MAX(O,C));
V2:=IF(H=L,1,MAX(C,O)-WJ);
V3:=IF(H=L,1,MIN(O,C)-L);
V4:=IF(H=L,1,WJ-MIN(C,O));
V5:=VOL/IF(H=L,4,H-L);
V6:=(V1*V5);
V7:=(V2*V5);
V8:=(V3*V5);
V9:=(V4*V5);
买盘:=(V9+V8);
卖盘:=(V6+V7);
差:=买盘-卖盘;
DDX:=买卖差;
DX:=MA(买卖差,5)*20;
DDX1:SMA(DX,3,1),COLORFFFFFF;
DDX2:SMA(DDX1,3,1),COLOR00FFFF;
DDX3:(5*DDX2+4*REF(DDX2,1)+3*REF(DDX2,2)+2*REF(DDX2,3)+REF(DDX2,4))/15;
预警:DDX 0ANDMA(V,5) MA(MA(V,5),5)ANDCROSS(DDX1,DDX2),LINETHICK;
天:=COUNT(DDX 0,5),COLORRED;
DRAWTEXT(预警,DDX*1.06, ★ ),LINETHICK3,COLOR00FFFF;
DIF:(EMA(CLOSE,12)-EMA(CLOSE,26));
DEF:EMA(DIF,9);
MACD2:(2*(DIF-DEF)),linethick1;
STICKLINE(MACD2 =0ANDMACD2 REF(MACD2,1),0,MACD2,6,0),colorred;
STICKLINE(MACD2 =0ANDMACD2 REF(MACD2,1),0,MACD2,6,1),coloryellow;
STICKLINE(MACD2 0ANDMACD2 REF(MACD2,1),0,MACD2,6,0),colorgreen;
STICKLINE(MACD2 0ANDMACD2 REF(MACD2,1),0,MACD2,6,1),colorwhite;
公式解读:
AAA赋值:3*(收盘价-27日内最低价的最低值)/(27日内最高价的最高值-27日内最低价的最低值)*100的5日[1日权重]移动平均-2*(收盘价-27日内最低价的最低值)/(27日内最高价的最高值-27日内最低价的最低值)*100的5日[1日权重]移动平均的3日[1日权重]移动平均
QD赋值:如果AAA上穿5,返回1,否则返回0 AND 收盘价/1日前的收盘价 1.0
输出XG:QD的10日过滤
今开:DYNAINFO(4);
DRAWNUMBER(ISLASTBAR,今开,今开);
时间:=TIME2=100000;
N:=BARSLAST(时间);
CS1:CONST(IF(N,MAX(REF(HHV(H,0),N),DYNAINFO(4)),HHV(H,0))),DOTLINE,COLOR00FFFF;
CS2:CONST(IF(N,MIN(REF(LLV(L,0),N),DYNAINFO(4)),LLV(L,0))),DOTLINE,COLOR00FFFF;
DRAWNUMBER(CURRBARSCOUNT=2,CS1,CS1),COLORYELLOW,LINETHICK3;
DRAWICON(CROSS(C,CS1),CS1,1);
DRAWICON(CROSS(C,CS2),CS2,2);
STICKLINE(TIME2=94100ANDREF(C,BARSLAST(TIME2=94100)) =REF(C,BARSLAST(TIME2=93100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,-1),COLORRED;
STICKLINE(TIME2=94100ANDREF(C,BARSLAST(TIME2=94100)) REF(C,BARSLAST(TIME2=93100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,-1),COLORGREEN;
STICKLINE(TIME2=95100ANDREF(C,BARSLAST(TIME2=95100)) =REF(C,BARSLAST(TIME2=94100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,-1),COLORRED;
STICKLINE(TIME2=95100ANDREF(C,BARSLAST(TIME2=95100)) REF(C,BARSLAST(TIME2=94100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,-1),COLORGREEN;
STICKLINE(TIME2=100100ANDREF(C,BARSLAST(TIME2=100100)) =REF(C,BARSLAST(TIME2=95100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,-1),COLORRED;
STICKLINE(TIME2=100100ANDREF(C,BARSLAST(TIME2=100100)) REF(C,BARSLAST(TIME2=95100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,-1),COLORGREEN;
SJ1:=TIME2=93100;T1:=BARSLAST(SJ1);SJ2:=TIME2=94100;
SJ4:=TIME2=95100;T2:=BARSLAST(SJ2);T4:=BARSLAST(SJ4);
H1:=IF(TIME2=94100,REF(C,T2),DRAWNULL)=C;
H2:=IF(TIME2=95100,REF(C,T4),DRAWNULL)=C;
CS2:=CONST(REF(C,T2));
CS4:=CONST(REF(C,T4));
GL2:=FILTERX(H1,T2);
GL4:=FILTERX(H2,T4);
L1:=IF(TIME2=93100,REF(C,T1),DRAWNULL)=C;
CS1:=CONST(REF(C,T1));
GL1:=FILTERX(L1,T1);
DA:=CONST(IF(REF(GL2,BARSLAST(GL2)),REF(BARSLAST(GL1),BARSLAST(GL2)),DRAWNULL));
DA1:=CONST(IF(REF(GL4,BARSLAST(GL4)),REF(BARSLAST(GL2),BARSLAST(GL4)),DRAWNULL));
A:=IF(BARSLAST(GL1) =0ANDBARSLAST(GL1) =DA,((CS2-CS1)/DA)*BARSLAST(GL1)+CS1,DRAWNULL);
B:=IF(BARSLAST(GL2) =0ANDBARSLAST(GL2) =DA1,((CS4-CS2)/DA1)*BARSLAST(GL2)+CS2,DRAWNULL);
IF(A =REF(A,2),A,DRAWNULL)COLORLIMAGENTA,LINETHICK3;
IF(A REF(A,2),A,DRAWNULL)COLORGREEN,LINETHICK5;
IF(B =REF(B,2),B,DRAWNULL)COLORLIMAGENTA,LINETHICK3;
IF(B REF(B,2),B,DRAWNULL)COLORGREEN,LINETHICK3;
XSJ1:=TIME2=95100;
XT1:=BARSLAST(XSJ1);
XSJ2:=TIME2=100100;
XT2:=BARSLAST(XSJ2);
XCS2:=CONST(REF(C,XT2));
XL1:=IF(TIME2=95100,REF(C,XT1),DRAWNULL)=C;
XH1:=IF(TIME2=100100,REF(C,XT2),DRAWNULL)=C;
XCS1:=CONST(REF(C,XT1));
XGL1:=FILTERX(XL1,XT1);
XGL2:=FILTERX(XH1,XT2);
XDA:=CONST(IF(REF(XGL2,BARSLAST(XGL2)),REF(BARSLAST(XGL1),BARSLAST(XGL2)),DRAWNULL));
XA:=IF(BARSLAST(XGL1) =0ANDBARSLAST(XGL1) =XDA,((XCS2-XCS1)/XDA)*BARSLAST(XGL1)+XCS1,DRAWNULL);
IF(XA =REF(XA,1),XA,DRAWNULL)COLORLIMAGENTA,LINETHICK3;
IF(XA REF(XA,1),XA,DRAWNULL)COLORGREEN,LINETHICK3;
时间:=TIME2=100100;
N:=BARSLAST(时间);
C1:CONST(IF(N,MAX(REF(HHV(H,0),N+1),DYNAINFO(4)),HHV(H,0))),DOTLINE,COLORRED;
C2:CONST(IF(N,MIN(REF(LLV(L,0),N+1),DYNAINFO(4)),LLV(L,0))),DOTLINE,COLORGREEN;
C3:(C1+C2)/2,DOTLINE,COLORYELLOW;
VV:=HHV(V,0);
ZF:=(C1/C2-1)*100;
DRAWTEXT(CURRBARSCOUNT=2,C1,VARCAT(VARCAT(VARCAT(VARCAT( 上限: ,VAR2STR(C1,2)), 元, ),VARCAT( 振幅: ,VAR2STR(ZF,2))), % )),COLORRED;
DRAWTEXT(CURRBARSCOUNT=2,C3,VARCAT(VARCAT( 中限: ,VAR2STR(C3,2)), 元 )),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=2,C2,VARCAT(VARCAT( 下限: ,VAR2STR(C2,2)), 元 )),COLORGREEN;
DRAWTEXT(C1/C2 =1.03ANDCROSS(C,C1)ANDV =VV,C1*1.005, ★买入 )COLORRED;
DRAWTEXT(C1/C2 =1.03ANDCROSS(C2,C)ANDV =VV,C2*0.998, ★卖出 )COLORGREEN;
STICKLINE(C1/C2 1.03ANDCROSS(C,C1)ANDV =VV,DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,0),COLORRED;
AAA:=MAX(DYNAINFO(3),DYNAINFO(5));
BBB:=MIN(DYNAINFO(3),DYNAINFO(6));
CCC:=AAA-BBB;
中轨:=(AAA+BBB)/1,POINTDOT;
阻力:BBB+CCC*7/8,COLORBLUE,POINTDOT;
支撑:BBB+CCC*1/8,COLORMAGENTA,POINTDOT;
支撑1:BBB+CCC*0.5/8,POINTDOT;
上顶:BBB+CCC*2/3,POINTDOT;
下底:BBB+CCC/3,COLORBLUE,POINTDOT;
STICKLINE(C 阻力,阻力,C,2,0),COLORGREEN;
STICKLINE(C 支撑,支撑,C,2,0),COLORLIMAGENTA;
DRAWTEXT(LONGCROSS(支撑1,C,2),下底, B ),COLORYELLOW;{B}
DRAWTEXT(LONGCROSS(C,阻力,2),上顶, S ),COLORRED;{S};
亿元:AMOUNT/100000000,LINETHICK0;
AA:=IF(CURRBARSCOUNT=1ANDPERIOD=5,AMOUNT*240/FROMOPEN,DRAWNULL);
预测额:AA/100000000;
增减额:预测额-REF(亿元,1),LINETHICK0;
下跌家数:CONST(INDEXDEC),COLORGREEN,LINETHICK0;
上涨家数:INTPART(INDEXADV),COLORRED,LINETHICK0;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,3.7,0),COLOR0066FF;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,3.2,0),COLOR0088FF;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,2.7,0),COLOR00AAFF;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,2.1,0),COLOR00CCFF;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,1.5,0),COLOR22FFFF;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,0.9,0),COLOR66FFFF;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,0.3,0),COLOR99FFFF;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,3.7,0),COLORFF11FF;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,3.2,0),COLORFF33FF;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,2.7,0),COLORFF55FF;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,2.1,0),COLORFF77FF;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,1.5,0),COLORFF99FF;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,0.9,0),COLORFFBBFF;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,0.3,0),COLORFFDDFF;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,3.7,0),COLORFF3300;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,3.2,0),COLORFF5500;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,2.7,0),COLORFF7700;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,2.1,0),COLORFF9900;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,1.5,0),COLORFFBB00;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,0.9,0),COLORFFDD00;
STICKLINE(CLOSE REF(CLOSE,1),0,AMOUNT,0.3,0),COLORFFFF00;
STICKLINE(CLOSE=REF(CLOSE,1),0,AMOUNT,3.7,0),COLOR333333;
STICKLINE(CLOSE=REF(CLOSE,1),0,AMOUNT,3.2,0),COLOR555555;
STICKLINE(CLOSE=REF(CLOSE,1),0,AMOUNT,2.7,0),COLOR777777;
STICKLINE(CLOSE=REF(CLOSE,1),0,AMOUNT,2.1,0),COLOR999999;
STICKLINE(CLOSE=REF(CLOSE,1),0,AMOUNT,1.5,0),COLORBBBBBB;
STICKLINE(CLOSE=REF(CLOSE,1),0,AMOUNT,0.9,0),COLORDDDDDD;
STICKLINE(CLOSE=REF(CLOSE,1),0,AMOUNT,0.3,0),COLORFFFFFF;
五日均额:MA(AMOUNT,24)COLORWHITE;
十日均额:MA(AMOUNT,135)COLORYELLOW;
股票公式编写要求:
今日开盘价低于昨日实体最高价的公式。
股票公式编写结果:
XG:O REF(MAX(C,O),1);