%> 飞狐顾比均线趋势交易系统主图指标公式_股票学习视频教程网
飞狐顾比均线趋势交易系统主图指标公式 2660

DRAWGBK(v>=0,COLORRGB(1,100,100),COLORRGB(18,19,51),0);

{--------------------均线组----------------}

{18日收盘均价为安全生命线}

EMA(close,18),ColorFFFF00,LINETHICK4;

安全生命线:EMA(close,18),ColorFFFFFF,LINETHICK2;

MA1:ema(close,3),COLORRED,LINETHICK2;

MA2:ema(close,5),Color230046;

MA3:ema(close,8),Color3E007B;

MA4:ema(close,10),Color5500AA;

MA5:ema(close,12),Color7400E8;

MA6:ema(close,15),ColorFF59FF;

{股票教程网-股票公式网站 www.gwgz.net}

MA7:ema(close,30),Color004200;

MA8:ema(close,35),Color006000;

MA9:ema(close,40),Color008800;

MA10:ema(close,45),Color00BB00;

MA11:ema(close,50),Color00F900;

MA12:ema(close,60),Color6AFF6A;

eMA(close,3),COLORYELLOW,LINETHICK1;

{-------顾比倒数------------}

ff:=l;

fhf:=h;

fgf:=h;

ftf:=l;

fdf:=l;

zdtf:=c;

zqf:=c;

zqtf:=c;

{顾比倒数进场}

<%

f=ffl.vardata("ff")

fh=ffl.vardata("fhf")

fg=ffl.vardata("fgf")

ft=ffl.vardata("ftf")

fd=ffl.vardata("fdf")

zq=ffl.vardata("zqf")

zqt=ffl.vardata("zqtf")

zdt=ffl.vardata("zdtf")

zq(1)=0

zq(2)=0

zqt(1)=0

zqt(2)=0

tj=0

n=ubound(f)

for i=2 to n

k1=0

k2=0

k3=0

ii=i-2

for j=ii to 2 step -1

if f(j)<f(j-1) and f(j)<f(j-2) and f(j)<f(j+1) and f(j)<f(j+2) then

k1=j

exit for

end if

next

j=k1-1

while j>=0 and tj=0

if fh(j)>fh(k1) then

k2=j

tj=1

else

j=j-1

end if

wend

j=k2-1

tj=0

while j>=0 and tj=0

if fh(j)>fh(k2) then

k3=j

tj=1

else

j=j-1

end if

wend

if k3>0 then

fg(i)=fh(k3)

zq(i)=k3

else

fg(i)=fg(i-1)

zq(i)=zq(i-1)+1

end if

next

ffl.vardata("fgf")=fg

ffl.vardata("zqf")=zq

'止损线'

for i=2 to n

k1=0

k2=0

k3=0

ii=i-2

for j=ii to 2 step -1

if fh(j)>fh(j-1) and fh(j)>fh(j-2) and fh(j)>fh(j+1) and fh(j)>fh(j+2) then

k1=j

exit for

end if

next

tj=0

j=k1-1

while j>=0 and tj=0

if fh(j)<fh(k1) then

k2=j

tj=1

else

j=j-1

end if

wend

if k2>0 then

fd(i)=fh(k2)

zdt(i)=k2

else

fd(i)=fd(i-1)

zdt(i)=zdt(i-1)+1

end if

j=k2-1

tj=0

while j>0 and tj=0

if fh(j)<fh(k2) then

k3=j

tj=1

else

j=j-1

end if

wend

if k3>0 then

ft(i)=fh(k3)

zqt(i)=k3

else

ft(i)=ft(i-1)

zq(i)=zqt(i-1)+1

end if

next

ffl.vardata("ftf")=ft

ffl.vardata("fdf")=fd

ffl.vardata("zqtf")=zqt

ffl.vardata("zdtf")=zdt

%>

离场线:ftf,linethick1,ColorFF8000,LINEDOT;//如果想把止损位提高,可选第二根K线做参考线,把ftf改成fdf就可以了;

顾比倒数:fgf,COLOR0066FF,LINEDOT;

{-----------------------------立体K线--------------------------------------}

KC:=close;

KO:=ref(close,1);

STICKLINE(ko<kc,HIGH,LOW,0.5,0 ),COLOR0000CC;

STICKLINE(ko>=kc,LOW,HIGH,0.5 ,0 ),COLOR999900;

STICKLINE(ko>=kc ,CLOSE ,OPEN,7,0 ),COLOR665500;

STICKLINE(ko>=kc ,CLOSE ,OPEN,5,0 ),COLOR999900;

STICKLINE(ko<kc,CLOSE,OPEN,7,0 ),COLOR000066;

STICKLINE(ko<kc,CLOSE,OPEN,5,0 ),COLOR0000CC;

{-----------买卖点----------------------}

Eee:=IF(cross(c,ma4) and cross(c,安全生命线),1,0);

短3:=EMA(CLOSE,3);

长30:=EMA(CLOSE,30) ,COLORRED;

K60:=EMA(CLOSE,60) ,COLORGREEN;

VV:=CROSS(短3,K60) AND K60>REF(K60,1);

VV1:=CROSS(短3,长30) AND 长30>REF(长30,1);

XG2:=IF(VV,1,0);

XG1:=IF(VV1,1,0);

转势:=(XG2 OR XG1);

DRAWTEXT(转势 and Eee and CROSS(CLOSE,顾比倒数),LOW*0.92,'趋\n势\n买'),COLORMAGENTA;

DRAWTEXT(转势,LOW*0.98,'搏\n短'),colorred;

DRAWTEXT(cross(c,ma2) and cross(c,ma4),LOW*0.998,'短\n买'),Color00FF80;

DRAWTEXT(cross(离场线,c),H*1.01,'离\n场'),ColorFF80FF;



 

{股票教程网-http://bkqg.net承接通达信软件和公式破解,普通加密破解,完全加密破解,导入密码破解,时间限制破解,公式编写,可按您的要求写公式指标,价格按难度不同报价,有需要可以找我们}