飞狐指标公式源码 飞狐FZ后土指标公式(3)
2017-09-25 16:08 股票知识 zhishi.southmoney.com
B7:=LLV(B1,4*15);
B8:=B6-B7;
飞龙顶底线:=MA((B1-B7)/B8,2)*80;
DRAWTEXT(FILTER(飞龙顶底线<=1 AND WINNER(CLOSE)<0.02 AND HIGH<趋势线 AND CLOSE>OPEN AND LOW<=短期底部 AND CLOSE>短期底部,8),LOW-0.02,'←黑马寻底'),colorE7DD1F;
DRAWTEXT(FILTER(LOW<=短期底部 AND WINNER(CLOSE)<0.015 AND OPEN/CLOSE>0.99 AND J-REF(J,1)>0 AND CLOSE>OPEN AND HIGH<支撑位 AND CLOSE>短期底部,25),LOW-0.09,'←开始建仓'),colorFFFF;
M1:=SUM((EMA((CLOSE + LOW)/(2),2))/(2.98),3),POINTDOT,COLORFFFFFF;
M2:=EMA(M1,21),COLORFF00FF;
VAR1:=(2)*(MA((LLV((CLOSE + LOW)/(2),8))*(1.1),13)) - EMA((CLOSE + LOW)/(2),3) - ((CLOSE + LOW)/(2))*(0.1);
VAR2:=IF(((EMA((CLOSE + LOW)/(2),3) - VAR1)*(5) > 0),(POW((EMA((CLOSE + LOW)/(2),3) - VAR1)*(5),2))/(10),(((-1))*(POW((EMA((CLOSE + LOW)/(2),3) - VAR1)*(5),2)))/(10));
VAR3:=IF((VAR2 > 0),VAR2 - 0,(-1));
DRAWTEXT(CROSS(VAR3,0) AND ((CLOSE + LOW)/(2) > MA((CLOSE + LOW)/(2),8)),(M2)*(1.01),'绝杀'),LINETHICK2,COLORYELLOW;
VAR1:=COUNT(CROSS(MA(CLOSE,12)-MA(CLOSE,20),0),0)=COUNT(CROSS(0,MA(CLOSE,12)-MA(CLOSE,20)),0) AND REF(COUNT(CROSS(MA(CLOSE,12)-MA(CLOSE,20),0),0),1)=1 AND REF(COUNT(CROSS(0,MA(CLOSE,12)-MA(CLOSE,20)),0),1)=0;
VAR2:=COUNT(CROSS(MA(CLOSE,12)-MA(CLOSE,20),0),0)=COUNT(CROSS(0,MA(CLOSE,12)-MA(CLOSE,20)),0) AND REF(COUNT(CROSS(MA(CLOSE,12)-MA(CLOSE,20),0),0),1)=0 AND REF(COUNT(CROSS(0,MA(CLOSE,12)-MA(CLOSE,20)),0),1)=1;
VAR3:=COUNT(CROSS(0,MA(CLOSE,12)-MA(CLOSE,20)),0)=1 AND REF(COUNT(CROSS(0,MA(CLOSE,12)-MA(CLOSE,20)),0),1)=0,LINETHICK0;
VAR4:=COUNT(CROSS(MA(CLOSE,12)-MA(CLOSE,20),0),0)=1 AND REF(COUNT(CROSS(MA(CLOSE,12)-MA(CLOSE,20),0),0),1)=0,LINETHICK0;
VAR5:=BARSLAST(REF(CROSS(MA(CLOSE,12)-MA(CLOSE,20),0),1) OR VAR3),LINETHICK0;
VAR6:=BARSLAST(REF(CROSS(0,MA(CLOSE,12)-MA(CLOSE,20)),1) OR VAR4),LINETHICK0;
VAR7:=IF(VAR1 OR VAR2,REF(IF(VAR5<VAR6,REF(HHV(HIGH,2),VAR5),REF(LLV(LOW,2),VAR6)),1),IF(VAR5<VAR6,REF(HHV(HIGH,2),VAR5),REF(LLV(LOW,2),VAR6)));
VAR8:=REF(CLOSE,1)<=REF(VAR7,1) AND CLOSE>VAR7 AND VAR5<VAR6;
VAR9:=REF(CLOSE,1)>=REF(VAR7,1) AND CLOSE<VAR7 AND VAR6<VAR5;
VAR11:VAR8 AND COUNT(VAR8,VAR5)=1,LINETHICK0;
VAR12:VAR9 AND COUNT(VAR9,VAR6)=1,LINETHICK0;
VAR13:COUNT(VAR11,BARSCOUNT(VAR5))>0 AND COUNT(VAR12,BARSCOUNT(VAR5))=0,LINETHICK0;
VAR14:COUNT(VAR12,BARSCOUNT(VAR6))=0 AND COUNT(VAR12,BARSCOUNT(VAR6))>0,LINETHICK0;
VAR15:=VAR13 OR VAR11 OR BARSLAST(VAR11)<BARSLAST(VAR12);
VAR16:=VAR14 OR VAR12 OR BARSLAST(VAR11)>BARSLAST(VAR12);
PARTLINE(VAR15,REF(LLV(LOW,2),VAR6)),LINETHICK2,colorFF00FF;
PARTLINE(VAR16,REF(HHV(HIGH,2),VAR5)),LINETHICK2,colorFFFFFF;
DRAWTEXT(VAR15 AND REF(VAR15,1)=0 OR COUNT(VAR15,0)=1,REF(LLV(LOW,2),VAR6),'开多平空'),colorFF00FF;
DRAWTEXT(VAR16 AND REF(VAR16,1)=0 OR COUNT(VAR16,0)=1,REF(HHV(HIGH,2),VAR6),'开空平多'),colorFFFFFF;
DRAWTEXT(VAR15 AND FILTER(LOW<REF(LLV(LOW,2),5),VAR6),LOW,'♂加多'),colorFF00FF;
DRAWTEXT(VAR16 AND FILTER(HIGH>REF(HHV(HIGH,2),VAR5),5),HIGH,'♀加空'),colorFF00;
STICKLINE(CROSS(VAR3,0) AND ((CLOSE + LOW)/(2) > MA((CLOSE + LOW)/(2),8)),(LOW)*(0.99),(LOW)*(0.95),4,0),COLORYELLOW;
ggg:=MIN(CLOSE,OPEN);
VAR6:=(EMA(C,5)+EMA(C,10)+EMA(C,20)+EMA(C,30))/4;
VAR7:=(VAR6-REF(VAR6,15))/REF(VAR6,15)*100;
VAR8:=(VAR6-REF(VAR6,15))/REF(VAR6, 15)*100;
VAR9:=EMA(VAR7,8);
STICKLINE(VAR7<1*REF(VAR7,1),ABS(O-C)*0.375+ggg,ABS(O-C)*0.625+ggg,7, 0),COLOR858500;
STICKLINE(VAR7>1*REF(VAR7,1),ABS(O-C)*0.375+ggg,ABS(O-C)*0.625+ggg,7, 0),COLORRED;
STICKLINE(VAR7<1*REF(VAR7,1) AND VAR9>1*REF(VAR9,1),ABS(O-C)*0.375+ggg,ABS(O-C)*0.625+ggg,7, 0),COLORGREEN;
买进价:=((C-REF(MA(C,6),1))/6+MA(C,6))*1.004;
买进条件:=CROSS(C,买进价) AND 买进价>REF(买进价,1);
STICKLINE(买进条件,ABS(O-C)*0.375+ggg,ABS(O-C)*0.625+ggg,7,0),COLOR663377,LINETHICK2;
加码价:=((C-REF(MA(C,18),1))/18+MA(C,18))*1.004;
加码条件:=CROSS(C,加码价) AND 加码价>REF(加码价,1);
STICKLINE(加码条件,ABS(O-C)*0.375+ggg,ABS(O-C)*0.625+ggg,7,0),COLORff99ff,LINETHICK2;