手机版 官方微博
官方微信
扫描关注:理想财富微信公众号
理想论坛App
扫描下载理想论坛App
RSS

请老师帮助改改:分时主图,通不过

[通达信]
设置
2542 4 大运旺旺旺 Lv.2 发表于 · 2020-2-11 16:21 举报 显示全部楼层 复制 正序浏览 |
跳转到指定楼层
{DRAWGBK(C>0,RGB(1,1,1),RGB(1,1,1),0,'背景图',0);}
{DRAWRECTREL(314.2,470,315.8,530,RGB(255,0,0))NOFRAME;}
{DRAWRECTREL(0,0,999,999,RGB(45,0,45))NOFRAME;
DRAWRECTREL(0,143,999,856,RGB(30,30,0))NOFRAME;
DRAWRECTREL(0,285,999,714,RGB(30,0,0))NOFRAME;
DRAWRECTREL(0,499.5,999,500.5,RGB(255,255,255));
DRAWRECTREL(190,470,192.8,530,RGB(255,0,0))NOFRAME;}

C,COLORWHITE;
均价:=SUM(V*C,0)/SUM(V,0);
C2:="分时引用.C2#DAY";
KF0:=BARSCOUNT(CLOSE)<2000;
成交量:=SUM(VOL*KF0,0),NODRAW;
{均价:IF(KF0<=0,DRAWNULL,SUM(C*VOL,0)*KF0/成交量),COLOR00FFFF;}
DRAWLINE(BARSCOUNT(CLOSE)=210,均价,REF(BARSCOUNT(CLOSE)=210,1),REF(均价,1),1)CIRCLEDOT,COLORFF00FF;
Z1:=主力买卖盘.机构买盘;
Z2:=主力买卖盘.机构卖盘;
Z3:=成交量/CAPITAL;
五日量:="分时引用.VOL5#DAY"/100;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.9,0,'买入量(1.43-2.6%):'),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.21,0.9,0,VAR2STR(五日量,0)),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.26,0.9,0,'追入量(2.6-4.3%):'),COLORLIMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.39,0.9,0,VAR2STR(五日量*2,0)),COLORLIMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.99,0,'启动量(4.3%-7.1%):'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.21,0.99,0,VAR2STR(五日量*3,0)),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.26,0.99,0,'涨停量(7.1%-10%):'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.39,0.99,0,VAR2STR(五日量*5,0)),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.5,0.94,0,'两天前收盘:'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.58,0.94,0,VAR2STR(C2,2)),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.63,0.9,0,'主力买盘:'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.70,0.9,0,VAR2STR(Z1/10000,2)),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.75,0.9,0,'量比:'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.82,0.9,0,VAR2STR(DYNAINFO(17),2)),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.87,0.9,0,'向上7.8%:'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.94,0.9,0,VAR2STR(C2*1.078,2)),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.63,0.99,0,'主力卖盘:'),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.70,0.99,0,VAR2STR(Z2/10000,2)),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.75,0.99,0,'换手率%:'),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.82,0.99,0,VAR2STR(Z3*100,2)),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.87,0.99,0,'向下7.8%:'),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.94,0.99,0,VAR2STR(C2*0.922,2)),COLORFFFF00;

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.8,0.8,0,'今日量能:'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.9,0.8,0,VAR2STR(SUM(V,0),2)),COLORMAGENTA;

DRAWTEXT(BARSCOUNT(CLOSE)=450,均价,VAR2STR(均价,2)),COLORRED;
DRAWTEXT(BARSCOUNT(CLOSE)=210,均价,VAR2STR(均价,2)),COLORRED;
DIFZ:=EMA(C,5)-EMA(C,25);
DEAZ:=EMA(DIFZ,55);
MACDZ:=2*(DIFZ-DEAZ);
RC:=DYNAINFO( 3);
{量比超2.5:=IF(DYNAINFO(17)>2.5,RC-0.15,DRAWNULL),COLORFF9933;
量比超5:=IF(DYNAINFO(17)>5,RC-0.15,DRAWNULL),COLORBA75FF;
DRAWBAND(量比超2.5,RGB(51,153,255),量比超2.5+0.015,RGB(51,153,255));
DRAWBAND(量比超5,RGB(255,118,188),量比超5+0.015,RGB(255,118,188)); }
S2:=SMA(C,2,1); S6:=SMA(C,6,1);
DK:=2*(S2-S6);
STICKLINE(DK>0,RC,RC+DK,0,1),COLORRED;
STICKLINE(DK<0,RC,RC+DK,0,1),COLORCYAN;
分时顶:HHV(H,480),COLORRED,DOTLINE;
TT:=IF(HOUR>12,(HOUR-13)*60+MINUTE+120,(HOUR-9)*60+MINUTE-30);
IF(TT>=30,REF(HHV(H,30),TT-30),DRAWNULL),COLOR99CCFF,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR,0,0,0,CODE),COLORYELLOW;
市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));
市销率:=STRCAT(' 市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2));
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2));
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
净利润率:=STRCAT(' 净利润率 ',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
主营利润率:=STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
利润同比:=STRCAT(' 利润同比: ',CON2STR(FINANCE(43),2));
收入同比:=STRCAT(' 收入同比: ',CON2STR(FINANCE(44),2));
{}
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X1+X2+X3+X4+X5;
预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));
财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3))));
优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));{理论上越大越好但不同行业有不同标准};
现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};
财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));
Z11:=STRCAT(HYBLOCK,' ');
Z12:=STRCAT(Z11,DYBLOCK);
Z13:=STRCAT(Z12,' ');
{DRAWTEXT_FIX(ISLASTBAR,0.5,0.75,0,STRCAT(Z13,GNBLOCK)),COLORFFFF00;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.75,0,EXTERNSTR(0,3)),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.75,0,EXTERNSTR(0,6)),COLORLIBLUE;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.75,0,EXTERNSTR(0,12)),COLORLIGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.07,0.75,0,FGBLOCK),COLORFFFF00;
DRAWTEXT_FIX(ISLASTBAR,0.07,0.75,0,EXTERNSTR(0,1)),COLORYELLOW;}

