TAG:公式

{主图-【分割套装】--作者:AHFYXL 保密:)}
{◎¥〖〗【】↙↖← → ↑ ↓●○▼▽▲△◆◇■□★☆¤⊙※^_^ ^o^ ^O^ @_@ ^&^♂♀ ヲ ︼ ◎Ψ①②③④⑤⑥}

INPUT:显示(0,0,2);
DRAWGBK((DATE > 0),COLORRGB(0,33,0),COLORRGB(0,33,0),1);

{立体K线}
STICKLINE(C<O||C=O&&C<=REF(C,1),L,H,0,0),COLORCYAN; STICKLINE(C<O||C=O&&C<=REF(C,1),O,C,8,0),COLORCYAN;
STICKLINE(O>=C,C,O,7,0 ),COLOR009900; STICKLINE(O>=C,C,O,6,0 ),COLOR00AA00; STICKLINE(O>=C,C,O,5,0 ),COLOR00BB00;
STICKLINE(O>=C,C,O,4,0 ),COLOR00CC00; STICKLINE(O>=C,C,O,3,0 ),COLOR00DD00; STICKLINE(O>=C,C,O,2,0 ),COLOR00EE00;
STICKLINE(C>O||C=O&&C>REF(C,1),L,H,0,0),COLORRED; STICKLINE(C>OPEN||C=O&&C>REF(C,1),O,C,8,0),COLORRED;
STICKLINE(C>O,C,O,7,0),COLORFF22FF; STICKLINE(C>O,C,O,6,0),COLORFF44FF; STICKLINE(C>O,C,O,5,0),COLORFF66FF;
STICKLINE(C>O,C,O,4,0),COLORFF88FF; STICKLINE(C>O,C,O,3,0),COLORFF99FF; STICKLINE(C>O,C,O,2,0),COLORFFAAFF;

