P:=2;
分时底:LLV(L,480),COLORGREEN,DOTLINE;
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORYELLOW;
黄金卖点:=EMA(C+(H-L)*0.618,3);
黄金买点:=EMA((O+H+L)/3,4);
预测明买:=EMA((O+H+L)/3,4)+((H+L)/2-REF((O+H+L)/3,3))/4,NODRAW;
预测明卖:=EMA(C+(H-L)*0.618,3)+(EMA(C+(H-L)*0.618,3)-黄金买点)*0.618;
今买:=REF(预测明买,1),NODRAW;
今卖:=REF(预测明卖,1),NODRAW;
{分时_日线两用主图}
NN:=250;
最高:=CONST(HHV(H,NN));
最低:=CONST(LLV(L,NN));
RCC2:=最高*0.9-(最高-最低);
RCC1:=最高-(最高-最低)/2;
RHL:=RCC2;
HLMAX:=最高;
HLMIN:=最低;
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=HLMAX-HLMIN;
HLMN3:=(100-0)/2*1.3;
HLMN4:=(100-0)/1*1.3;
{时间设置}
CC:=CLOSE,COLORWHITE,LINETHICK2;
VAR7:=SMA(CC,6.18,1);
VAR8:=SMA(VAR7,3.14,1);
BB:=ATAN(VAR7-REF(VAR7,1))*3.1416*10,NODRAW,COLORWHITE;
EE:=ATAN(VAR8-REF(VAR8,1))*3.1416*10,NODRAW,COLORWHITE;
【立度】:BB+EE,NODRAW,COLORYELLOW;
TJ:=FILTER(C,239) 0,NODRAW;
TJJ:=SUM(TJ,0),NODRAW;
TJA:=CONST(TJJ),NODRAW;
LTA:=FINANCE(7)+300000000;
GB:=2*IF(FINANCE(7) 100000000000,FLOOR(ABS((FINANCE(7)/1000000000-1))),FLOOR(ABS((FINANCE(7)/1000000000-1)))/10),NODRAW ;
C8:=CLOSE;
V1:=TIME;
A1:=COUNT(BARSCOUNT(C)=1 AND TIME 102000 ,0 );
T:=IF(V1 130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)),
(FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000))),NODRAW;
TTA:=INTPART(2*T/5)+20;
{强弱界}
MMA30:=EMA(CLOSE,30);
强弱界定:=IF(PERIOD=0 ,EMA(CLOSE,900),DRAWNULL);
DRAWBAND(MMA30,RGB(100,0,0),强弱界定,RGB(95,120,115));
RCC:=IF(PERIOD=0 ,DYNAINFO(3),DYNAINFO(3)*0.9);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=4*(S2-S6);
KK:=1;
{分时MACD}
昨收:=RCC;
HH:=DYNAINFO(5);
LL:=DYNAINFO(6);
FK:=MAX(HH-昨收,昨收-LL)*0.1;
ZS:=昨收-FK*3.2;
Q1:=昨收-FK*3.22;
Q2:=昨收-2*FK*3.22;
Q3:=昨收-3*FK*3.2;
DIF:=(EMA(CLOSE,13) - EMA(CLOSE,24));
DEA:=(EMA(DIF,6));
MACD:=5*(DIF-DEA);
{多头MACD}
DIFF:=EMA(CLOSE,240)-EMA(CLOSE,240)*100;
DEAA:=EMA(DIFF,18);
多头MACD:=(-3*(DIFF-DEAA))*20,NODRAW;
ZD:=HHV(多头MACD,0);
ZX:=LLV(多头MACD,0);
CZ:=(Q2-Q3)/6;
FDM:=MAX(ABS(ZD),ABS(ZX))*1.5;
RB:=IF(PERIOD=0 ,(Q2+Q3)/2+2*(Q2-Q3)/3/FDM*多头MACD,DRAWNULL);
STICKLINE(PERIOD=0 AND 多头MACD 0,RB,(Q2+Q3)/2,4,1),LINETHICK1,COLORFF00FF;
STICKLINE(PERIOD=0 AND 多头MACD 0,RB,(Q2+Q3)/2,4,1),LINETHICK1,COLOR00FF00;
{火焰山及底部信号}
EEEE:=IF((P 2 AND PERIOD!=0) OR PERIOD=0 ,(RCC-ZS)/5,DRAWNULL);
FVAR1:=REF(LOW,1);
FVAR2:=SMA(ABS(LOW-FVAR1),13,1)/SMA(MAX(LOW-FVAR1,0),13,1);
FVAR3:=EMA(FVAR2,13);
FVAR4:=LLV(LOW,34);
FVAR51:=EMA(IF(LOW =FVAR4,FVAR3,0),3);
FVAR5:=IF(FVAR51 20,20,FVAR51);
主力进场:STICKLINE(FVAR5 REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE,4,0 ),COLORRED;
STICKLINE(C 0 AND PERIOD!=0 AND FVAR5 REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE*3,4,0 ),COLOR0000BB;
STICKLINE(FVAR5 REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE,5,1),COLORGREEN;
STICKLINE(C 0 AND PERIOD!=0 AND FVAR5 REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE*3,5,1),COLORGREEN;
FVAR6:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-
LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
FVAR7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV
(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
FVAR8:=FVAR6 REF(FVAR7,1) AND VOL REF(VOL,1) AND CLOSE REF(CLOSE,1);
DRAWTEXT(TJA 3 AND FVAR8 AND COUNT(FVAR8,30)=1,(Q2+Q3)/2+3*EEEE,'★迹');
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA =0));
二次金叉:=CROSS(DIF,DEA) AND DEA 0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,(Q2+Q3)/2,(Q2+Q3)/2+3*EEEE,4,0),COLOR00FFFF;
DRAWTEXT(TJA 3 AND 二次金叉,(Q2+Q3)/2+4*EEEE,' 二金'),COLORYELLOW;
HHH:=MA(CLOSE,10);
GGG:=MA(CLOSE,12);
上:=EMA((MA(HIGH,3) * 1.05),30);
下:=EMA((MA(LOW,3) * 0.96),30);
决战:STICKLINE((((CROSS(DIF,DEA) AND ((下 - REF(下,1)) 0)) AND (MACD = REF(MACD,1))) AND
(DIF 0)),(Q2+Q3)/2,(Q2+Q3)/2+4*EEEE,1,0),COLOR0000FF;
DRAWTEXT(TJA 3 AND (((CROSS(DIF,DEA) AND ((下 - REF(下,1)) 0)) AND (MACD = REF(MACD,1))) AND (DIF
= 0)),(Q2+Q3)/2+5*EEEE,'DIF金叉'),COLOR0000FF;
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';
C2:='分时引.C2#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:=999/(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(888,H52,888,L52,RGB(IF(C5 =O5,200,0),IF(C5 =O5,0,200),0));
DRAWRECTREL(880,C52,896,O52,RGB(IF(C5 =O5,128,0),IF(C5 =O5,0,128),0));
DRAWRECTREL(908,H42,908,L42,RGB(IF(C4 =O4,200,0),IF(C4 =O4,0,200),0));
DRAWRECTREL(900,C42,916,O42,RGB(IF(C4 =O4,128,0),IF(C4 =O4,0,128),0));
DRAWRECTREL(928,H32,928,L32,RGB(IF(C3 =O3,200,0),IF(C3 =O3,0,200),0));
DRAWRECTREL(920,C32,936,O32,RGB(IF(C3 =O3,128,0),IF(C3 =O3,0,128),0));
DRAWRECTREL(948,H22,948,L22,RGB(IF(C2 =O2,200,0),IF(C2 =O2,0,200),0));
DRAWRECTREL(940,C22,956,O22,RGB(IF(C2 =O2,128,0),IF(C2 =O2,0,128),0));
DRAWRECTREL(968,H12,968,L12,RGB(IF(C1 =O1,200,0),IF(C1 =O1,0,200),0));
DRAWRECTREL(960,C12,976,O12,RGB(IF(C1 =O1,128,0),IF(C1 =O1,0,128),0));
DRAWRECTREL(987,H02,987,L02,RGB(IF(C0 =0,200,0),IF(C0 =O,0,200),0));
DRAWRECTREL(996,C02,978,O02,RGB(IF(C0 =0,128,0),IF(C0 =O,0,128),0));
H8:=MAX(DYNAINFO(3),DYNAINFO(5));
L8:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H8-L8;
阻力:L8+P1*7/8,COLORGREEN;
支撑:L8+P1*0.5/8,COLORCYAN;
中:(支撑+阻力)/2,COLORWHITE,POINTDOT;
现价:CLOSE,COLORWHITE,LINETHICK1;
Z11:=STRCAT(HYBLOCK,' ');
Z22:=STRCAT(Z11,DYBLOCK);
Z33:=STRCAT(Z22,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z33,GNBLOCK)),COLOR00C0C0;
MR:=C 支撑 AND CROSS(C,REF(C,2));
DRAWTEXT(CROSS(现价,支撑),中,'买'),COLORRED;
DRAWICON(MR=1 OR CROSS(现价,支撑),中,1);
DRAWTEXT(CROSS(支撑,现价),(支撑-中)/5+支撑,'底'),COLORYELLOW;
MC:=C 阻力 AND CROSS(REF(C,2),C);
DRAWTEXT(CROSS(阻力,现价),中,'卖'),COLORGREEN;
DRAWICON(MC=1 OR CROSS(阻力,现价),中,2);
DRAWTEXT(CROSS(现价,阻力),阻力-(支撑-中)/5,'顶'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,阻力,STRCAT('顶:',CON2STR(阻力,2))),COLORGREEN;
DRAWTEXT(ISLASTBAR,支撑,STRCAT('底:',CON2STR(支撑,2))),COLORRED;
DRAWTEXT(ISLASTBAR,(支撑+阻力)/2,STRCAT('中:',CON2STR(中,2))),COLORWHITE;
MA5:='LOOK.MA5#DAY';
MA10:='LOOK.MA10#DAY';
MA20:='LOOK.MA20#DAY';
MA30:='LOOK.MA30#DAY';
MA60:='LOOK.MA60#DAY';
MA120:='LOOK.MA120#DAY';
MA250:='LOOK.MA250#DAY';
DRAWTEXT_FIX(1,0.68,0.75,0,STRCAT('MA5: ',CON2STR(MA5,2))),COLORWHITE;
DRAWTEXT_FIX(1,0.68,0.80,0,STRCAT('MA10: ',CON2STR(MA10,2))),COLORYELLOW;
DRAWTEXT_FIX(1,0.68,0.85,0,STRCAT('MA20: ',CON2STR(MA20,2))),COLORMAGENTA;
DRAWTEXT_FIX(1,0.68,0.90,0,STRCAT('MA60: ',CON2STR(MA60,2))),COLORGREEN;
成交额:=V*C/100,NODRAW;{万元}
A2:=SUM((IF(((成交额/8 20) AND (CLOSE (REF(CLOSE,1)))),成交额,0)),0);
A3:=SUM((IF(((成交额/8 20) AND (CLOSE (REF(CLOSE,1)))),成交额,0)),0);
A4:=SUM((IF(((成交额/8 20) AND (CLOSE (REF(CLOSE,1)))),成交额,0)),0);
A5:=SUM((IF(((成交额/8 20) AND (CLOSE (REF(CLOSE,1)))),成交额,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((ISLASTBAR),((100*A2)/A6),0);
A8:=IF((ISLASTBAR),((100*A3)/A6),0);
A9:=IF((ISLASTBAR),((100*A4)/A6),0);
A10:=IF((ISLASTBAR),((100*A5)/A6),0);
机构买:=(A2),NODRAW;
机构卖:=(A3),NODRAW;
机构进出:=机构买-机构卖,NODRAW;
散户买:=(A4),COLOR5555FF,NODRAW;
散户卖:=(A5),COLOR55FF55,NODRAW;
散户进出:=散户买-散户卖,NODRAW;
尽流入:=机构进出+散户进出,NODRAW;
强势:=((100*A2)/A6 50),NODRAW;
拉升:=((100*A2)/A6-(100*A3)/A6) 18 AND (100*A2)/A6-(100*A5)/A6
Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05,0.95);
Q7:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))));
DD1:=1;
AAA1:=STRCAT(STRCAT('机构买入',CON2STR((100*A2)/A6,0)),'%');
AAA2:=STRCAT(STRCAT('机构卖出',CON2STR((100*A3)/A6,0)),'%');
AAA3:=STRCAT(STRCAT('散户买入',CON2STR((100*A4)/A6,0)),'%');
AAA4:=STRCAT(STRCAT('散户卖出',CON2STR((100*A5)/A6,0)),'%');
AAA5:=STRCAT(STRCAT('净流入',CON2STR((尽流入),0)),'万元');
DRAWTEXT_FIX(DD1=1,0.01,0.99,0,AAA1),COLORRED;
DRAWTEXT_FIX(DD1=1,0.08,0.99,0,AAA2),COLOR00FF00;
DRAWTEXT_FIX(DD1=1,0.16,0.99,0,AAA3),COLORRED;
DRAWTEXT_FIX(DD1=1,0.25,0.99,0,AAA4),COLOR00FF00;
DRAWTEXT_FIX(DD1=1,0.33,0.99,0,AAA5),COLORRED;{量能饱和度}
N1:=10,100,34;
N2:=N1*1.05;
N3:=N1+3;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
AAA0:=STRCAT(STRCAT('机构总买入',CON2STR((100*(A2-A3))/A6,0)),'%');
DRAWTEXT_FIX(DD1=1,0.42,0.99,0,AAA0),LINETHICK5,COLORCYAN;
AAA7:=STRCAT(STRCAT('散户总买入',CON2STR((100*(A4-A5))/A6,0)),'%');
DRAWTEXT_FIX(DD1=1,0.50,0.99,0,AAA7),LINETHICK5,COLORCYAN;
{MACD主图} {技术指标--其他类型}{主图指标}
VAR0 := EMA(C,12) - EMA(C,26);
VAR1 := EMA(VAR0,9);
VAR2 := 2 * (VAR0 - VAR1);
JJ : (SUM(C * VOL,0)) / SUM(VOL,0),COLORYELLOW;
VAR3 := DYNAINFO(3) * 0.97;
STICKLINE(VAR2 0,(VAR2 * 4) + VAR3,VAR3,0,0),COLOR4000CC;
STICKLINE(VAR2 0,(VAR2 * 4) + VAR3,VAR3,0,0),COLOR996633;
ZDIF : (VAR0 * 4) + VAR3,COLOR339999;
ZDEA : (VAR1 * 4) + VAR3,COLOR999999;
DRAWTEXT_FIX(1,0.50,0.002,0,STRCAT('阻力: ',CON2STR(阻力,2))),COLORGREEN;
DRAWTEXT_FIX(1,0.40,0.002,0,STRCAT('支撑: ',CON2STR(支撑,2))),COLORRED;