{DRAWTEXT_FIX(ISLASTBAR,0.07,0.8,0,财务系数),COLORCYAN;}

今开:DYNAINFO(4),COLORCYAN;
K10收价:=CONST(REF(C,FROMOPEN-11));
K10高价:=CONST(REF(HHV(H,10),FROMOPEN-11));
K10低价:=CONST(REF(LLV(L,10),FROMOPEN-11));
K20收价:=CONST(REF(C,FROMOPEN-21));
K20高价:=CONST(REF(HHV(H,10),FROMOPEN-21));
K20低价:=CONST(REF(LLV(L,10),FROMOPEN-21));
K30收价:=CONST(REF(C,FROMOPEN-31));
K30高价:=CONST(REF(HHV(H,10),FROMOPEN-31));
K30低价:=CONST(REF(LLV(L,10),FROMOPEN-31));
先上后下再上:=K10收价>今开&&K10收价>K20收价&&K30收价>K20收价;
DRAWTEXT_FIX(先上后下再上&&K20低价>=K10低价&&K30高价>K10高价,0.03,0.01,0,'先上后下再上:  下跌不新低,上涨新高——一般会大涨小回收阳'),COLORMAGENTA;
DRAWTEXT_FIX(先上后下再上&&K20低价>=K10低价&&K30高价<=K10高价,0.03,0.01,0,'先上后下再上:  下跌没新低,上涨没新高——多头较弱,当天的回档会持续较长时间,收盘不可能为最高点'),COLORMAGENTA;
DRAWTEXT_FIX(先上后下再上&&K20低价<K10低价&&K30高价>K10高价,0.03,0.01,0,'先上后下再上:  下跌新低,上涨新高——表明多空分歧比较大,当天震荡会较大'),COLORMAGENTA;
DRAWTEXT_FIX(先上后下再上&&K20低价<K10低价&&K30高价<=K10高价,0.03,0.01,0,'先上后下再上:  下跌新低,上涨没新高——当天的调整压力较大'),COLORMAGENTA;
先下后上再下:=K10收价<今开&&K20收价>K10收价&&K30收价<K20收价;
DRAWTEXT_FIX(先下后上再下&&K20高价>K10高价&&K30低价>=K10低价,0.03,0.01,0,'先下后上再下:  上涨新高,下跌没新低——多头势力仍较盛,当天有冲高机会,尾盘可能不在最低'),COLORYELLOW;
DRAWTEXT_FIX(先下后上再下&&K20高价<=K10高价&&K30低价>=K10低价,0.03,0.01,0,'先下后上再下:  上涨没新高,下跌没新低——调整,尾盘杀跌'),COLORYELLOW;
DRAWTEXT_FIX(先下后上再下&&K20高价>K10高价&&K30低价<K10低价,0.03,0.01,0,'先下后上再下:  上涨新高,下跌新低——冲高回落'),COLORYELLOW;
DRAWTEXT_FIX(先下后上再下&&K20高价<=K10高价&&K30低价<K10低价,0.03,0.01,0,'先下后上再下:  上涨没新高,下跌新低——探底会比较深'),COLORYELLOW;
先上后上再下:=K10收价>今开&&K10收价<K20收价&&K30收价<K20收价;
DRAWTEXT_FIX(先上后上再下&&K30低价<K10低价,0.03,0.01,0,'先上又上再下:  表明多头势力较强,但空头压力也大,弱势'),COLORRED;
DRAWTEXT_FIX(先上后上再下&&RANGE(K30收价,K10收价,K20收价)&&K30低价<=K20低价,0.03,0.01,0,'先上又上再下:  表明多头势力较强,但空头压力也大,中势'),COLORRED;
DRAWTEXT_FIX(先上后上再下&&K30低价>K20低价,0.03,0.01,0,'先上又上再下:  表明多头势力较强,但空头压力也大,强势'),COLORRED;
先下后下再上:=K10收价<今开&&K20收价<K10收价&&K30收价>K20收价;
DRAWTEXT_FIX(先下后下再上&&K30高价>今开,0.03,0.01,0,'先下又下再上:  则表明空头势力较强,但多头尚有反击余力,可能是出货行情'),COLORLIRED;
DRAWTEXT_FIX(先下后下再上&&RANGE(K30收价,K20收价,K10收价),0.03,0.01,0,'先下又下再上:  则表明空头势力较强,但多头尚有反击余力,中势'),COLORLIRED;
DRAWTEXT_FIX(先下后下再上&&K30低价>K20低价&&K30高价<K20高价,0.03,0.01,0,'先下又下再上:  则表明空头势力较强,但多头尚有反击余力,弱势'),COLORLIRED;
先上后下再下:=K10收价>今开&&K20收价<K10收价&&K30收价<K20收价;
DRAWTEXT_FIX(先上后下再下&&K20低价<K10低价&&K30低价>=K20低价,0.03,0.01,0,'先上后下再下:  第二个下跌波创新低,当天收阴线概率很大'),COLORLIRED;
DRAWTEXT_FIX(先上后下再下&&K20低价<K10低价&&K30低价<K20低价,0.03,0.01,0,'先上后下再下:  第三个下跌又创新低,行情走淡'),COLORLIRED;
DRAWTEXT_FIX(先上后下再下&&K20低价>=K10低价&&K30低价>=K10低价,0.03,0.01,0,'先上后下再下:  第二个下跌和第三个下跌不创新低(开盘价),可能是诱空'),COLORLIRED;
DRAWTEXT_FIX(先上后下再下&&RANGE(K10低价,K30低价,K20低价),0.03,0.01,0,'先上后下再下:  第三个下跌创新低,调整仍有低点'),COLORLIRED;
先下后上再上:=K10收价<今开&&K20收价>K10收价&&K30收价>K20收价;
DRAWTEXT_FIX(先下后上再上&&K20低价<K10低价&&K30低价>K20低价,0.03,0.01,0,'先下后上再上:  开盘后的向下是多头获利回吐的表现,当天行情仍可能走好。'),COLORLIRED;
DRAWTEXT_FIX(先下后上再上&&K20低价<K10低价&&K30低价<K20低价,0.03,0.01,0,'先下后上再上:  开盘后的向下是多头获利回吐的表现,当天行情仍可能走好。'),COLORLIRED;
DRAWTEXT_FIX(先下后上再上&&K20低价>=K10低价&&K30低价>=K10低价,0.03,0.01,0,'先下后上再上:  开盘后的向下是多头获利回吐的表现,当天行情仍可能走好。'),COLORLIRED;
三步高:=K10收价>今开&&K20收价>=K10收价&&K30收价>K20收价;
三步高1:=K10收价>今开&&K20收价>K10收价&&K30收价>=K20收价;
DRAWTEXT_FIX(三步高  OR 三步高1,0.03,0.01,0,'三步高:   盘中打低吸货'),COLORLIRED;
三步低:=K10收价<今开&&K20收价<=K10收价&&K30收价<K20收价;
DRAWTEXT_FIX(三步低,0.03,0.01,0,'三步低:  盘中反弹出货'),COLORLIRED;
DRAWKLINE(IF(TIME=0941,K10高价,DRAWNULL),今开,K10低价,K10收价);
DRAWKLINE(IF(TIME=0942,K20高价,DRAWNULL),K10收价,K20低价,K20收价);
DRAWKLINE(IF(TIME=0943,K30高价,DRAWNULL),K20收价,K30低价,K30收价);
先下后下走平:=K10收价<今开&&K20收价<K10收价&&K30收价=K20收价;
DRAWTEXT_FIX(先下后下走平,0.03,0.01,0,'先下又下走平:  注意箱体方向选择,量能配合'),COLORLIRED;
先下后平再平:=K10收价<今开&&K20收价=K10收价&&K30收价=K20收价;
DRAWTEXT_FIX(先下后平再平,0.03,0.01,0,'先下后平再平:  向下振荡可能性大 '),COLORLIRED;
三平步:=K10收价=今开&&K20收价=K10收价&&K30收价=K20收价;
DRAWTEXT_FIX(三平步,0.03,0.01,0,'三平步:  '),COLORLIRED;
下上平:=K10收价<今开&&K20收价>K10收价&&K30收价=K20收价;
DRAWTEXT_FIX(下上平,0.03,0.01,0,'下上平:  盘整,注意箱体突破方向,量能的配合 '),COLORLIRED;
下平上:=K10收价<今开&&K20收价=K10收价&&K30收价>K20收价;
DRAWTEXT_FIX(下平上,0.03,0.01,0,'下平上:  上涨概率高 '),COLORLIRED;

