公式网 股票指标公式源码分享 登录 注册
公式指标平网
未来函数检测
首页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 东财通公式 飞狐公式 操盘手公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式网 > 飞狐公式 > 正文 → 正文

飞狐涨跌互现公式

发布时间:2012/7/6 6:48:46  浏览次数:

飞狐涨跌互现公式

涨跌互现(源码)
DRAWGBK(1,COLORRGB(100,100,100),COLORRGB(50,50,50),1);
{涨跌互现}
hh:=SYSPARAM(4); ll:=SYSPARAM(5);//对应画面空间
DC:=INDEXC,LINETHICK;
GGS:=BARSCOUNT(C);
Var1:=ZIG(4,15);//个股
GS1:=PEAKBARS(4,15,1);
Var2:=FLATZIG(DC,15);//大盘
PS1:=PEAKBARS(DC,15,1);
XX:=Var1<REF(Var1,1);
YY:=Var2<REF(Var2,1);
FILLRGN(XX,hh,ll),COLOR08683C,color4400;
FILLRGN(NOT(XX),hh,ll),COLORE3C3F3;
{涨跌互现}
股峰:PEAK(4,15,1),LINETHICK;F1:=STRTONUM(NUMTOSTR(GGS-BARSSINCE(股峰),0));
股谷:TROUGH(4,15,1),LINETHICK;G1:=STRTONUM(NUMTOSTR(GGS-BARSSINCE(股谷),0));
大盘峰:PEAK(DC,15,1),LINETHICK;DF:=STRTONUM(NUMTOSTR(GGS-BARSSINCE(大盘峰),0));
大盘谷:TROUGH(DC,15,1),LINETHICK;DG:=STRTONUM(NUMTOSTR(GGS-BARSSINCE(大盘谷),0));
个股:Var1,COLOR00DDFF,LINETHICK2,COLORYELLOW;
大盘:LL+Var2*(HH-LL),COLORFFAF00,LINEDOT;

WF:=GGS<F1;WG:=GGS<G1;WFS:=COUNT(WF,0)>0;WGS:=COUNT(WG,0)>0;
WDF:=GGS<DF;WDG:=GGS<DG;WDFS:=COUNT(WDF,0)>0;WDGS:=COUNT(WDG,0)>0;

IF WGS[SYSPARAM(1)] AND WFS[SYSPARAM(1)] AND WF[SYSPARAM(1)]=0 AND WG[SYSPARAM(1)]=0 THEN
DRAWTEXT(SYSPARAM(2)=BARPOS,LL,'个股涨幅(%):'+ NUMTOSTR((个股[SYSPARAM(1)]/IF(NOT(XX[SYSPARAM(1)]),股谷[SYSPARAM(1)],IF(BARSCOUNT(C)<F1,个股[1],股峰[SYSPARAM(1)]))-1)*100,2)),COLOR0000FF,PXUP30;
ELSE
DRAWTEXT(SYSPARAM(2)=BARPOS,LL,'个股涨幅(%):'+NUMTOSTR((个股[SYSPARAM(1)]/个股[1]-1)*100,2)),COLOR0000FF,PXUP30;

IF WDGS[SYSPARAM(1)] AND WDFS[SYSPARAM(1)] AND WDF[SYSPARAM(1)]=0 AND WDG[SYSPARAM(1)]=0 THEN
DRAWTEXT(SYSPARAM(2)=BARPOS,LL,'大盘涨幅(%):'+NUMTOSTR((DC[SYSPARAM(1)]/IF(NOT(YY[SYSPARAM(1)]),大盘谷[SYSPARAM(1)],大盘峰[SYSPARAM(1)])-1)*100,2)),COLOR3595FF;
ELSE
DRAWTEXT(SYSPARAM(2)=BARPOS,LL,'大盘涨幅(%):'+NUMTOSTR((DC[SYSPARAM(1)]/DC[1]-1)*100,2)),COLOR3595FF;

IF WGS[SYSPARAM(1)] AND WFS[SYSPARAM(1)] AND WF[SYSPARAM(1)]=0 AND WG[SYSPARAM(1)]=0 THEN
DRAWNUMBER(GS1=0,HH,(股峰/股谷-1)*100,2),COLOR0033FF;
ELSE
DRAWNUMBER(GS1=0,HH,(股峰/个股[1]-1)*100,2),COLOR0033FF;

IF WDGS[SYSPARAM(1)] AND WDFS[SYSPARAM(1)] AND WDF[SYSPARAM(1)]=0 AND WDG[SYSPARAM(1)]=0 THEN
DRAWNUMBER(PS1=0,HH,(大盘峰/大盘谷-1)*100,2),COLOR3595FF,PXDN25;
ELSE
DRAWNUMBER(PS1=0,HH,(DC/DC[1]-1)*100,2),COLOR3595FF,PXDN25;

DRAWNUMBER(ISLASTBAR AND NOT(XX),HH,(CLOSE/股谷-1)*100,2),COLORFF00FF;


KLINE(O,H,L,C,0);

{数浪公式}
GET:=ZIG(4,10),COLORYELLOW;
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);
EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);
EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'(A)'),COLORFFFF00,align0,linethick10;
DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFF00FF,align0,linethick10;
DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'(C)'),COLOR0000FF,align0,linethick10;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.03,'⑴'),COLOR0000FF,align0,linethick5;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.97,'⑵'),COLOR0000FF,align0,linethick5;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.03,'⑶'),COLOR0000FF,align0,linethick5;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.97,'⑷'),COLOR0000FF,align0,linethick5;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.03,'⑸'),COLOR0000FF,align0,linethick5;
DRAWTEXT(EN2 AND DTJZ10=1,L*0.96,'Ⅰ'),COLORFF00FF,align0,linethick5;
DRAWTEXT(EX2 AND DTJD10=2,H*1.04,'Ⅱ'),COLORFFFF00,align0,linethick5;
DRAWTEXT(EN3 AND ZTJZ10=1,L*0.96,'Ⅲ'),COLOR0000FF,align0,linethick5;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.03,'①'),COLOR00FFFF,align0,linethick5;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.97,'②'),COLOR00FFFF,align0,linethick5;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.03,'③'),COLOR00FFFF,align0,linethick5;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.97,'④'),COLOR00FFFF,align0,linethick5;

飞狐涨跌互现公式

资源下载链接   资源大小:unknow

手机移动版 - 关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZX.COM.CN ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识