歌曲旗帜颂视频:顶底测算(主图公式) - 老菜帮子的日志 - 网易博客

来源:百度文库 编辑:旧事旧闻 时间:2020/05/26 14:02:32

顶底测算(主图公式)

抄股公式 2008-02-21 22:28:18 阅读88 评论0   字号:大中小 订阅

DRAWGBKLAST(C>0,STRIP(RGB(90,90,90),RGB(0,0,0),0));
{---------------------------------------------------------------------------------------------------------}
A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高点}
A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低点}
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 AND E1=E2);
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);{过滤后高点}
 {最后的长期连线,连在收盘价上}
UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK1;
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
DRAWLINE(XX2,H,VV2,H,1),COLORMAGENTA,LINETHICK1;
前一低:REF(L,BARSLAST(VV)),COLOR99FF66,POINTDOT,LINETHICK1;
前二低:REF(L,BARSLAST(XX)),COLORFF66FF,POINTDOT,LINETHICK2;
前一高:REF(H,BARSLAST(VV2)),COLOR99FF66,POINTDOT,LINETHICK1;
前二高:REF(H,BARSLAST(XX2)),COLORFF66FF,POINTDOT,LINETHICK2;
{以下语句为三角形部分}
底:REF(L,BARSLAST(VV)),COLORred,LINETHICK2;
顶:REF(H,BARSLAST(VV2)),COLORGreen,LINETHICK2;
{下迭三角形:蓝色三角形画完介入}
StickLine(VV,顶,底,0,0),Colorff6633,linethick3;{}
DRAWLINE(VV2,H,VV,L,0),Colorff6633,linethick3;{斜}
DRAWLINE(VV2,H,VV,顶,0),Colorff6633,linethick3;{?}
{-------------------------------------------------------------------------------------------------------}
CXY:=IF(C>1000,((HIGH + LOW) + (CLOSE * 2)),AMOUNT/V/25);
V1:=DMA((CXY)/4.08,0.99);
HY1:=REF(EMA(V1,3),1);
买入线:HY1,COLOR00FFFF;
短底:ema((CXY/4),5),colorgreen;
反压线:hhv(low,19),colorff00ff,linethick2,PRECIS2;
支撑线:llv(low,30),colorFF00FF,linethick2,PRECIS2;
中期大底:=llv(low,30);
长期底部:llv(high,30),color00ff00,linethick2,PRECIS2;
{---------卖出-----------------------------------------------------------------------------------------}
x5:=ref(close,1);
x6:=((sma(max((close - x5),0),7,1) / sma(abs((close - x5)),7,1)) * 100);
x7:=cross(79,x6);
x8:=filter(x7,4);
drawtext(x8,(high * 1.03),'←出货'),color9000f5;
SEL1:=(((((high > hhv(短底,60)){ OR (REF(high,1) > hhv(短底,60))}) and (close < hhv(短底,60))) and ((close / open) > (0 - 1.06))) and (close < open));
drawtext(filter(SEL1 AND C < 短底 ,5),(high + 0.02),'←逃'),color00ffff;
drawtext(filter((HIGH>短底 AND C<短底 AND C{---------买入-----------------------------------------------------------------------------------------}
dnm:=(l<=支撑线 and h>支撑线);
dnnum:=dnm or ref(dnm,1);
buytj:=dnnum and (ref(支撑线,1)ref(O,1) and c>ref(CXY/4.08,1) {and C>支撑线} and (c>=o )  ;
drawtext(filter((buytj ) and not(ref(buytj,1)),4),(low - 0.08),'★买入'),color0000ff;
{抢反弹}
buytj1:=dnm and 支撑线>ref(支撑线,1)  and c>=o and c>支撑线 ;
drawtext(filter((buytj1 ) and not(ref(buytj1,1)),4),(low - 0.08),'★反弹'),colorFFFF00;
ma20:=ma(close,20);
天:=(ma(low,15) * 0.985);
drawtext(filter(((((((low <= 天) and (close >= ma20)) and (high < 支撑线)) and ((天 - ref(天,1)) > 0)) and (close < 支撑线)) and ((ma20 - ref(ma20,1)) > 0)),6),(low - 0.12),'←全仓'),colorffffff;
下档线:=(((CXY/4 - llv(low,13)) / (hhv(high,13) - llv(low,13))) * 100);
rsv:=sma(下档线,3,1);
k:=sma(rsv,3,1);
d:=((3 * rsv) - (2 * k));
j12:=(((CXY/4 - llv(low,55)) / (hhv(high,55) - llv(low,55))) * 100);
rsv24:=sma(j12,3,1);
k24:=sma(rsv24,3,1);
d24:=((3 * rsv24) - (2 * k24));
压力位:if(cross(d24,d),high,l),pointdot,colorffffff;
ZJMD:=((cross(ma20,压力位) and (low <= ma20)) and ((ma20 - ref(ma20,1)) > 0.02));
drawtext(filter(ZJMD,2),(low - 0.03),'●绝佳买点'),colorfff0ff;
上:=(sma(low,5,2) * 0.96);
短期底部:=(llv(high,30) * 0.93);
drawtext(((((low <= 上) and (high >= 短期底部)) and (close >= 支撑线)) and ((close / open) > 1.03)),(low - 0.3),'★抄底'),color0000ff;
drawtext(cross(中期大底,短期底部) {AND MA(C,20)>REF(MA(C,20),1)},(low - 0.02),'←短线买'),colorff7777;
阻挡:=(sma(low,21,2) * 0.94);
aa10:=ma(close,10);
bb10:=((atan((aa10 - ref(aa10,1))) * 3.1416) * 10);
drawtext(((cross(阻挡,LLV(HIGH,30)) and (bb10 > 1)) and (high < hhv(短底,60))),low,'←出击'),color00ff00;
趋势:=(ma(low,10) * 0.96);
趋:=(ema(open,107) * 0.897);
drawtext(filter((((cross(趋势,趋) and (high < ma(C,5))) and (high < hhv(low,20))) and llv(low,0)),10),low,'←果断买'),color00ffff;
{---------K线-----------------------------------------------------------------------------------------}
逃遁:=(sma(high,21,2) * 1.05);
stickline((open >= close),close,open,9,0),colorff5b00;
stickline((open >= close),close,open,8,0),colorff6c00;
stickline((open >= close),close,open,7,0),colorff7b00;
stickline((open >= close),close,open,6,0),colorff9c00;
stickline((open >= close),close,open,5,0),colorffbe00;
stickline((open >= close),close,open,3.5,0),colorffcc00;
stickline((open >= close),close,open,1.5,0),colorffff00;
stickline((close >= open),close,open,9,0),color070084;
stickline((close >= open),close,open,8,0),color0000a3;
stickline((close >= open),close,open,7,0),color0000b7;
stickline((close >= open),close,open,6,0),color0000cd;
stickline((close >= open),close,open,5,0),color0000e9;
stickline((close >= open),close,open,3,0),color0754e9;
stickline((close >= open),close,open,1.5,0),color076ef3;
stickline((close >= open),close,open,1,0),color077bf3;
stickline((close > open),open,low,1,0),color0726ca;
stickline((close > open),close,high,1,0),color0726ca;
stickline((open > close),close,low,1,0),colorde9100;
stickline((open > close),open,high,1,0),colorde9100;
stickline(((((close / open) > 1.04) and (close < 逃遁)) and ((close - ref(close,1)) > 0)),close,open,9,0),color0090ff;
stickline(((((close / open) > 1.04) and (close < 逃遁)) and ((close - ref(close,1)) > 0)),close,open,8,0),color009fff;
stickline(((((close / open) > 1.04) and (close < 逃遁)) and ((close - ref(close,1)) > 0)),close,open,4,0),color00b5ff;
stickline(((((close / open) > 1.04) and (close < 逃遁)) and ((close - ref(close,1)) > 0)),close,open,2,0),color00e4ff;
stickline(((((close / open) > 1.04) and (close < 逃遁)) and ((close - ref(close,1)) > 0)),open,low,0.7,0),color00ffff;
stickline(((((close / open) > 1.04) and (close < 逃遁)) and ((close - ref(close,1)) > 0)),close,high,0.7,0),color00ffff;
stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > 逃遁)) and (close < 逃遁)),open,low,0.7,0),colorff76ff;
stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > 逃遁)) and (close < 逃遁)),close,high,0.7,0),colorff76ff;
stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > 逃遁)) and (close < 逃遁)),close,open,9,0),colorff00ff;
stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > 逃遁)) and (close < 逃遁)),close,open,6,0),colorff62ff;
stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > 逃遁)) and (close < 逃遁)),close,open,4,0),colorff76ff;
stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > 逃遁)) and (close < 逃遁)),close,open,2,0),colorffa8ff;

{};