九毛八公式指标
公式模块:
下面是飞狐的一个附图公式,想请老师帮忙,把红柱和黄柱出现的时候能提示=1。谢谢老师~
源码
VAR1:=vol/((HIGH-LOW)*2-(ABS(CLOSE-OPEN)));
主买:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*(HIGH-OPEN+CLOSE-LOW),VOL/2));
主卖:=IF(CLOSE>OPEN,-VAR1*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,-VAR1*(HIGH-LOW),-VOL/2));
AA:=(主买-(-主卖))/主买;
多日阳量:=SUM(主买,10);
多日阴量:=SUM(主卖,10);
阴阳差量:=(多日阳量+多日阴量)/100000;
DIFF1:=EMA(阴阳差量,12)-EMA(阴阳差量,26);
DEA1:=EMA(DIFF1,5);
macd1:=2*(DIFF1-DEA1)*100;
MAMacD1:=MA(MACD1,5);
HH:=HHV(MAMACD1,60);
VAR11:=EMA(HHV(HIGH,500),21);
VAR2:=EMA(HHV(HIGH,250),21);
VAR3:=EMA(HHV(HIGH,90),21);
VAR4:=EMA(LLV(LOW,500),21);
VAR5:=EMA(LLV(LOW,250),21);
VAR6:=EMA(LLV(LOW,90),21);
VAR7:=EMA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR11*0.558+VAR2*0.558+VAR3*0.558)/6,21);
VAR8:=EMA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR11*0.55+VAR2*0.55+VAR3*0.65)/6,21);
VAR9:=EMA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR11*0.68+VAR2*0.68+VAR3*0.68)/6,21);
VARA:=EMA((VAR7*3+VAR8*2+VAR9)/6*1.738,21);
VARB:=REF(LOW,1);
VARC:=(SMA(ABS(LOW-VARB),3,1))/(SMA(MAX(LOW-VARB,0),3,1))*100;
VARD:=EMA(IF(CLOSE*1.35<=VARA,VARC*10,VARC/10),3);
VARE:=LLV(LOW,30);
VARF:=HHV(VARD,30);
VAR10:=IF(MA(CLOSE,58),1,0);
AA3:=(EMA(IF(LOW<=VARE,(VARD+VARF*2)/2,0),3))/(618)*VAR10;
BB:=AA3>REF(HHV(AA3,60),1);
大底:=AA3>5;
VA1:=VOL/((HIGH-LOW)*2-(ABS(CLOSE-OPEN)));
主买1:=IF(CLOSE>OPEN,VA1*(HIGH-LOW),IF(CLOSE<OPEN,VA1*(HIGH-OPEN+CLOSE-LOW),VOL/2));
主卖1:=IF(CLOSE>OPEN,-VA1*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,-VA1*(HIGH-LOW),-VOL/2));
AA6:=(主买1-(-主卖1))/主买1;
XG:=FILTER(大底>0 AND CLOSE>OPEN,5);
STICKLINE(大底>0 AND CLOSE<OPEN,10,15,4,0),colorFFFF;
STICKLINE(XG,15,10,4,0),colorFF;
DRAWTEXT(XG,7,'先黄后红'),PXUP6,colorFF;
DRAWTEXT(XG,3,'尾盘买入'),PXUP6,colorFF;
0;
VAR11:=EMA(HHV(HIGH,500),21);
VAR2:=EMA(HHV(HIGH,250),21);
VAR3:=EMA(HHV(HIGH,90),21);
VAR4:=EMA(LLV(LOW,500),21);
VAR5:=EMA(LLV(LOW,250),21);
VAR6:=EMA(LLV(LOW,90),21);
VAR7:=EMA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR11*0.558+VAR2*0.558+VAR3*0.558)/6,21);
VAR8:=EMA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR11*0.55+VAR2*0.55+VAR3*0.65)/6,21);
VAR9:=EMA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR11*0.68+VAR2*0.68+VAR3*0.68)/6,21);
VARA:=EMA((VAR7*3+VAR8*2+VAR9)/6*1.738,21);
VARB:=REF(LOW,1);
VARC:=(SMA(ABS(LOW-VARB),3,1))/(SMA(MAX(LOW-VARB,0),3,1))*100;
VARD:=EMA(IF(CLOSE*1.35<=VARA,VARC*10,VARC/10),3);
VARE:=LLV(LOW,30);
VARF:=HHV(VARD,30);
VAR10:=IF(MA(CLOSE,58),1,0);
AA3:=(EMA(IF(LOW<=VARE,(VARD+VARF*2)/2,0),3))/(618)*VAR10;
大底:=AA3>5;
红:FILTER(大底>0 AND CLOSE>OPEN,5);
黄:大底>0 AND CLOSE<OPEN;