O5:="分时引用.O5#DAY";
C5:="分时引用.C5#DAY";
H5:="分时引用.H5#DAY";
L5:="分时引用.L5#DAY";
O4:="分时引用.O4#DAY";
C4:="分时引用.C4#DAY";
H4:="分时引用.H4#DAY";
L4:="分时引用.L4#DAY";
O3:="分时引用.O3#DAY";
C3:="分时引用.C3#DAY";
H3:="分时引用.H3#DAY";
L3:="分时引用.L3#DAY";
O2:="分时引用.O2#DAY";
H2:="分时引用.H2#DAY";
L2:="分时引用.L2#DAY";
O1:="分时引用.O1#DAY";
C1:="分时引用.C1#DAY";
H1:="分时引用.H1#DAY";
L1:="分时引用.L1#DAY";
O0:=DYNAINFO(4);
C0:=DYNAINFO(7);
H0:=DYNAINFO(5);
L0:=DYNAINFO(6);
HH1:=MAX(H1,H2);
HH2:=MAX(H3,H4);
HH3:=MAX(MAX(H0,H5),MAX(HH1,HH2));
LL1:=MIN(L1,L2);
LL2:=MIN(L3,L4);
LL3:=MIN(MIN(L0,L5),MIN(LL1,LL2));
HL:=409/(HH3-LL3);
C52:=999-((C5-LL3)*HL);
H52:=999-((H5-LL3)*HL);
L52:=999-((L5-LL3)*HL);
O52:=999-((O5-LL3)*HL);
C42:=999-((C4-LL3)*HL);
H42:=999-((H4-LL3)*HL);
L42:=999-((L4-LL3)*HL);
O42:=999-((O4-LL3)*HL);
C32:=999-((C3-LL3)*HL);
H32:=999-((H3-LL3)*HL);
L32:=999-((L3-LL3)*HL);
O32:=999-((O3-LL3)*HL);
C22:=999-((C2-LL3)*HL);
H22:=999-((H2-LL3)*HL);
L22:=999-((L2-LL3)*HL);  
O22:=999-((O2-LL3)*HL);
C12:=999-((C1-LL3)*HL);
H12:=999-((H1-LL3)*HL);
L12:=999-((L1-LL3)*HL);  
O12:=999-((O1-LL3)*HL);
C02:=999-((C0-LL3)*HL);
H02:=999-((H0-LL3)*HL);
L02:=999-((L0-LL3)*HL);
O02:=999-((O0-LL3)*HL);
DRAWRECTREL(IF(FROMOPEN<=120,579,79),H52,IF(FROMOPEN<=120,579,79),L52,RGB(IF(C5>=O5,900,0),IF(C5>=O5,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,574,74),C52,IF(FROMOPEN<=120,584,84),O52,RGB(IF(C5>=O5,728,0),IF(C5>=O5,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,591,91),H42,IF(FROMOPEN<=120,591,91),L42,RGB(IF(C4>=O4,900,0),IF(C4>=O4,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,586,86),C42,IF(FROMOPEN<=120,596,96),O42,RGB(IF(C4>=O4,728,0),IF(C4>=O4,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,603,103),H32,IF(FROMOPEN<=120,603,103),L32,RGB(IF(C3>=O3,900,0),IF(C3>=O3,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,598,98),C32,IF(FROMOPEN<=120,608,108),O32,RGB(IF(C3>=O3,728,0),IF(C3>=O3,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,615,115),H22,IF(FROMOPEN<=120,615,115),L22,RGB(IF(C2>=O2,900,0),IF(C2>=O2,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,610,110),C22,IF(FROMOPEN<=120,620,120),O22,RGB(IF(C2>=O2,728,0),IF(C2>=O2,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,627,127),H12,IF(FROMOPEN<=120,627,127),L12,RGB(IF(C1>=O1,900,0),IF(C1>=O1,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,622,122),C12,IF(FROMOPEN<=120,632,132),O12,RGB(IF(C1>=O1,728,0),IF(C1>=O1,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,639,139),H02,IF(FROMOPEN<=120,639,139),L02,RGB(IF(C0>=O0,900,0),IF(C0>=O0,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,634,134),C02,IF(FROMOPEN<=120,644,144),O02,RGB(IF(C0>=O0,728,0),IF(C0>=O0,0,728),0));



大运旺旺旺
Lv.2
发表于 2020-2-11 21:48 复制 查看全部楼层
通不过,老师,改下
休闲者68
Lv.6
发表于 2020-2-11 17:32 复制 查看全部楼层
本帖最后由 休闲者68 于 2020-2-11 19:26 编辑
大运旺旺旺 发表于 2020-2-11 16:42
通不过。 辛苦老师改下


{原公式缺少部分赋值,做了补充。公式未做测试,仅供参考,不做投资依据。}
第一步:建立引用公式,名称:分时顶引用}
O1:REF(O,1);
C1:REF(C,1);
H1:REF(H,1);
L1:REF(L,1);
O2:REF(O,2);
C2:REF(C,2);
H2:REF(H,2);
L2:REF(L,2);
O3:REF(O,3);
C3:REF(C,3);
H3:REF(H,3);
L3:REF(L,3);
O4:REF(O,4);
C4:REF(C,4);
H4:REF(H,4);
L4:REF(L,4);
O5:REF(O,5);
C5:REF(C,5);
H5:REF(H,5);
L5:REF(L,5);
VOL5:MA(V,5);

{}第二步:建立分时主图公式,名称:分时顶}
{DRAWGBK(C>0,RGB(1,1,1),RGB(1,1,1),0,'背景图',0);}
{DRAWRECTREL(314.2,470,315.8,530,RGB(255,0,0))NOFRAME;}
{DRAWRECTREL(0,0,999,999,RGB(45,0,45))NOFRAME;
DRAWRECTREL(0,143,999,856,RGB(30,30,0))NOFRAME;
DRAWRECTREL(0,285,999,714,RGB(30,0,0))NOFRAME;
DRAWRECTREL(0,499.5,999,500.5,RGB(255,255,255));
DRAWRECTREL(190,470,192.8,530,RGB(255,0,0))NOFRAME;}
VAR1:=(VOL/(((HIGH-LOW)*2)-ABS((CLOSE-OPEN))));
机构买盘:=IF((CLOSE>OPEN),(VAR1*(HIGH-LOW)),IF((CLOSE<OPEN),(VAR1*((HIGH-OPEN)+(CLOSE-LOW))),(VOL/2)));  
机构卖盘:=IF((CLOSE>OPEN),(0-(VAR1*((HIGH-CLOSE)+(OPEN-LOW)))),IF((CLOSE<OPEN),(0-(VAR1*(HIGH-LOW))),(0-(VOL/2))));   
{C,COLORWHITE;}
均价:=SUM(V*C,0)/SUM(V,0);
C2:="分时顶引用.C2#DAY";
KF0:=BARSCOUNT(CLOSE)<2000;
成交量:=SUM(VOL*KF0,0),NODRAW;
{均价:IF(KF0<=0,DRAWNULL,SUM(C*VOL,0)*KF0/成交量),COLOR00FFFF;}
DRAWLINE(BARSCOUNT(CLOSE)=210,均价,REF(BARSCOUNT(CLOSE)=210,1),REF(均价,1),1)CIRCLEDOT,COLORFF00FF;
Z1:=机构买盘;
Z2:=机构卖盘;
Z3:=成交量/CAPITAL;
五日量:="分时顶引用.VOL5#DAY"/100;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.9,0,'买入量(1.43-2.6%):'),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.21,0.9,0,VAR2STR(五日量,0)),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.26,0.9,0,'追入量(2.6-4.3%):'),COLORLIMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.39,0.9,0,VAR2STR(五日量*2,0)),COLORLIMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.99,0,'启动量(4.3%-7.1%):'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.21,0.99,0,VAR2STR(五日量*3,0)),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.26,0.99,0,'涨停量(7.1%-10%):'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.39,0.99,0,VAR2STR(五日量*5,0)),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.5,0.94,0,'两天前收盘:'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.58,0.94,0,VAR2STR(C2,2)),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.63,0.9,0,'主力买盘:'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.70,0.9,0,VAR2STR(Z1/10000,2)),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.75,0.9,0,'量比:'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.82,0.9,0,VAR2STR(DYNAINFO(17),2)),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.87,0.9,0,'向上7.8%:'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.94,0.9,0,VAR2STR(C2*1.078,2)),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.63,0.99,0,'主力卖盘:'),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.70,0.99,0,VAR2STR(Z2/10000,2)),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.75,0.99,0,'换手率%:'),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.82,0.99,0,VAR2STR(Z3*100,2)),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.87,0.99,0,'向下7.8%:'),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.94,0.99,0,VAR2STR(C2*0.922,2)),COLORFFFF00;

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.8,0.8,0,'今日量能:'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.9,0.8,0,VAR2STR(SUM(V,0),2)),COLORMAGENTA;

