飞狐个股强弱主图指标公式

[复制链接]
查看199 | 回复0 | 2021-8-21 11:31:15 | 显示全部楼层 |阅读模式

个股:=CLOSE/INDEXC*1000,LINETHICK0;
A:=(CLOSE/REF(CLOSE,1)-1)*100;
B:=(INDEXC/REF(INDEXC,1)-1)*100;
涨跌幅:A-B,LINETHICK0,COLORYELLOW;
{STICKLINE(CLOSE>=REF(CLOSE,1),ABS(涨跌幅),0,6,0),COLORRED;
STICKLINE(CLOSE<REF(CLOSE,1),ABS(涨跌幅),0,6,0),COLORGREEN;
STICKLINE(CLOSE>=REF(CLOSE,1) AND INDEXC<REF(INDEXC,1) AND 个股>REF(个股,1),ABS(涨跌幅),0,4,0),COLOR00FFFF;
STICKLINE(CLOSE>=REF(CLOSE,1) AND INDEXC>REF(INDEXC,1) AND 个股<REF(个股,1),ABS(涨跌幅),0,4,0),COLORCYAN;
STICKLINE(CLOSE<REF(CLOSE,1) AND INDEXC>REF(INDEXC,1),ABS(涨跌幅),0,4,0),COLORBLUE;
STICKLINE(CLOSE<REF(CLOSE,1) AND INDEXC<REF(INDEXC,1) AND 个股>REF(个股,1),ABS(涨跌幅),0,4,0),COLORMAGENTA;}
BB:=HHV(ABS(涨跌幅),SYSPARAM(3)-SYSPARAM(2));
HH:=SYSPARAM(4);
LL:=SYSPARAM(5);
TT:=IF(HH-LL<=2.5,0.25,IF(HH-LL<=5,0.8,IF(HH-LL<=10,2,IF(HH-LL<=20,3,IF(HH-LL<=31,4,IF(HH-LL<=41,5,IF(HH-LL<=50,6,IF(HH-LL<=60,7,IF(HH-LL<=70,8,IF(HH-LL<=80,9,1))))))))));
{MA(ABS(涨跌幅)/BB*0.9*TT+LL,5)-0.04;
MA(ABS(涨跌幅)/BB*0.9*TT+LL,10)-0.04;
MA(ABS(涨跌幅)/BB*0.9*TT+LL,34)-0.04;}
STICKLINE(C>=REF(C,1),ABS(涨跌幅)/BB*0.9*TT+LL-0.04,LL-0.04,4,1)COLOR9090EE;
STICKLINE(C< REF(C,1 ),ABS(涨跌幅)/BB*0.9*TT+LL-0.04,LL-0.04,4,1)COLORBLUE;
STICKLINE(CLOSE>=REF(CLOSE,1),ABS(涨跌幅)/BB*0.9*TT+LL-0.04,LL-0.04,6,0),COLORRED;
STICKLINE(CLOSE<REF(CLOSE,1),ABS(涨跌幅)/BB*0.9*TT+LL-0.04,LL-0.04,6,0),COLORGREEN;
STICKLINE(CLOSE>=REF(CLOSE,1) AND INDEXC<REF(INDEXC,1) AND 个股>REF(个股,1),ABS(涨跌幅)/BB*0.9*TT+LL-0.04,LL-0.04,4,0),COLOR00FFFF;
STICKLINE(CLOSE>=REF(CLOSE,1) AND INDEXC>REF(INDEXC,1) AND 个股<REF(个股,1),ABS(涨跌幅)/BB*0.9*TT+LL-0.04,LL-0.04,4,0),COLORCYAN;
STICKLINE(CLOSE<REF(CLOSE,1) AND INDEXC>REF(INDEXC,1),ABS(涨跌幅)/BB*0.9*TT+LL-0.04,LL-0.04,4,0),COLORBLUE;
STICKLINE(CLOSE<REF(CLOSE,1) AND INDEXC<REF(INDEXC,1) AND 个股>REF(个股,1),ABS(涨跌幅)/BB*0.9*TT+LL-0.04,LL-0.04,4,0),COLORMAGENTA;
PARTLINE(v>0,2/BB*0.9*TT+LL-0.04),COLORDDFF00,LINEDOT;
STICKLINE(C>=O,C,O,8,0),COLOR0055AA;
STICKLINE(C<=O,C,O,8,0),COLOR006600;
STICKLINE(C>=O,C,O,5,0),COLOR0077CC;
STICKLINE(C>=O,C,O,3,0),COLOR0099DD;
STICKLINE(C>=O,H,L,0,0),COLOR00BBFF;
STICKLINE(C<=O,C,O,5,0),COLOR009900;
STICKLINE(C<=O,C,O,3,0),COLOR00BB00;
STICKLINE(C<=O,H,L,0,0),COLOR00EE00;
A5:=100*(CLOSE-REF(CLOSE,5))/REF(CLOSE,5);
B5:=100*(INDEXC-REF(INDEXC,5))/REF(INDEXC,5);
五日强弱:A5-B5,LINETHICK0L;
A10:=100*(CLOSE-REF(CLOSE,10))/REF(CLOSE,10);
B10:=100*(INDEXC-REF(INDEXC,10))/REF(INDEXC,10);
十日强弱:A10-B10,COLORYELLOW,LINETHICK0;
A30:=100*(CLOSE-REF(CLOSE,30))/REF(CLOSE,30);
B30:=100*(INDEXC-REF(INDEXC,30))/REF(INDEXC,30);
三十日强弱:A30-B30,COLORRED,LINETHICK0;
ma1:EMA(CLOSE,12);
ma2:EMA(CLOSE,26);
PARTLINE(C>=ma1,ma1),COLORRED;
PARTLINE(C<ma1,ma1),COLORGREEN;
PARTLINE(C>=ma2,ma2),COLORRED,LINETHICK2;
PARTLINE(C<ma2,ma2),COLORGREEN,LINETHICK2;
D:=IF(MA1>=MA2,MA1-MA2,MA2-MA1);
PARTLINE(MA1>=MA2 AND MA1>=REF(MA1,1),MA1-D*4/5),COLORRED;
PARTLINE(MA1>=MA2 AND MA1>=REF(MA1,1),MA1-D*3/5),COLORRED;
PARTLINE(MA1>=MA2 AND MA1>=REF(MA1,1),MA1-D*2/5),COLORRED;
PARTLINE(MA1>=MA2 AND MA1>=REF(MA1,1),MA1-D*1/5),COLORRED;
PARTLINE(MA1>=MA2 AND MA1<REF(MA1,1),MA1-D*4/5),COLORYELLOW;
PARTLINE(MA1>=MA2 AND MA1<REF(MA1,1),MA1-D*3/5),COLORYELLOW;
PARTLINE(MA1>=MA2 AND MA1<REF(MA1,1),MA1-D*2/5),COLORYELLOW;
PARTLINE(MA1>=MA2 AND MA1<REF(MA1,1),MA1-D*1/5),COLORYELLOW;
PARTLINE(MA1<MA2 AND MA1<REF(MA1,1),MA2-D*4/5),COLORGREEN;
PARTLINE(MA1<MA2 AND MA1<REF(MA1,1),MA2-D*3/5),COLORGREEN;
PARTLINE(MA1<MA2 AND MA1<REF(MA1,1),MA2-D*2/5),COLORGREEN;
PARTLINE(MA1<MA2 AND MA1<REF(MA1,1),MA2-D*1/5),COLORGREEN;
PARTLINE(MA1<MA2 AND MA1>=REF(MA1,1),MA2-D*4/5),COLORMAGENTA;
PARTLINE(MA1<MA2 AND MA1>=REF(MA1,1),MA2-D*3/5),COLORMAGENTA;
PARTLINE(MA1<MA2 AND MA1>=REF(MA1,1),MA2-D*2/5),COLORMAGENTA;
PARTLINE(MA1<MA2 AND MA1>=REF(MA1,1),MA2-D*1/5),COLORMAGENTA;
指定位置显示文字(1,0,0,0,(' 所属板块:' + BLKNAME) + '\n'),COLOR00FFFF;

202108211127.jpg

202108211127.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则