通達(dá)信漲跌尺指標(biāo)公式
{漲幅:-30,30,3。 TP轉(zhuǎn)換PW:0,1,1。}
移動(dòng)線:IF(LLVBARS(V,5), REF (C,LLVBARS(V,5)),C),COLORGREEN,DOTLINE;
TP線:PEAK(移動(dòng)線,0.2,1),COLORLIRED,NODRAW;
STICKLINE(TP線>0 ,TP線,TP線,4,-1),COLORLIRED;
PW線:TROUGH(移動(dòng)線,0.2,1),COLORCYAN,NODRAW;
STICKLINE(PW線>0 ,PW線,PW線,4,-1),COLORCYAN;
PW:=CONST(PW線);
TP:=CONST(TP線);
ZH:=IF(TP轉(zhuǎn)換PW=1,PW,TP);
最低:=TROUGHBARS(移動(dòng)線,0.2,1);
幅度:=1+(漲幅/100);
漲幅尺%:DRAWLINE(最低=0,ZH*幅度,ISLASTBAR,ZH*幅度,1),COLOR00BBFF;
DRAWTEXT(ISLASTBAR,漲幅尺%,'漲幅尺'),COLOR00BBFF;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能飽和:=IF(SAT>1,1,SAT)*100,NODRAW;
獲利籌碼:=WINNER(C)*100,NODRAW;
LC:=REF(CLOSE,1);
RSI值:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活躍:=(RSI值-WR10);
活躍度比:=IF(活躍>=0,(活躍+100)/2,100-ABS((活躍-100)/2)),NODRAW;
DRAWRECTREL(80,10,240,60,RGB(0,75,200));
DRAWRECTREL(80,10,160,60,RGB(0,100,0));
DRAWRECTREL(80,10,80+CONST(活躍度比*160/100),60,RGB(200,0,50));
DRAWTEXT_FIX(1,0.00,0.01,0,STRCAT(STRCAT('活躍度比: ',CON2STR(活躍度比,2)),'% ')),COLORYELLOW;
DRAWRECTREL(80,70,240,120,RGB(0,75,200));
DRAWRECTREL(80,70,160,120,RGB(0,100,0));
DRAWRECTREL(80,70,80+CONST(獲利籌碼*160/100),120,RGB(200,0,50));
DRAWTEXT_FIX(1,0.00,0.07,0,STRCAT(STRCAT('獲利籌碼: ',CON2STR(獲利籌碼,2)),'% ')),COLORYELLOW;
DRAWRECTREL(80,130,240,180,RGB(0,75,200));
DRAWRECTREL(80,130,160,180,RGB(0,100,0));
DRAWRECTREL(80,130,80+CONST(量能飽和*160/100),180,RGB(200,0,50));
DRAWTEXT_FIX(1,0.00,0.13,0,STRCAT(STRCAT('量能飽和: ',CON2STR(量能飽和,2)),'% ')),COLORYELLOW;
N:=27;
{預(yù)測(cè)當(dāng)天最低價(jià)公式}
A1:=REF(O,1);
A2:=ABS((REF(C,1)-A1)/A1);
A3:=ABS((REF(H,1)-A1)/A1);
A4:=ABS((REF(L,1)-A1)/A1);
B1:=ABS((A2+A3+A4)/3);
B2:=O*B1;
預(yù)測(cè)低一:=O-B2;
預(yù)測(cè)高一:=O+B2;
開(kāi)盤(pán)價(jià)1:=OPEN;
開(kāi)盤(pán)價(jià)2:=REF(OPEN,1);
最高價(jià)1:=HIGH;
最高價(jià)2:=REF(HIGH,1);
最低價(jià)1:=LOW;
最低價(jià)2:=REF(LOW,1);
收盤(pán)價(jià)1:=CLOSE;
收盤(pán)價(jià)2:=REF(CLOSE,1);
AA:=最高價(jià)2;
BB:=最低價(jià)2;
CC:=開(kāi)盤(pán)價(jià)2;
DD:=收盤(pán)價(jià)2;
EE:=(AA+BB+CC+2*DD)/5;
AAA:=EE+(AA-BB);
BBB:=2*EE-BB;
CCC:=2*EE-AA;
DDD:=EE-(AA-BB);
上升突破價(jià):=AAA;
上升阻力價(jià):=BBB;
下跌支撐價(jià):=CCC;
下跌反轉(zhuǎn)價(jià):=DDD;
EEE:=(EE+上升突破價(jià)+上升阻力價(jià)+下跌支撐價(jià)+下跌反轉(zhuǎn)價(jià))/5;
心理價(jià):=EEE;
FFF:=(EEE+開(kāi)盤(pán)價(jià)1)/2;
GGG:=(預(yù)測(cè)低一+FFF)/2;
預(yù)測(cè)低二:=GGG;
預(yù)測(cè)高二:=MA(REF(HIGH,1)/REF(CLOSE,2),N)*REF(CLOSE,1);
買(mǎi)回價(jià):=預(yù)測(cè)低二*1.015;
賣(mài)出價(jià):=買(mǎi)回價(jià)*(1+0.03);
DRAWTEXT_FIX(1,0.085,0.21,1,'買(mǎi)回價(jià)格:'),COLOR8080FF;
DRAWNUMBER_FIX(1,0.15,0.21,1,CONST(買(mǎi)回價(jià))),COLOR8080FF;
DRAWTEXT_FIX(1,0.17.5,0.21,1,'元'),COLOR8080FF,LINETHICK1;
DRAWTEXT_FIX(1,0.085,0.25,1,'預(yù)測(cè)低一:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.15,0.25,1,CONST(預(yù)測(cè)低一)),COLORYELLOW;
DRAWTEXT_FIX(1,0.17,0.25,1,'元'),COLORYELLOW,LINETHICK1;
DRAWTEXT_FIX(1,0.085,0.29,1,'預(yù)測(cè)低二:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.15,0.29,1,CONST(預(yù)測(cè)低二)),COLORYELLOW;
DRAWTEXT_FIX(1,0.17,0.29,1,'元'),COLORYELLOW,LINETHICK1;
DRAWTEXT_FIX(1,0.085,0.33,1,'賣(mài)出價(jià)格:'),COLOR8080FF;
DRAWNUMBER_FIX(1,0.15,0.33,1,CONST(賣(mài)出價(jià))),COLOR8080FF;
DRAWTEXT_FIX(1,0.17,0.33,1,'元'),COLOR8080FF,LINETHICK1;
DRAWTEXT_FIX(1,0.085,0.37,1,'預(yù)測(cè)高一:'),COLORFFFFFF;
DRAWNUMBER_FIX(1,0.15,0.37,1,CONST(預(yù)測(cè)高一)),COLORFFFFFF;
DRAWTEXT_FIX(1,0.17,0.37,1,'元'),COLORFFFFFF,LINETHICK1;
DRAWTEXT_FIX(1,0.085,0.41,1,'預(yù)測(cè)高二:'),COLORFFFFFF;
DRAWNUMBER_FIX(1,0.15,0.41,1,CONST(預(yù)測(cè)高二)),COLORFFFFFF;
DRAWTEXT_FIX(1,0.17,0.41,1,'元'),COLORFFFFFF,LINETHICK1;
紅色雷達(dá):IF(CLOSE>SAR(4,2,20),SAR(4,2,20),DRAWNULL),COLORRED,CIRCLEDOT;
綠色雷達(dá):IF(CLOSE<=SAR(4,2,20),SAR(4,2,20),DRAWNULL),COLORGREEN,CIRCLEDOT;