飞狐解盘公式[其他软件公式]
相关标签: 飞狐解盘 、 k线形态解盘公式 、 均线解盘公式源码 、 融胜解盘常用公式 、 通达信 解盘 公式 、 飞狐公式破解 、 飞狐公式 、 飞狐f10公式 、 飞狐画线公式 、
input:K(1,0,1);
if k=0 then exit;
EXPLAIN(1=1,' 【技术分析】'),colorFFFF;
DIFF:=EMA(CLOSE,3)-EMA(CLOSE,13);
DEA:=EMA(DIFF,9);
TJ:=DIFF>DEA;
TJ1:=DIFF>-0.1;
MACD:=2*(DIFF-DEA);
JC:=CROSS(DIFF,DEA);
SC:=CROSS(DEA,DIFF);
DCJC:=JC AND DEA>0;
EXPLAIN(JC AND DEA>0,'MACD在0轴上金叉提示加仓;'),colorFF;
EXPLAIN(JC AND DEA<0,'MACD在0轴下金叉酌情买入;'),colorFF;
EXPLAIN(SC AND DEA>0,'MACD在0轴上多次死叉;'),colorFF00;
EXPLAIN(SC AND DEA<0,'MACD在0轴下多次死叉;'),colorFF00;
EXPLAIN(MACD<0 AND ABS(MACD)>ref(ABS(MACD),1),'MACD绿柱增长提示卖出;'),colorFF00;
EXPLAIN(MACD<0 AND ABS(MACD)<ref(ABS(MACD),1),'MACD绿柱缩短提示买入;'),colorFF;
EXPLAIN(LLV(LOW,60)=LOW AND NOT(LLV("MACD.DEA",60)="MACD.DEA"),'MACD底背离提示示买入
;'),colorFF;
EXPLAIN(HHV(HIGH,60)=HIGH AND NOT(HHV("MACD.DEA",60)="MACD.DEA"),'MACD顶背离提示卖出
;'),colorFF00;
EXPLAIN(CROSS("MACD.DIFF","MACD.DEA") AND BARSLAST(CROSS("MACD.DIFF","MACD.DEA"))>=3,'MACD二
次金叉提示买入,股价上涨幅度会较大。'),colorFF;
EXPLAIN(CROSS("MACD.DEA","MACD.DIFF") AND BARSLAST(CROSS("MACD.DEA","MACD.DIFF"))>=3,'MACD二
次死叉提示卖出,股价下跌幅度会较大。'),colorFF00;
EXPLAIN((COUNT(CLOSE<ref(CLOSE,1),30))>18 AND (COUNT(CLOSE<ref(CLOSE,1),3))=3 AND
(COUNT("MACD.MACD">ref("MACD.MACD",1),30))>18,'MACD反转--股价将可能反转向上。 '),colorFF;
EXPLAIN((COUNT(CLOSE>ref(CLOSE,1),30))>18 AND (COUNT(CLOSE>ref(CLOSE,1),3))=3 AND
(COUNT("MACD.MACD"<ref("MACD.MACD",1),30))>18,'MACD反转--股价将可能反转向下。 '),colorFF00;
EXPLAIN(COUNT(DCJC,20)=2 AND JC AND DEA>0,'MACD在0轴上2金叉;'),color1;
EXPLAIN(COUNT(DCJC,20)=3 AND JC AND DEA>0,'MACD在0轴上3金叉;');
EXPLAIN(COUNT(DCJC,20)=4 AND JC AND DEA>0,'MACD在轴上4金叉;');
LC:=ref(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-LC,0),7,1))/(SMA(ABS(CLOSE-LC),7,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),14,1))/(SMA(ABS(CLOSE-LC),14,1))*100;
EXPLAIN("RSI.RSI1"<15 AND (BARSLAST("RSI.RSI1"<15))>=1,'RSI相对强弱指标超卖,属买入信号。
'),colorFF;
EXPLAIN("RSI.RSI1">85 AND (BARSLAST("RSI.RSI1">85))>=1,'RSI相对强弱指标超买,属卖出信号。
'),colorFF00;
EXPLAIN((LLV(LOW,20)=LOW AND NOT(LLV("RSI.RSI1",20)="RSI.RSI1") OR
(COUNT(CLOSE<ref(CLOSE,1),30))>18 AND (COUNT("RSI.RSI1">ref("RSI.RSI1",1),30))>18) AND
"RSI.RSI1"<20,'RSI相对强弱指标底背离,股价在低位时属买入信号。'),colorFF;
EXPLAIN((HHV(HIGH,20)=HIGH AND NOT(HHV("RSI.RSI1",20)="RSI.RSI1") OR
(COUNT(CLOSE>ref(CLOSE,1),30))>18 AND (COUNT("RSI.RSI1"<ref("RSI.RSI1",1),30))>18) AND
"RSI.RSI1">80,'RSI相对强弱指标顶背离,股价在高位时属卖出信号。'),colorFF00;
EXPLAIN(CROSS("RSI.RSI1","RSI.RSI2") AND "RSI.RSI1"<50,'RSI相对强弱指标金叉属买入信号。
'),colorFF;
EXPLAIN(CROSS("RSI.RSI2","RSI.RSI1") AND "RSI.RSI1">50,'RSI相对强弱指标死叉,属卖出信号。
'),colorFF00;
EXPLAIN("RSI.RSI1"<5,'RSI相对强弱指标极低位,强烈买入信号。'),colorFF;
EXPLAIN("RSI.RSI1">93,'RSI相对强弱指标极高位,强烈卖出信号。'),colorFF00;
EXPLAIN(RSI1<35,'RSI顶背离提示买入;'),colorFF;
EXPLAIN(CROSS(74,RSI1),'RSI顶背离提示卖出;'),colorFF00;
EXPLAIN("KDJ.K"<=20 AND "KDJ.D"<=20,'KD超卖指示买入;'),colorFF;
EXPLAIN("KDJ.K">=80 AND "KDJ.D">=80,'KD超买逢高卖出;'),colorFF00;
EXPLAIN(CROSS("KDJ.K","KDJ.D") AND (COUNT(VOL>ref(VOL,1),30))>3 AND VOL/CAPITAL<=10/100 AND
"KDJ.K"<=20 AND "KDJ.D"<=20,'KD金叉买入,低市值或成交清淡个股应忽略此信号。'),colorFF;
EXPLAIN(CROSS("KDJ.D","KDJ.K") AND "KDJ.K">=60 AND "KDJ.D">=60 AND
(BARSLAST(CROSS("KDJ.D","KDJ.K") AND "KDJ.K">=60 AND "KDJ.D">=60))>=1 AND
(BARSLAST(CROSS("KDJ.D","KDJ.K") AND "KDJ.K">=60 AND "KDJ.D">=60))<=7,'KD二次死叉提示卖出
;'),colorFF00;
EXPLAIN("KDJ.J"<0,'KDJ异常逢低买入'),colorFF;
EXPLAIN(HHV(HIGH,20)=HIGH AND (NOT(HHV("KDJ.K",20)="KDJ.K" OR HHV("KDJ.D",20)="KDJ.D")) OR
(COUNT(CLOSE>ref(CLOSE,1),30))>18 AND ((COUNT("KDJ.K"<ref("KDJ.K",1),30))>18 OR
(COUNT("KDJ.D"<ref("KDJ.D",1),30))>18),'KD顶背离提示卖出;'),colorFF00;
EXPLAIN(LLV(LOW,20)=LOW AND (NOT(LLV("KDJ.K",20)="KDJ.K" OR LLV("KDJ.D",20)="KDJ.D")) OR
(COUNT(CLOSE<ref(CLOSE,1),30))>18 AND ((COUNT("KDJ.K">ref("KDJ.K",1),30))>18 OR
(COUNT("KDJ.D">ref("KDJ.D",1),30))>18),'KD底背离提示买入;'),colorFF;
日K:="KDJ.K#day"(20,5,5);
日D:="KDJ.D#day"(20,5,5);
周K:="KDJ.K#week"(9,3,3);
周D:="KDJ.D#week"(9,3,3);
EXPLAIN(CROSS(日K,日D),'日KD金叉且底背离买入;'),colorFF;
EXPLAIN(CROSS(日D,日K),'日KD死叉且顶背离必须卖出;'),colorFF00;
EXPLAIN(CROSS(周K,周D),'周KD金叉且底背离买入;'),colorFF;
EXPLAIN(CROSS(周D,周K),'周KD死叉且顶背离必须卖出;'),colorFF00;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
UPR:=BBI+3*STD(BBI,10);
DWN:=BBI-3*STD(BBI,10);
VAR55:=(UPR-DWN)/UPR<0.03;
VAR56:=(UPR-DWN)/UPR>0.18;
VAR57:=(MA(CLOSE,60)-MA(CLOSE,5))/MA(CLOSE,60)>0.15;
VAR58:=(MA(CLOSE,5)-MA(CLOSE,60))/MA(CLOSE,5)>0.15;
EXPLAIN(VAR55,'布林线收窄可能变盘;'),colorFF00FF;
EXPLAIN(VAR57 AND VAR56 AND CLOSE>OPEN,'布林上下乖离太大可能反弹;'),colorFF00FF;
EXPLAIN(VAR58 AND VAR56 AND CLOSE<OPEN,'布林上下乖离太大可能回落;'),colorFF00;
EXPLAIN(CROSS(CLOSE,"SAR") AND (ABS(CLOSE-"SAR"))/CLOSE>=0.01,'SAR向上突破提示买入
;'),colorFF;
EXPLAIN(CROSS("SAR",CLOSE) AND (ABS(CLOSE-"SAR"))/CLOSE>=0.01,'SAR向下突破提示卖出
;'),colorFF00;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
EXPLAIN(CCI<-100,'CCI指标底位,买入机会。'),colorFF;
EXPLAIN(CCI>100,'CCI指标高位,卖出机会。'),colorFF00;
EXPLAIN(VOL/CAPITAL>0.075,'换手过大,小心主力出逃,短期头部。'),colorFFFF;
WR:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
EXPLAIN(WR>-20,'W&R超买,即将见顶,应及时卖出。'),colorFF00;
EXPLAIN(WR<-80,'W&R超卖,即将见底,应伺机买进。'),colorFF;
MTM:=CLOSE-ref(CLOSE,6);
MTMMA:=MA(MTM,6);
EXPLAIN(CROSS(MTM,MTMMA),'MTM从下向上突破MTMMA,买入信号。'),colorFF;
EXPLAIN(CROSS(MTMMA,MTM),'MTM从上向下跌破MTMMA,卖出信号。'),colorFF00;
EXPLAIN("ARBR.AR"<50,'ARBR人气指标超卖,属买入信号。'),colorFF;
EXPLAIN("ARBR.AR">200,'ARBR人气指标超买,属卖出信号。'),colorFF00;
EXPLAIN((HHV("ARBR.AR",10)-"ARBR.AR")/HHV("ARBR.AR",10)>=0.5,'ARBR人气指标异常,若股价从高价
下跌,属买入信号。'),colorFF;
EXPLAIN(("ARBR.AR"-LLV("ARBR.AR",10))/LLV("ARBR.AR",10)>=0.5,'ARBR人气指标异常,若股价从低价
上升,属卖出信号。'),colorFF00;
EXPLAIN("ARBR.BR"<50,'ARBR意愿指标显示股价随时反弹考虑买入。'),colorFF;
EXPLAIN("ARBR.BR">300,'ARBR意愿指标显示股价随时下挫考虑卖出。'),colorFF00FF;
EXPLAIN(CROSS("ARBR.AR","ARBR.BR") AND ("ARBR.AR"<50 OR "ARBR.BR"<50),'ARBR人气意愿指标金叉,
属买入信号。'),colorFF;
EXPLAIN(CROSS("ARBR.BR","ARBR.AR") AND ("ARBR.AR">180 OR "ARBR.BR">300),'ARBR人气意愿指标死
叉,属卖出信号。'),colorFF00;
EXPLAIN((COUNT(CLOSE<ref(CLOSE,1),30))>18 AND (COUNT(CLOSE<ref(CLOSE,1),3))=3 AND
(COUNT("OBV.OBV">ref("OBV.OBV",1),30))>18 AND (COUNT("OBV.OBV">ref("OBV.OBV",1),3))=3 AND
(COUNT(VOL>ref(VOL,1),30))>3 AND VOL/CAPITAL<=10/100,'OBV能量潮显示买盘较强属买入信号。
'),colorFF;
EXPLAIN((COUNT(CLOSE>ref(CLOSE,1),30))>18 AND (COUNT(CLOSE>ref(CLOSE,1),3))=3 AND
(COUNT("OBV.OBV">ref("OBV.OBV",1),30))>18 AND (COUNT("OBV.OBV">ref("OBV.OBV",1),3))=3 AND
(COUNT(VOL>ref(VOL,1),30))>3 AND VOL/CAPITAL<=10/100,'OBV能量潮显示买盘逐渐加强属买入信号。
'),colorFF;
EXPLAIN((COUNT(CLOSE>ref(CLOSE,1),30))>18 AND (COUNT(CLOSE>ref(CLOSE,1),3))=3 AND
((COUNT("OBV.OBV"<ref("OBV.OBV",1),30))>18 OR (COUNT("OBV.OBV"<ref("OBV.OBV",1),3))=3),'OBV
能量潮显示买盘无力属卖出信号。 '),colorFF00;
EXPLAIN(CROSS("OBV.OBV",0) AND (COUNT(ref("OBV.OBV",1)<0,3))=3,'OBV能量潮由负转正属买入信号
。'),colorFF;
EXPLAIN(CROSS(0,"OBV.OBV") AND (COUNT(ref("OBV.OBV",1)>0,3))=3,'OBV能量潮由正转负属卖出信号
。'),colorFF00;
EXPLAIN(HHV(HIGH,20)=HIGH AND NOT(HHV("OBV.OBV",20)="OBV.OBV"),'OBV能量潮顶背离属卖出信号。
'),colorFF00;
EXPLAIN(LLV(LOW,20)=LOW AND NOT(LLV("OBV.OBV",20)="OBV.OBV"),'OBV能量潮底背离属买入信号。
'),colorFF;
EXPLAIN((ABS("OBV.OBV"-ref("OBV.OBV",1)))/ABS(MA("OBV.OBV",5))>0.07 AND
"OBV.OBV">ref("OBV.OBV",1),'OBV能量潮异常。若股价在高位属卖出信号,若OBV能量线在低位长时间横
向整理后出现,属买入信号。'),colorFF00FF;
,提示股价形成底部,属买入信号。'),colorFF;
,属卖出信号。'),colorFF00;
EXPLAIN(LLV(LOW,20)=LOW AND NOT(LLV("CR.CR",20)="CR.CR"),'CR能量指标底背离,属买入信号。
'),colorFF;
EXPLAIN(HHV(HIGH,20)=HIGH AND NOT(HHV("CR.CR",20)="CR.CR"),'CR能量指标顶背离,属卖出信号。
'),colorFF00;
EXPLAIN(ABS("CR.MA1"-"CR.MA2")<5 AND ABS("CR.MA1"-"CR.MA3")<5 AND ABS("CR.MA2"-"CR.MA3")<5
OR ABS("CR.MA1"-"CR.CR")<5 AND ABS("CR.MA1"-"CR.MA3")<5 AND ABS("CR.CR"-"CR.MA3")<5,'CR能量
指标异常,一波或长或短的上升或下跌行情即将展开。'),colorFF00FF;
区,属买入信号。'),colorFF;
EXPLAIN(BETWEEN("PSY","PSY">10,"PSY"<25),'PSY心理线指标超卖,属买入信号。'),colorFF;
EXPLAIN("PSY">75,'PSY心理线指标超买,属卖出信号。'),colorFF00;
EXPLAIN(CROSS("ROC.ROC",0),'ROC变动速率指标向上突破,属买入信号。'),colorFF;
EXPLAIN(CROSS(0,"ROC.ROC"),'ROC变动速率指标向下突破,属卖出信号。'),colorFF00;
EXPLAIN(LLV(LOW,20)=LOW AND NOT((COUNT("ROC.ROC"<ref("ROC.ROC",1),30))>18 AND
(COUNT("ROC.ROC"<ref("ROC.ROC",1),3))=3),'ROC变动速率指标,显示下跌动力减弱,属买入信号。
'),colorFF;
EXPLAIN(HHV(HIGH,20)=HIGH AND NOT((COUNT("ROC.ROC">ref("ROC.ROC",1),30))>18 AND
(COUNT("ROC.ROC">ref("ROC.ROC",1),3))=3),'ROC变动速率指标,显示上涨动力减弱,属卖出信号。
'),colorFF00;
EXPLAIN((COUNT(CLOSE>ref(CLOSE,1),30))>18 AND (COUNT(CLOSE>ref(CLOSE,1),3))=3 AND
(COUNT("ROC.ROC">ref("ROC.ROC",1),30))>18 AND (COUNT("ROC.ROC">ref("ROC.ROC",1),3))=3,'ROC变
动速率指标显示短期反弹有望,属买入信号。 '),colorFF;
EXPLAIN((COUNT(CLOSE<ref(CLOSE,1),30))>18 AND (COUNT(CLOSE<ref(CLOSE,1),3))=3 AND
(COUNT("ROC.ROC"<ref("ROC.ROC",1),30))>18 AND (COUNT("ROC.ROC"<ref("ROC.ROC",1),3))=3,'ROC变
动速率指标显示短期警惕回落,属卖出信号。 '),colorFF00;
EXPLAIN("VR"<20,'VR容量比率指标显示股价即将涨升,建议积极买入。'),colorFF;
EXPLAIN("VR">400,'VR容量比率指标显示后续资金枯竭,股价将可能高位下跌,属卖出信号。
'),colorFF00;
EXPLAIN(("VR"/ref("VR",1)>=2 OR "VR"/ref("VR",2)>=2) AND
(COUNT(CLOSE<=ref(CLOSE,1),5))>=3,'VR容量比率指标异常,显示股价即将涨升,属买入信号。
'),colorFF;
EXPLAIN("VR">300 AND (COUNT("VR"<ref("VR",1),5))>=3 AND (COUNT(CLOSE>ref(CLOSE,1),5))>=3,'VR
容量比率指标显示涨势耗尽,建议卖出。 '),colorFF00;
VV6:=(2*CLOSE+HIGH+LOW)/4;
VV7:=LLV(LOW,27);
VV8:=HHV(HIGH,27);
攀:=EMA((VV6-VV7)/(VV8-VV7)*100,13)-50;
金:=EMA(0.618*ref(攀,1)+0.382*攀,3);
起攀:=CROSS(攀,金) AND CLOSE>OPEN;
EXPLAIN(CROSS(攀,金) AND CLOSE>OPEN,'起攀指标发出起攀买入信号。'),colorFF; {文章来至程序化交易网 cxh99.com} {文章来至程序化交易网 cxh99.com} (责任编辑:程序化交易网整理)
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 262069696 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容