DRAWTEXT(BARSCOUNT(CLOSE)=450,均价,VAR2STR(均价,2)),COLORRED;
DRAWTEXT(BARSCOUNT(CLOSE)=210,均价,VAR2STR(均价,2)),COLORRED;
DIFZ:=EMA(C,5)-EMA(C,25);
DEAZ:=EMA(DIFZ,55);
MACDZ:=2*(DIFZ-DEAZ);
RC:=DYNAINFO( 3);
{量比超2.5:=IF(DYNAINFO(17)>2.5,RC-0.15,DRAWNULL),COLORFF9933;
量比超5:=IF(DYNAINFO(17)>5,RC-0.15,DRAWNULL),COLORBA75FF;
DRAWBAND(量比超2.5,RGB(51,153,255),量比超2.5+0.015,RGB(51,153,255));
DRAWBAND(量比超5,RGB(255,118,188),量比超5+0.015,RGB(255,118,188)); }
S2:=SMA(C,2,1); S6:=SMA(C,6,1);
DK:=2*(S2-S6);
STICKLINE(DK>0,RC,RC+DK,0,1),COLORRED;
STICKLINE(DK<0,RC,RC+DK,0,1),COLORCYAN;
分时顶:HHV(H,480),COLORGREEN,DOTLINE;
TT:=IF(HOUR>12,(HOUR-13)*60+MINUTE+120,(HOUR-9)*60+MINUTE-30);
IF(TT>=30,REF(HHV(H,30),TT-30),DRAWNULL),COLOR99CCFF,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR,0,0,0,CODE),COLORYELLOW;
市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));
市销率:=STRCAT(' 市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2));
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2));
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
净利润率:=STRCAT(' 净利润率 ',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
主营利润率:=STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
利润同比:=STRCAT(' 利润同比: ',CON2STR(FINANCE(43),2));
收入同比:=STRCAT(' 收入同比: ',CON2STR(FINANCE(44),2));
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X1+X2+X3+X4+X5;
预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));
财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3))));
优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));{理论上越大越好但不同行业有不同标准};
现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};
财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));
Z11:=STRCAT(HYBLOCK,' ');
Z12:=STRCAT(Z11,DYBLOCK);
Z13:=STRCAT(Z12,' ');
{DRAWTEXT_FIX(ISLASTBAR,0.5,0.75,0,STRCAT(Z13,GNBLOCK)),COLORFFFF00;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.75,0,EXTERNSTR(0,3)),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.75,0,EXTERNSTR(0,6)),COLORLIBLUE;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.75,0,EXTERNSTR(0,12)),COLORLIGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.07,0.75,0,FGBLOCK),COLORFFFF00;
DRAWTEXT_FIX(ISLASTBAR,0.07,0.75,0,EXTERNSTR(0,1)),COLORYELLOW;}

