当前位置: 首页 > 文章教程  > 股票财经 > 炒股公式

飞狐顾比K线主图指标公式

5/13/2018 10:06:53 PM 人评论

//DRAWGBK(1,COLORRGB(240,240,240),COLORRGB(240,240,240),0);{--------------------均线组----------------}{18日收盘均价为安全生命线}EMA(close,18),COLOR006600,LINETHICK4;安全生命线:EMA(close,18),COLOR00CC00,LINETHICK2;MA1:ema(close,3),COLORRED,LINETHICK2;…

//DRAWGBK(1,COLORRGB(240,240,240),COLORRGB(240,240,240),0);
{--------------------均线组----------------}
{18日收盘均价为安全生命线}
EMA(close,18),COLOR006600,LINETHICK4;
安全生命线:EMA(close,18),COLOR00CC00,LINETHICK2;
MA1:ema(close,3),COLORRED,LINETHICK2;
MA2:ema(close,5),color009900;
MA3:ema(close,8),color00aa00;
MA4:ema(close,10),COLOR00bb00;
MA5:ema(close,12),COLOR00CC00;
MA6:ema(close,15),COLOR00DD00;
MA7:ema(close,30),COLOR990099;
MA8:ema(close,35),COLORAA00AA;
MA9:ema(close,40),COLORBB00BB;
MA10:ema(close,45),COLORCC00CC;
MA11:ema(close,50),COLORDD00DD;
MA12:ema(close,60),COLOREE00EE;
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,COLORWHITE,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.95,'趋势买'),COLORMAGENTA;
DRAWTEXT(转势,LOW*0.92,'搏短'),colorred;
//DRAWTEXT(cross(c,ma2) and cross(c,ma4),LOW*0.92,'短买'),colorred;
//DRAWTEXT(cross(离场线,c),H*1.05,'离场'),colorred;

飞狐顾比K线主图指标公式

相关教程

  • 飞狐主力净买量指标公式

    A:=VOL*CLOSE;B:=SUM(A,2)/SUM(VOL,2);B1:=EMA(B,7);M:=(B-B1);STICKLINE(M>0,0,M,2,0),COLORRED;STICKLINE(M<0,0,M,2,0),COLORGREEN;主力净买量:M,COLORYELLOW;三日均量:EMA(M,3),COLORWHITE;

    5/13/2018 10:07:24 PM
  • 飞狐MACD与KDJ综合指标公式

    DIFZ:=EMA(C,12)-EMA(C,26);DEAZ:=EMA(DIFZ,9);MACDZ:=8*(DIFZ-DEAZ);RSV:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*247.2-123.6;SQX:=(C-MA(CLOSE,13))*10;DIF:=EMA(MA(SQX,7),1);DEA:=EMA(DIF,7);MACD:=(DIF-DEA)*2;STICKLINE(MACD>0 AND MACD>REF(M…

    5/13/2018 10:07:22 PM
  • 飞狐MACD和KDJ主图指标公式

    INPUT:N(18),S(26),P(12),M(9);DRAWGBK(CLOSE=CLOSE,COLORRGB(80,130,130),COLORRGB(30,30,60),1);A:=EMA(CLOSE,S);T:=EMA(CLOSE,P);B:=EMA(A,M);T1:=EMA(T,M);DEA:=EMA(T-(T1-T),2),COLORFF8866,LINETHICK2;DIFF:=DEA-EMA(((A-B)-(T-T1)),1)*6,COLORFFFF66,LINETHICK2;F…

    5/13/2018 10:07:20 PM
  • 飞狐将军参谋指标公式

    Var1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;Var2:=2*ABS(Var1);Var3:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);Var4:=100-3*SMA((OP…

    5/13/2018 10:07:19 PM

共有条评论 网友评论

验证码: 看不清楚?