金字塔趨勢力道線
{CHECK:=STRCMP(UPPERSTR(STRLEFT(LOGINID,2)),'PC');
CHECK1:=STRCMP(UPPERSTR(STRLEFT(LOGINID,5)),'PU003');
CHECK2:=STRCMP(UPPERSTR(STRLEFT(LOGINID,5)),'PT078');
CHECK3:=STRCMP(UPPERSTR(STRLEFT(LOGINID,5)),'PT083');
CHECK4:=STRCMP(UPPERSTR(STRLEFT(LOGINID,5)),'PT052');
CHECK5:=STRCMP(UPPERSTR(STRLEFT(LOGINID,5)),'PT053');
CHECK6:=STRCMP(UPPERSTR(STRLEFT(LOGINID,5)),'T8209');
CHECK7:=STRCMP(UPPERSTR(STRLEFT(LOGINID,6)),'TL3007');
AAA:=IF((CHECK=0 OR CHECK1=0 OR CHECK2=0 OR CHECK3=0 OR CHECK4=0 OR CHECK5=0 OR CHECK6=0 OR CHECK7=0) AND TT=1,1,0);}
E:=(OPEN+HIGH+LOW+CLOSE*2)/5;
Z:=(HIGH+LOW+CLOSE)/3;
X:=(HIGH+LOW+CLOSE*2)/4;
BB1:=EMA(SLOPE(X,2)*1.78+X,2);
X1:=(BB1*2+X)/3.0005;
BB2:=EMA(SLOPE(X,2)*1.3+X,2);
XX2:=(BB2*2+(X+E+Z)/3)/3.0015;
X2:=(E+XX2*2)/3{*AAA};
HL:=EMA(HIGH,6);
LL:=EMA(LOW,6);
XX:=IF(CLOSE>HL,X1,X2);
CH:=CROSS(XX,HL);
CL:=-CROSS(LL,XX);
TF:=IF(CH,CH,IF(CROSS(LL,XX),CL,0));
UD:=REF(TF,BARSLAST(TF));
控盤線:=IF(UD>0,LL,HL);
多空價:=ROUND(控盤線);
STICKLINE(XX>多空價 {AND AAA},HIGH,LOW,1,0),colorFF;
STICKLINE(XX>多空價 {AND AAA},CLOSE,OPEN,7,0),colorFF;
STICKLINE(XX<多空價 {AND AAA},HIGH,LOW,0.1,0),colorFF00;
STICKLINE(XX<多空價 {AND AAA},CLOSE,OPEN,7,0),colorFF00;
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,6,1);
金字塔:=K-D;
SARN:=SAR(7,4,15);
金字塔1:=CLOSE-SARN;
DIFF:=EMA(CLOSE,8)-EMA(CLOSE,24);
DEA:=EMA(DIFF,8);
金字塔2:=2*(DIFF-DEA);
DRAWICON({AAA AND }金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔,1)<0,LOW,'b'),ALIGN0,PXDN40;
DRAWICON({AAA AND 金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔1,1)<0,LOW,'b'),ALIGN0,PXDN40;
DRAWICON(AAA AND} 金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔2,1)<0,LOW,'b'),ALIGN0,PXDN40;
EXPLAINICON({AAA AND }金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔,1)<0,'b');
EXPLAINICON({AAA AND }金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔1,1)<0,'b');
EXPLAINICON({AAA AND }金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔2,1)<0,'b');
A11:=BARSLAST(金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔,1)<0);
A12:=BARSLAST( 金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔1,1)<0);
A13:=BARSLAST( 金字塔>0 AND 金字塔1>0 AND 金字塔2>0 AND REF(金字塔2,1)<0);
PLAYSOUND(REF(A11,1)=0,0,'eff06');
PLAYSOUND(REF(A12,1)=0,0,'eff06');
PLAYSOUND(REF(A13,1)=0,0,'eff06');
DRAWICON(金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔,1)>0,HIGH,'s'),ALIGN0,PXUP40;
DRAWICON( 金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔1,1)>0,HIGH,'s'),ALIGN0,PXUP40;
DRAWICON( 金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔2,1)>0,HIGH,'s'),ALIGN0,PXUP40;
EXPLAINICON( 金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔,1)>0,'s');
EXPLAINICON( 金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔1,1)>0,'s');
EXPLAINICON( 金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔2,1)>0,'s');
B11:=BARSLAST( 金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔,1)>0);
B12:=BARSLAST( 金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔1,1)>0);
B13:=BARSLAST( 金字塔<0 AND 金字塔1<0 AND 金字塔2<0 AND REF(金字塔2,1)>0);
X:=BARSCOUNT(CLOSE);
STICKLINE(ISEQUAL AND X=1,HIGH,LOW,0.1,0),color5050FF;
STICKLINE(ISEQUAL AND X=1,CLOSE,OPEN,7,0),color5050FF;
RC:=REF(CLOSE,1);
XA:=IF(RC>HIGH,RC,0);
XB:=IF(HIGH>=RC AND RC>LOW,HIGH,0);
XC:=IF(RC<=LOW,HIGH,0);
XD:=XA+XB+XC;
YA:=IF(RC>HIGH,LOW,0);
YB:=IF(HIGH>=RC AND RC>LOW,LOW,0);
YC:=IF(RC<=LOW,RC,0);
YD:=YA+YB+YC;
ATR:=SMA(XD-YD,20,1);
STDH:=EMA(CLOSE,20)+2*ATR;
STDL:=EMA(CLOSE,20)-2*ATR;
MIU:=(STDH+STDH+STDH+STDL)/4;
MID:=(STDH+STDL+STDL+STDL)/4;
PARTLINE(CLOSE>0 ,STDH),LINETHICK3,colorFF0000;
PARTLINE(CLOSE>0 ,MIU),LINETHICK1,colorFF0000;
PARTLINE(CLOSE>0 ,STDL),LINETHICK3,colorFF00FF;
PARTLINE(CLOSE>0 ,MID),LINETHICK1,colorFF00FF;
//
input:p(20),n(8,1,100);
var0:=md(c,p);
PARTLINE(var0>ref(var0,2),var0), COLORRED, LINETHICK2;
PARTLINE(var0<ref(var0,2),var0), COLORGREEN, LINETHICK2;
PARTLINE(abs(var0-ref(var0,1))/var0*10000<n,var0), COLORBLUE, LINETHICK2;
嗣諾岊盄:(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,15)+MA(CLOSE,20))/4,colorred;
PARTLINE(嗣諾岊盄>REF(嗣諾岊盄,1),嗣諾岊盄),colorred,linethick2;
PARTLINE(嗣諾岊盄<REF(嗣諾岊盄,1),嗣諾岊盄),colorgreen,linethick2;
//
E:=(OPEN+HIGH+LOW+CLOSE*2)/5;
Z:=(HIGH+LOW+CLOSE)/3;
X:=(HIGH+LOW+CLOSE*2)/4;
BB1:=EMA(SLOPE(X,2)*1.78+X,2);
X1:=(BB1*2+X)/3.0005;
BB2:=EMA(SLOPE(X,2)*1.3+X,2);
XX2:=(BB2*2+(X+E+Z)/3)/3.0015;
X2:=(E+XX2*2)/3;
HL:=EMA(HIGH,6);
LL:=EMA(LOW,6);
XX:=IF(CLOSE>HL,X1,X2);
CH:=CROSS(XX,HL);
CL:=-CROSS(LL,XX);
TF:=IF(CH,CH,IF(CROSS(LL,XX),CL,0));
UD:=REF(TF,BARSLAST(TF));
控盤線:=IF(UD>0,LL,HL);
多空價:=ROUND(控盤線);
STICKLINE(XX>多空價 ,HIGH,LOW,1,0),colorFF;
STICKLINE(XX>多空價 ,CLOSE,OPEN,7,0),colorFF;
STICKLINE(XX<多空價 ,HIGH,LOW,0.1,0),colorFF00;
STICKLINE(XX<多空價 ,CLOSE,OPEN,7,0),colorFF00;
HHD:=HHV(HIGH,100);
LLD:=LLV(LOW,100);
XX:=UBOUND(HHD);
HD:=HHD[XX];
YY:=UBOUND(LLD);
LD:=LLD[YY];
STICKLINE(ISLASTBAR ,LD+(HD-LD)/3,LD+(HD-LD)/3,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,1) ,LD+(HD-LD)/3,LD+(HD-LD)/3,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,2) ,LD+(HD-LD)/3,LD+(HD-LD)/3,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,3) ,LD+(HD-LD)/3,LD+(HD-LD)/3,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,4) ,LD+(HD-LD)/3,LD+(HD-LD)/3,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,5) ,LD+(HD-LD)/3,LD+(HD-LD)/3,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,6) ,LD+(HD-LD)/3,LD+(HD-LD)/3,12,1),LINETHICK2,colorFFFF;
DRAWNUMBER(ISLASTBAR ,LD+(HD-LD)/3,LD+(HD-LD)/3,2),SHIFT2;
STICKLINE(ISLASTBAR ,LD+(HD-LD)/2,LD+(HD-LD)/2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,1) ,LD+(HD-LD)/2,LD+(HD-LD)/2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,2) ,LD+(HD-LD)/2,LD+(HD-LD)/2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,3) ,LD+(HD-LD)/2,LD+(HD-LD)/2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,4) ,LD+(HD-LD)/2,LD+(HD-LD)/2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,5) ,LD+(HD-LD)/2,LD+(HD-LD)/2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,6) ,LD+(HD-LD)/2,LD+(HD-LD)/2,12,1),LINETHICK2,colorFFFF;
DRAWNUMBER(ISLASTBAR ,LD+(HD-LD)/2,LD+(HD-LD)/2,2),SHIFT2;
STICKLINE(ISLASTBAR ,LD+(HD-LD)/3*2,LD+(HD-LD)/3*2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,1) ,LD+(HD-LD)/3*2,LD+(HD-LD)/3*2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,2) ,LD+(HD-LD)/3*2,LD+(HD-LD)/3*2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,3) ,LD+(HD-LD)/3*2,LD+(HD-LD)/3*2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,4) ,LD+(HD-LD)/3*2,LD+(HD-LD)/3*2,12,1),LINETHICK2,colorFFFF;
STICKLINE(BACKSET(ISLASTBAR,5) ,LD+(HD-LD)/3*2,LD+(HD-LD)/3*2,12,1),LI
|