把新暴涨主图这两个通达信的公式改成飞狐的
2020/2/18 18:27:51
公式编写说明:
请老师帮助把下面这两个通达信的公式改成飞狐的,谢谢老师!一、新暴涨主图公式名称:新暴涨主图公式描述:暴涨主图与操盘专用均线合并参数 最小 最大 缺省M1 2 1000 5M2 2 1000 10M3 2 1000 20M4 2 1000 30M5 2 1000 60MA1:MA(CLOSE,M1);MA2:MA(CLOSE,M2);MA3:MA(CLOSE,M3);MA4:MA(CLOSE,M4);MA5:MA(CLOSE,M5);涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED;DRAWTEXT(涨停,L-0.1,'涨停'),COLORRED;C3:=REF(C,1);跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,4,0),COLORBLUE;STICKLINE(跌停,OPEN,CLOSE,3,0),COLORBLUE;DRAWTEXT(跌停,H+0.3,'跌停'),COLORBLUE;净资产:FINANCE(34),NODRAW,COLORFF00FF;每股收益:FINANCE(33),NODRAW,COLORFF7F50;市盈率:DYNAINFO(39),NODRAW,COLORFF00FF;流通市值:(FINANCE(40)/100000000),NODRAW,COLORRED;MA10:MA(C,10),COLOR00FFFF,LINETHICK2;DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA:=EMA(DIF,9);AAA:=(DIF-DEA)*2*60;起爆:=CROSS(AAA-REF(AAA,1),15),COLORRED,LINETHICK2;DRAWTEXT(起爆,L*0.99,'↖暴涨'),COLORYELLOW,LINETHICK2;二、暴涨选股公式名称:暴涨选股公式描述:盘中预警DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA:=EMA(DIF,9);AAA:=(DIF-DEA)*2*60;起爆:=CROSS(AAA-REF(AAA,1),15),COLORRED,LINETHICK2;XG:EXIST(起爆,1);第二个预警公式我不知道周期应该是1分钟、5分钟、还是日线好?请老师修改后告知在飞狐预警使用的是哪一个周期。谢谢!
公式源码回答:
{新暴涨主图}
{DCLOSE是未来函数}
INPUT:M1(5,2,1000),M2(10,2,1000),M3(20,2,1000),M4(30,2,1000),M5(60,2,1000);
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
MA5:MA(CLOSE,M5);
涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);
STICKLINE(涨停,OPEN,CLOSE,8,0),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,7,0),COLORRED;
DRAWTEXT(涨停,L-0.1,'涨停'),COLORRED;
C3:=REF(C,1);
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(跌停,OPEN,CLOSE,8,0),COLORBLUE;
STICKLINE(跌停,OPEN,CLOSE,7,0),COLORBLUE;
DRAWTEXT(跌停,H+0.3,'跌停'),COLORBLUE;
净资产:FINANCE(34),LINETHICK0,COLORFF00FF;
每股收益:FINANCE(33),LINETHICK0,COLORFF7F50;
市盈率:DYNAINFO(39),LINETHICK0,COLORFF00FF;
流通市值:(FINANCE(42)/100000000),LINETHICK0,COLORRED;
MA10:MA(C,10),COLOR00FFFF,LINETHICK2;
TH:=BARSLAST(C<REF(C,1));
TL:=BARSLAST(C>REF(C,1));
HC:=SETVAL(C>REF(C,1) OR C=REF(C,1) AND REF(C,1)>REF(C,2),C,-TH,C);
LC:=SETVAL(C<REF(C,1) OR C=REF(C,1) AND REF(C,1)<REF(C,2),C,-TL,C);
DCLOSE:=IF(C>REF(C,1) OR C=REF(C,1) AND REF(C,1)>REF(C,2),HC,IF(C<REF(C,1) OR C=REF(C,1) AND REF(C,1)<REF(C,2),LC,C));
DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(DIF,9);
AAA:=(DIF-DEA)*2*60;
起爆:=CROSS(AAA-REF(AAA,1),15),COLORRED,LINETHICK2;
DRAWTEXT(起爆,L*0.99,'↖暴涨'),COLORYELLOW,LINETHICK2;
{暴涨选股}
{DCLOSE是未来函数}
TH:=BARSLAST(C<REF(C,1));
TL:=BARSLAST(C>REF(C,1));
HC:=SETVAL(C>REF(C,1) OR C=REF(C,1) AND REF(C,1)>REF(C,2),C,-TH,C);
LC:=SETVAL(C<REF(C,1) OR C=REF(C,1) AND REF(C,1)<REF(C,2),C,-TL,C);
DCLOSE:=IF(C>REF(C,1) OR C=REF(C,1) AND REF(C,1)>REF(C,2),HC,IF(C<REF(C,1) OR C=REF(C,1) AND REF(C,1)<REF(C,2),LC,C));
DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(DIF,9);
AAA:=(DIF-DEA)*2*60;
起爆:=CROSS(AAA-REF(AAA,1),15),COLORRED,LINETHICK2;
XG:ANY(起爆,1);
投股 票网 www.tou18 .cn
股市公式下载推荐