近几天看到有些使用大智慧软件的朋友求助千均老师的《鱼身》主要图公式,今天是周末,有点空闲时间,帮大家改了一下,需要的朋友凑合着用吧!
需作二点说明:
一、老师的原飞狐公式,因使其公式能观察大盘指数,运用了横向统计数据,在修改时我用SUM(V,72)直接进行了代替,不影响其使用效果(见下面的对比图);
二、由于自己对大智慧软件不是很熟悉,所以时段统计部分以及F10解盘部分我进行了删除。
【鱼身】
input:N(20,1,100,1);
TY:=CLOSE;
A1:=REF(TY,N)=HHV(TY,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
HD:=FILTER(C1,N);
A2:=REF(TY,N)=LLV(TY,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
LD:=FILTER(C2,N);
A:=REF(CLOSE,BARSLAST(HD));
B:=REF(CLOSE,BARSLAST(LD));
t1:=BARSLAST(HD) and BARSLAST(LD) AND NOT(LD);
M1:=IF(CAPITAL<1,EMA(VOL,55),CLOSE);
M2:=IF(CAPITAL<1,WMA(M1,360),DMA(M1,VOL/CAPITAL));
M3:=IF(CAPITAL<1,DMA(MA(CLOSE,5),VOL/SUM(V,72)),DMA(MA(CLOSE,5),VOL/CAPITAL));
持股:STICKLINE(m1>m2,MA(CLOSE,14),m3,10,0),colorCC00CC;
持币:STICKLINE(m1<m2,MA(CLOSE,14),m3,10,0),color990000;
STICKLINE(t1,A,A,10,0),Color00FF00,LINETHICK1;
STICKLINE(t1,B,B,10,0),Color0000FF,LINETHICK1;
AB1:=COST(0.33);
AB2:=COST(5);
AB3:=COST(15);
AB4:=COST(55);
AB5:=COST(97);
AA1:=COST(90);
AA2:=COST(70);
AA3:=COST(30);
AA4:=COST(10);
获利:=WINNER(CLOSE)*100;
套牢:=100-WINNER(CLOSE)*100;
DRAWTEXTABS(10,20,'90成本:'+NUMTOSTRN(AA1,2)),Color00DD00;
DRAWTEXTABS(10,40,'70成本:'+NUMTOSTRN(AA2,2)),Color00DDFF;
DRAWTEXTABS(10,60,'30成本:'+NUMTOSTRN(AA3,2)),Color00DD00;
DRAWTEXTABS(10,80,'10成本:'+NUMTOSTRN(AA4,2)),Color00DDFF;
DRAWTEXTABS(10,100,'底出击:'+NUMTOSTRN(AB1,2)),ColorDDDDDD;
DRAWTEXTABS(380,20,'建仓:'+NUMTOSTRN(AB2,2)),Color00DDFF;
DRAWTEXTABS(480,20,'快刀:'+NUMTOSTRN(AB3,2)),Colorff00FF;
DRAWTEXTABS(580,20,'升浪:'+NUMTOSTRN(AB4,2)),Color0000FF;
DRAWTEXTABS(580,40,'预测:'+NUMTOSTRN(AB5,2)),ColorffFF00;
DRAWTEXTABS(380,40,'获利:'+NUMTOSTRN(获利,2)),ColorFF00FF;
DRAWTEXTABS(480,40,'套牢:'+NUMTOSTRN(套牢,2)),Color00DD00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,6,0),colorFF5B00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,5,0),colorFF6C00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,4,0),colorFF7B00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,3,0),colorFF9C00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,2,0),colorFFBE00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,2,0),colorFFCC00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,1.5,0),colorFFFF00;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,6,0),color070084;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,5,0),color0000A3;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,4,0),color0000B7;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,3,0),color0000CD;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,3,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;
|