{DRAWTEXT_FIX(ISLASTBAR,0.07,0.8,0,财务系数),COLORCYAN;}

今开:DYNAINFO(4),COLORCYAN;
K10收价:=CONST(REF(C,FROMOPEN-11));
K10高价:=CONST(REF(HHV(H,10),FROMOPEN-11));
K10低价:=CONST(REF(LLV(L,10),FROMOPEN-11));
K20收价:=CONST(REF(C,FROMOPEN-21));
K20高价:=CONST(REF(HHV(H,10),FROMOPEN-21));
K20低价:=CONST(REF(LLV(L,10),FROMOPEN-21));
K30收价:=CONST(REF(C,FROMOPEN-31));
K30高价:=CONST(REF(HHV(H,10),FROMOPEN-31));
K30低价:=CONST(REF(LLV(L,10),FROMOPEN-31));
先上后下再上:=K10收价>今开&&K10收价>K20收价&&K30收价>K20收价;
DRAWTEXT_FIX(先上后下再上&&K20低价>=K10低价&&K30高价>K10高价,0.03,0.01,0,'先上后下再上:  下跌不新低,上涨新高——一般会大涨小回收阳'),COLORMAGENTA;
DRAWTEXT_FIX(先上后下再上&&K20低价>=K10低价&&K30高价<=K10高价,0.03,0.01,0,'先上后下再上:  下跌没新低,上涨没新高——多头较弱,当天的回档会持续较长时间,收盘不可能为最高点'),COLORMAGENTA;
DRAWTEXT_FIX(先上后下再上&&K20低价<K10低价&&K30高价>K10高价,0.03,0.01,0,'先上后下再上:  下跌新低,上涨新高——表明多空分歧比较大,当天震荡会较大'),COLORMAGENTA;
DRAWTEXT_FIX(先上后下再上&&K20低价<K10低价&&K30高价<=K10高价,0.03,0.01,0,'先上后下再上:  下跌新低,上涨没新高——当天的调整压力较大'),COLORMAGENTA;
先下后上再下:=K10收价<今开&&K20收价>K10收价&&K30收价<K20收价;
DRAWTEXT_FIX(先下后上再下&&K20高价>K10高价&&K30低价>=K10低价,0.03,0.01,0,'先下后上再下:  上涨新高,下跌没新低——多头势力仍较盛,当天有冲高机会,尾盘可能不在最低'),COLORYELLOW;
DRAWTEXT_FIX(先下后上再下&&K20高价<=K10高价&&K30低价>=K10低价,0.03,0.01,0,'先下后上再下:  上涨没新高,下跌没新低——调整,尾盘杀跌'),COLORYELLOW;
DRAWTEXT_FIX(先下后上再下&&K20高价>K10高价&&K30低价<K10低价,0.03,0.01,0,'先下后上再下:  上涨新高,下跌新低——冲高回落'),COLORYELLOW;
DRAWTEXT_FIX(先下后上再下&&K20高价<=K10高价&&K30低价<K10低价,0.03,0.01,0,'先下后上再下:  上涨没新高,下跌新低——探底会比较深'),COLORYELLOW;
先上后上再下:=K10收价>今开&&K10收价<K20收价&&K30收价<K20收价;
DRAWTEXT_FIX(先上后上再下&&K30低价<K10低价,0.03,0.01,0,'先上又上再下:  表明多头势力较强,但空头压力也大,弱势'),COLORRED;
DRAWTEXT_FIX(先上后上再下&&RANGE(K30收价,K10收价,K20收价)&&K30低价<=K20低价,0.03,0.01,0,'先上又上再下:  表明多头势力较强,但空头压力也大,中势'),COLORRED;
DRAWTEXT_FIX(先上后上再下&&K30低价>K20低价,0.03,0.01,0,'先上又上再下:  表明多头势力较强,但空头压力也大,强势'),COLORRED;
先下后下再上:=K10收价<今开&&K20收价<K10收价&&K30收价>K20收价;
DRAWTEXT_FIX(先下后下再上&&K30高价>今开,0.03,0.01,0,'先下又下再上:  则表明空头势力较强,但多头尚有反击余力,可能是出货行情'),COLORLIRED;
DRAWTEXT_FIX(先下后下再上&&RANGE(K30收价,K20收价,K10收价),0.03,0.01,0,'先下又下再上:  则表明空头势力较强,但多头尚有反击余力,中势'),COLORLIRED;
DRAWTEXT_FIX(先下后下再上&&K30低价>K20低价&&K30高价<K20高价,0.03,0.01,0,'先下又下再上:  则表明空头势力较强,但多头尚有反击余力,弱势'),COLORLIRED;
先上后下再下:=K10收价>今开&&K20收价<K10收价&&K30收价<K20收价;
DRAWTEXT_FIX(先上后下再下&&K20低价<K10低价&&K30低价>=K20低价,0.03,0.01,0,'先上后下再下:  第二个下跌波创新低,当天收阴线概率很大'),COLORLIRED;
DRAWTEXT_FIX(先上后下再下&&K20低价<K10低价&&K30低价<K20低价,0.03,0.01,0,'先上后下再下:  第三个下跌又创新低,行情走淡'),COLORLIRED;
DRAWTEXT_FIX(先上后下再下&&K20低价>=K10低价&&K30低价>=K10低价,0.03,0.01,0,'先上后下再下:  第二个下跌和第三个下跌不创新低(开盘价),可能是诱空'),COLORLIRED;
DRAWTEXT_FIX(先上后下再下&&RANGE(K10低价,K30低价,K20低价),0.03,0.01,0,'先上后下再下:  第三个下跌创新低,调整仍有低点'),COLORLIRED;
先下后上再上:=K10收价<今开&&K20收价>K10收价&&K30收价>K20收价;
DRAWTEXT_FIX(先下后上再上&&K20低价<K10低价&&K30低价>K20低价,0.03,0.01,0,'先下后上再上:  开盘后的向下是多头获利回吐的表现,当天行情仍可能走好。'),COLORLIRED;
DRAWTEXT_FIX(先下后上再上&&K20低价<K10低价&&K30低价<K20低价,0.03,0.01,0,'先下后上再上:  开盘后的向下是多头获利回吐的表现,当天行情仍可能走好。'),COLORLIRED;
DRAWTEXT_FIX(先下后上再上&&K20低价>=K10低价&&K30低价>=K10低价,0.03,0.01,0,'先下后上再上:  开盘后的向下是多头获利回吐的表现,当天行情仍可能走好。'),COLORLIRED;
三步高:=K10收价>今开&&K20收价>=K10收价&&K30收价>K20收价;
三步高1:=K10收价>今开&&K20收价>K10收价&&K30收价>=K20收价;
DRAWTEXT_FIX(三步高  OR 三步高1,0.03,0.01,0,'三步高:   盘中打低吸货'),COLORLIRED;
三步低:=K10收价<今开&&K20收价<=K10收价&&K30收价<K20收价;
DRAWTEXT_FIX(三步低,0.03,0.01,0,'三步低:  盘中反弹出货'),COLORLIRED;
DRAWKLINE(IF(TIME=0941,K10高价,DRAWNULL),今开,K10低价,K10收价);
DRAWKLINE(IF(TIME=0942,K20高价,DRAWNULL),K10收价,K20低价,K20收价);
DRAWKLINE(IF(TIME=0943,K30高价,DRAWNULL),K20收价,K30低价,K30收价);
先下后下走平:=K10收价<今开&&K20收价<K10收价&&K30收价=K20收价;
DRAWTEXT_FIX(先下后下走平,0.03,0.01,0,'先下又下走平:  注意箱体方向选择,量能配合'),COLORLIRED;
先下后平再平:=K10收价<今开&&K20收价=K10收价&&K30收价=K20收价;
DRAWTEXT_FIX(先下后平再平,0.03,0.01,0,'先下后平再平:  向下振荡可能性大 '),COLORLIRED;
三平步:=K10收价=今开&&K20收价=K10收价&&K30收价=K20收价;
DRAWTEXT_FIX(三平步,0.03,0.01,0,'三平步:  '),COLORLIRED;
下上平:=K10收价<今开&&K20收价>K10收价&&K30收价=K20收价;
DRAWTEXT_FIX(下上平,0.03,0.01,0,'下上平:  盘整,注意箱体突破方向,量能的配合 '),COLORLIRED;
下平上:=K10收价<今开&&K20收价=K10收价&&K30收价>K20收价;
DRAWTEXT_FIX(下平上,0.03,0.01,0,'下平上:  上涨概率高 '),COLORLIRED;

