马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
607.问:
飞狐中,用这个MA指标,发现5日均线和60日均线重合,并都显示的是5日均线值。
P1:5 P2:10 p3:20 p4:30 p5:60 p6:120 p7:250
MA1:MA(CLOSE,P1);
MA2:MA(CLOSE,P2);
MA3:MA(CLOSE,P3);
MA4:MA(CLOSE,P4);
MA5:MA(CLOSE,P5);
MA6:MA(CLOSE,P6);
MA7:MA(CLOSE,P7);
答(简单.趋势):
MA5:MA(C,5);
MA10:MA(C,10);
MA20:MA(C,20);
MA30:MA(C,30);
MA60:MA(C,60);
MA120:MA(C,120);
MA250:MA(C,250);
看看这个怎样,简单又不会变了 608.问:
把这个分析家的多空趋势指标改成飞狐的可以吗
DRAWGBK(DATE>900101,STRIP(RGB(100,0,0),RGB(30,30,0),1));
Var1:=EMA(MA(IF(CLOSE>OPEN,(CLOSE-OPEN)*VOL,IF(CLOSE<OPEN,(CLOSE-OPEN) *
VOL,0)),5),1);
Var2:=EMA(MA(IF(CLOSE>REF(CLOSE,1),(CLOSE-REF(CLOSE,1))*VOL,IF(CLOSE<REF (CLOSE,1),(CLOSE-REF(CLOSE,1))*VOL,0)),5),1);
Var3:=EMA(MA(IF(OPEN>REF(CLOSE,1),(OPEN-REF(CLOSE,1))*VOL,IF(OPEN<REF(CLOSE,1),(OPEN-REF(CLOSE,1))*VOL,0)),5),1);
Var4:=EMA(MA(IF(CLOSE<OPEN,(OPEN-CLOSE)*VOL,IF(CLOSE>OPEN,(OPEN-CLOSE) *VOL,0)),
10),1);
Var5:=EMA(MA(IF(CLOSE<REF(CLOSE,1),(REF(CLOSE,1)-CLOSE)*VOL,IF(CLOSE>REF(CLOSE,1),(REF(CLOSE,1)-CLOSE)*VOL,0)),10),1);
Var6:=EMA(MA(IF(OPEN<REF(CLOSE,1),(REF(CLOSE,1)-OPEN)*VOL,IF(OPEN>REF(CLOSE,1), (REF(CLOSE,1)-OPEN)*VOL,0)),10),1);
Var7:=CLOSE>OPEN;
Var8:=CLOSE>REF(CLOSE,1);
Var9:=OPEN>REF(CLOSE,1);
多头 Var1+Var2+Var3)/3/100,COLORWHITE;
空头 Var4+Var5+Var6)/3/100,COLORYELLOW ;
一次警报:EMA(EMA((Var1+Var2+Var3)/3-(Var4+Var5+Var6)/3,5),5)*1/100,COLORMAGENTA;
二次警报:EMA((COUNT(Var8,12)/12+COUNT(Var7,12)/12+COUNT(Var9,12)/12)/3*MA(多 头,5)*2*1.1,2),COLORBLUE;
STICKLINE(空头>0,0,空头,1,0),COLORCYAN;
STICKLINE(空头<0,0,空头,1,0),COLORRED;
破解:EMA(EMA((Var1+Var2+Var3)/3-(Var4+Var5+Var6)/3,5),5)*1/100,POINTDOT,
Color9587FF;
答(一鸣):
DRAWGBK(DATE>900101,COLORRGB(100,0,0),COLORRGB(30,30,0),0);
Var1:=EMA(MA(IF(CLOSE>OPEN,(CLOSE-OPEN)*VOL,IF(CLOSE<OPEN,(CLOSE-OPEN)*VOL,0)),5),1);
Var2:=EMA(MA(IF(CLOSE>REF(CLOSE,1),(CLOSE-REF(CLOSE,1))*VOL,IF(CLOSE<REF (CLOSE,1),(CLOSE-REF(CLOSE,1))*VOL,0)),5),1);
Var3:=EMA(MA(IF(OPEN>REF(CLOSE,1),(OPEN-REF(CLOSE,1))*VOL,IF(OPEN<REF(CLOSE,1),(OPEN-REF(CLOSE,1))*VOL,0)),5),1);
Var4:=EMA(MA(IF(CLOSE<OPEN,(OPEN-CLOSE)*VOL,IF(CLOSE>OPEN,(OPEN-CLOSE) *VOL,0)),
10),1);
Var5:=EMA(MA(IF(CLOSE<REF(CLOSE,1),(REF(CLOSE,1)-CLOSE)*VOL,IF(CLOSE>REF (CLOSE,1),(REF(CLOSE,1)-CLOSE)*VOL,0)),10),1);
Var6:=EMA(MA(IF(OPEN<REF(CLOSE,1),(REF(CLOSE,1)-OPEN)*VOL,IF(OPEN>REF (CLOSE,1),(REF(CLOSE,1)-OPEN)*VOL,0)),10),1);
Var7:=CLOSE>OPEN;
Var8:=CLOSE>REF(CLOSE,1);
Var9:=OPEN>REF(CLOSE,1);
多头 Var1+Var2+Var3)/3/100,COLORWHITE;
空头 Var4+Var5+Var6)/3/100,COLORYELLOW ;
一次警报:EMA(EMA((Var1+Var2+Var3)/3-(Var4+Var5+Var6)/3,5),5) *1/100,COLORMAGENTA;
二次警报:EMA((COUNT(Var8,12)/12+COUNT(Var7,12)/12+COUNT(Var9,12)/12)/3*MA(多头,5)*2*1.1,2),COLORBLUE;
STICKLINE(空头>0,0,空头,1,0),COLORCYAN;
STICKLINE(空头<0,0,空头,1,0),COLORRED;
破解:EMA(EMA((Var1+Var2+Var3)/3-(Var4+Var5+Var6)/3,5),5) *1/100,POINTDOT,Color9587FF; 609.问:
老鼠先知源码导入飞狐显示有错误,请修改一下:
源码
INPUT f(1,0,1),cs(60,1,300);
a:=BARSCOUNT(C);a1:=SYSPARAM(1);a2:=SYSPARAM(2);a3:=SYSPARAM(3);
DRAWGBK(a1<=a ,COLORRGB(255,255,255), COLORRGB(0,0,0) ,0);
DRAWGBK(a1=a , COLORRGB(0,0,0) ,COLORRGB(255,255,255),1);
P:=c;
Y:=P[a1];
N:=a3-a2+1;
zq:=if(of=0 and a1>=a,cs,1);
q:=if(of=1 and a1>=a,n,zq);
盈:sum(if(a1>=a and c<y,v,0),q)/FINANCE( 7),LINETHICK2,color0000FF;
亏:sum(if(a1>=a and c>y,v,0),q)/FINANCE( 7),LINETHICK2,colorff0000;
总筹:盈+亏,LINETHICK,colorffffff;
获利:盈/(总筹)*100,color0000ff,LINETHICK;
STICKLINE(a1>=a and 盈,盈,0,1,0),color0000ff;
STICKLINE(a1>=a and 亏,亏,0,1,0),colorff0000;
STICKLINE(a1>=a and 盈<亏,盈,0,1,0),color0000ff;
y=sum(if(a1>=a and o<y,v,0),Q)/CAPITAL*100,LINETHICK;
hl=yo/(总筹)*100,LINETHICK;
lc:=盈-REF(盈,1),LINETHICK;
STICKLINE(a1>=a and lc>0,hlo,获利,7,1),colorff00ff;
STICKLINE(a1>=a and lc<0,hlo,获利,7,0),color9cff00;
EXPLAINEX( 总筹,'总 筹 码: ',总筹,2,0),COLOR00FFFF;
EXPLAINEX( 盈 ,'盈利筹码: ',盈,2,0),COLOR0000FF;
EXPLAINEX( 亏 ,'套牢筹码: ',亏,2,0),COLOR00FF00;
EXPLAINEX( 获利,'获利比例: ',获利,2,0),COLORFFFFFF;
DRAWTEXT(a1=a ,盈*0.98,'老\n鼠\n先\n知'),COLORbbbbbb,ALIGN4,SHIFT2;
DRAWTEXT(a1=a ,盈*0.98,'天\n知\n地\n知'),COLORbbbbbb,ALIGN4,SHIFT6;
盈2:=LWINNER(if(of=1,n,cs),c)*100;
zy:=ref(盈2,1);
jy:=盈2-zy;
鼠:jy,LINETHICK;
if(a1>=a ,LWINNER(if(of=1,n,cs),c)*100,0),color00ffff;
DRAWTEXT(a1>=a and jy>20 ,0,'▲'),COLOR00FFFF,ALIGN0;
DRAWTEXT(a1>=a and jy<-18,0,'▲'),COLOR0000FF,ALIGN0;
0,colorff0000
答(多多):
y=sum(if(a1>=a and o<y,v,0),Q)/CAPITAL*100,LINETHICK;
hl=yo/(总筹)*100,LINETHICK;
上面二句改为:
yo:=sum(if(a1>=a and o<y,v,0),Q)/CAPITAL*100,LINETHICK;
hlo:=yo/(总筹)*100,LINETHICK; 610.问:
请教如何选出涨幅在4.5%-5.5%的股票。
答(一鸣):
range(c/ref(c,1),1.04499,1.0551);
|