{阻撑位}
W_1:=cost(2); W_2:=cost(20); W_3:=(W_1+W_2)/2; W_4:=cost(40); W_5:=(W_2+W_4)/2; W_6:=cost(60);
W_7:=(W_4+W_6)/2; W_8:=cost(85); W_9:=(W_6+W_8)/2; W_10:=cost(99); W_11:=(W_8+W_10)/2; W_12:=W_10-W_8;
W_13:=W_8-W_6; W_14:=W_6-W_4; W_15:=W_4-W_2; W_16:=W_2-W_1;
W_17:=MIN(MIN(MIN(MIN(W_12,W_13),W_14),W_15),W_16);
W_18:=IF(MIN(MIN(W_12,W_13),W_14),MIN(MIN(W_12,W_13),W_14),MIN(W_15,W_16));
W_19:=IF(W_12=W_17,W_13,IF(W_13=W_17,W_12,IF(W_14=W_17,W_15,if(W_15=W_17,W_16,W_15)))); W_20:=MIN(W_19,W_18);
阻撑一:if(W_12=W_20,W_11,if(W_13=W_20,W_9,if(W_14=W_20,W_7,if((W_15=W_20),W_5,if(W_16=W_20,W_3,0))))),LINETHICK,PRECISION2,COLORMAGENTA;
阻撑二:if(W_12=W_17,W_11,if(W_13=W_17,W_9,if(W_14=W_17,W_7,if(W_15=W_17,W_5,if(W_16=W_17,W_3,0))))),LINETHICK,PRECISION2,COLORYELLOW;
PARTLINE(显示=0,阻撑一),COLORMAGENTA;
PARTLINE(显示=0,阻撑二),COLORYELLOW;
{======= 点石成金 =======}
P:=SYSPARAM(1); P1:=SYSPARAM(2); P2:=SYSPARAM(3); P3:=SYSPARAM(4); P4:=SYSPARAM(5);
Cj_Z:=barslast(P=barpos)+1;
Cj_H:=IF(c>100,SUM(h*V,Cj_z)/SUM(V,Cj_z),sum(AMOUNT,Cj_z)/sum(v,Cj_z)/100*SUM(H,Cj_z)/SUM(C,Cj_z));//点石成金H
Cj_L:=IF(c>100,SUM(l*V,Cj_z)/SUM(V,Cj_z),sum(AMOUNT,Cj_z)/sum(v,Cj_z)/100*SUM(L,Cj_z)/SUM(C,Cj_z));//点石成金L
点石成金:=if(ref(h,Cj_z-1)>ref(h,Cj_z) and ref(h,Cj_z-1)>ref(h,Cj_z-2),Cj_h,Cj_l);//点石成金
偏离:=(C-点石成金)/点石成金*100;
PARTLINE(显示=0,点石成金),COLORCYAN;//点石成金线
bc:=barslast(P=barpos)+1;
DRAWTEXT(BARPOS=P2&&显示=0,点石成金[DATACOUNT],' 点石成金 '+NUMTOSTR(点石成金[DATACOUNT],2)+' 元'),PXUP26,Color009A00;
DRAWTEXT(ISLASTBAR&&显示=0,点石成金,'偏离 '+NUMTOSTR(偏离[DATACOUNT],1)+'%'),SHIFT1,PXDN30,Color00DBD9;
{======= 黄金分割线+江恩八分线 =======}
hh:=hhv(H,P2-P1+1); ll:=llv(L,P2-P1+1); 最高:=hh[P2];最低:=ll[P2];
{}
PARTLINE(显示<>2,最高),COLORYELLOW;
PARTLINE(显示<>2,最低),COLORRED;
PARTLINE(显示=0,最低+(最高-最低)*0.191),LINEDOT,COLORWHITE;
PARTLINE(显示=0,最低+(最高-最低)*0.382),LINEDOT,COLORWHITE;
PARTLINE(显示<>2,最低+(最高-最低)*0.5),COLORGREEN;
PARTLINE(显示=0,最低+(最高-最低)*0.618),LINEDOT,COLORWHITE;
PARTLINE(显示=0,最低+(最高-最低)*0.809),LINEDOT,COLORWHITE;
DRAWTEXT(BARSCOUNT(C)=P2&&显示<>2,REF(最低,BARSLAST(BARSCOUNT(C)=P1)),'最低↓'),ALIGN2,COLORred;
DRAWTEXT(BARSCOUNT(C)=P2&&显示<>2,REF(最高,BARSLAST(BARSCOUNT(C)=P1)),'最高↑'),ALIGN2,COLORYELLOW;
DRAWTEXT(BARPOS=P1&&显示=0,REF((最低+(最高-最低)*0.191)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'黄金 0.191↑'+NUMTOSTR(最低+(最高-最低)*0.191,2)),COLORWHITE;
DRAWTEXT(BARPOS=P1&&显示=0,REF((最低+(最高-最低)*0.382)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'黄金 0.382↑'+NUMTOSTR(最低+(最高-最低)*0.382,2)),COLORWHITE;
DRAWTEXT(BARPOS=P1&&显示<>2,REF((最低+(最高-最低)*0.5)*0.996,BARSLAST(BARSCOUNT(C)=P1)),' 50% ↑'+NUMTOSTR(最低+(最高-最低)*0.5,2)),COLORGREEN;
DRAWTEXT(BARPOS=P1&&显示=0,REF((最低+(最高-最低)*0.618)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'黄金 0.618↑'+NUMTOSTR(最低+(最高-最低)*0.618,2)),COLORWHITE;
DRAWTEXT(BARPOS=P1&&显示=0,REF((最低+(最高-最低)*0.809)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'黄金 0.809↑'+NUMTOSTR(最低+(最高-最低)*0.809,2)),COLORWHITE;
{}
PARTLINE(显示=1,最低+(最高-最低)*1/8),LINEDOT,Color0095BC;
PARTLINE(显示=1,最低+(最高-最低)*1/4),LINEDOT,Color0095BC;
PARTLINE(显示=1,最低+(最高-最低)*3/8),LINEDOT,Color0095BC;
PARTLINE(显示=1,最低+(最高-最低)*5/8),LINEDOT,Color0095BC;
PARTLINE(显示=1,最低+(最高-最低)*7/8),LINEDOT,Color0095BC;
PARTLINE(显示=1,最低+(最高-最低)*3/4),LINEDOT,Color0095BC;
DRAWTEXT(BARPOS=P1&&显示=1,REF((最低+(最高-最低)*1/8)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'江恩 1/8↑'+NUMTOSTR(最低+(最高-最低)*1/8,2)),Color0095BC;
DRAWTEXT(BARPOS=P1&&显示=1,REF((最低+(最高-最低)*1/4)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'江恩 1/4↑'+NUMTOSTR(最低+(最高-最低)*1/4,2)),Color0095BC;
DRAWTEXT(BARPOS=P1&&显示=1,REF((最低+(最高-最低)*3/8)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'江恩 3/8↑'+NUMTOSTR(最低+(最高-最低)*3/8,2)),Color0095BC;
DRAWTEXT(BARPOS=P1&&显示=1,REF((最低+(最高-最低)*5/8)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'江恩 5/8↑'+NUMTOSTR(最低+(最高-最低)*5/8,2)),Color0095BC;
DRAWTEXT(BARPOS=P1&&显示=1,REF((最低+(最高-最低)*7/8)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'江恩 7/8↑'+NUMTOSTR(最低+(最高-最低)*7/8,2)),Color0095BC;
DRAWTEXT(BARPOS=P1&&显示=1,REF((最低+(最高-最低)*3/4)*0.996,BARSLAST(BARSCOUNT(C)=P1)),'江恩 3/4↑'+NUMTOSTR(最低+(最高-最低)*3/4,2)),Color0095BC;