O5:="分时顶引用.O5#DAY";
C5:="分时顶引用.C5#DAY";
H5:="分时顶引用.H5#DAY";
L5:="分时顶引用.L5#DAY";
O4:="分时顶引用.O4#DAY";
C4:="分时顶引用.C4#DAY";
H4:="分时顶引用.H4#DAY";
L4:="分时顶引用.L4#DAY";
O3:="分时顶引用.O3#DAY";
C3:="分时顶引用.C3#DAY";
H3:="分时顶引用.H3#DAY";
L3:="分时顶引用.L3#DAY";
O2:="分时顶引用.O2#DAY";
H2:="分时顶引用.H2#DAY";
L2:="分时顶引用.L2#DAY";
O1:="分时顶引用.O1#DAY";
C1:="分时顶引用.C1#DAY";
H1:="分时顶引用.H1#DAY";
L1:="分时顶引用.L1#DAY";
O0:=DYNAINFO(4);
C0:=DYNAINFO(7);
H0:=DYNAINFO(5);
L0:=DYNAINFO(6);
HH1:=MAX(H1,H2);
HH2:=MAX(H3,H4);
HH3:=MAX(MAX(H0,H5),MAX(HH1,HH2));
LL1:=MIN(L1,L2);
LL2:=MIN(L3,L4);
LL3:=MIN(MIN(L0,L5),MIN(LL1,LL2));
HL:=409/(HH3-LL3);
C52:=999-((C5-LL3)*HL);
H52:=999-((H5-LL3)*HL);
L52:=999-((L5-LL3)*HL);
O52:=999-((O5-LL3)*HL);
C42:=999-((C4-LL3)*HL);
H42:=999-((H4-LL3)*HL);
L42:=999-((L4-LL3)*HL);
O42:=999-((O4-LL3)*HL);
C32:=999-((C3-LL3)*HL);
H32:=999-((H3-LL3)*HL);
L32:=999-((L3-LL3)*HL);
O32:=999-((O3-LL3)*HL);
C22:=999-((C2-LL3)*HL);
H22:=999-((H2-LL3)*HL);
L22:=999-((L2-LL3)*HL);  
O22:=999-((O2-LL3)*HL);
C12:=999-((C1-LL3)*HL);
H12:=999-((H1-LL3)*HL);
L12:=999-((L1-LL3)*HL);  
O12:=999-((O1-LL3)*HL);
C02:=999-((C0-LL3)*HL);
H02:=999-((H0-LL3)*HL);
L02:=999-((L0-LL3)*HL);
O02:=999-((O0-LL3)*HL);
DRAWRECTREL(IF(FROMOPEN<=120,579,79),H52,IF(FROMOPEN<=120,579,79),L52,RGB(IF(C5>=O5,900,0),IF(C5>=O5,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,574,74),C52,IF(FROMOPEN<=120,584,84),O52,RGB(IF(C5>=O5,728,0),IF(C5>=O5,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,591,91),H42,IF(FROMOPEN<=120,591,91),L42,RGB(IF(C4>=O4,900,0),IF(C4>=O4,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,586,86),C42,IF(FROMOPEN<=120,596,96),O42,RGB(IF(C4>=O4,728,0),IF(C4>=O4,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,603,103),H32,IF(FROMOPEN<=120,603,103),L32,RGB(IF(C3>=O3,900,0),IF(C3>=O3,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,598,98),C32,IF(FROMOPEN<=120,608,108),O32,RGB(IF(C3>=O3,728,0),IF(C3>=O3,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,615,115),H22,IF(FROMOPEN<=120,615,115),L22,RGB(IF(C2>=O2,900,0),IF(C2>=O2,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,610,110),C22,IF(FROMOPEN<=120,620,120),O22,RGB(IF(C2>=O2,728,0),IF(C2>=O2,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,627,127),H12,IF(FROMOPEN<=120,627,127),L12,RGB(IF(C1>=O1,900,0),IF(C1>=O1,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,622,122),C12,IF(FROMOPEN<=120,632,132),O12,RGB(IF(C1>=O1,728,0),IF(C1>=O1,0,728),0));
DRAWRECTREL(IF(FROMOPEN<=120,639,139),H02,IF(FROMOPEN<=120,639,139),L02,RGB(IF(C0>=O0,900,0),IF(C0>=O0,0,900),0));
DRAWRECTREL(IF(FROMOPEN<=120,634,134),C02,IF(FROMOPEN<=120,644,144),O02,RGB(IF(C0>=O0,728,0),IF(C0>=O0,0,728),0));
大运旺旺旺
Lv.2
发表于 2020-2-11 16:42 复制 查看全部楼层
通不过。 辛苦老师改下
注册111
Lv.6
发表于 2020-2-11 16:39 复制 查看全部楼层
要有引用主力买卖盘,分时引用等公式
您需要登录后才可以回帖 免费注册登录

本版积分规则

回顶部 到页底
快速回复 返回顶部 返回列表