公益参谋 通达信副图指标 源码 贴图
公益参谋 通达信副图指标 源码 贴图
因本人原来用的好参谋升极了,现改做公益,转馈需求者,该指标仍呈现本人好色之图,醒目多功能,遇各股以色与图标区分诸状况,需要者可偷偷笑纳,见色忘友无妨,见色即喷请退避,若无益与您,也无害与您对吗?取舍自由,言论自由,悉听尊便即可。
{=====大盘K线======}
100;
DRAWRECTREL(0,0,1000,1000,RGB(50,70,50));
DRAWRECTREL(650,0,1000,180,RGB(20,50,20));
{=======成交量=========}
定位:=0;
根数:=41;
系数A:=CONST(HHV(ABS(VOL),根数));
成交A:=VOL/系数A*40,VOLSTICK;
成交:=IF(成交A>80,80,成交A);
条件阳:=C>O OR (C=O AND C>=REF(C,1));
条件阴:=C<O OR (C=O AND C<REF(C,1));
STICKLINE(REFX(条件阳 ,定位) AND CURRBARSCOUNT>定位 AND CURRBARSCOUNT<定位+根数,0,REFX(成交,定位)+18,2,2),COLOR0055FF;
STICKLINE(REFX(条件阴 ,定位) AND CURRBARSCOUNT>定位 AND CURRBARSCOUNT<定位+根数,0,REFX(成交,定位)+18,2,0),COLORFFFF55;
DRAWRECTREL(650,820,1000,1000,RGB(20,50,20));
DRAWRECTREL(5,50,160,950,RGB(50,70,50));
{=====大盘K线=====}
定位C:=101;
根数C:=18;
高值3:=CONST(HHV("999999$H",30));
低值3:=CONST(LLV("999999$L",30));
偏值3:=(高值3-低值3)*0.2;
高A3:=IF(CURRBARSCOUNT>定位C {AND CURRBARSCOUNT<根数C},REFX(根数C/(偏值3/("999999$H"-低值3)),定位C),DRAWNULL);
开A3:=IF(CURRBARSCOUNT>定位C {AND CURRBARSCOUNT<根数C},REFX(根数C/(偏值3/("999999$O"-低值3)),定位C),DRAWNULL);
低A3:=IF(CURRBARSCOUNT>定位C {AND CURRBARSCOUNT<根数C},REFX(根数C/(偏值3/("999999$L"-低值3)),定位C),DRAWNULL);
收A3:=IF(CURRBARSCOUNT>定位C {AND CURRBARSCOUNT<根数C},REFX(根数C/(偏值3/("999999$C"-低值3)),定位C),DRAWNULL);
DRAWKLINE(高A3,开A3,低A3,收A3);
MMM :=IF(CURRBARSCOUNT<41,1,DRAWNULL);
{======短期线=======}
周期类型:=PERIOD;
WWW1:=IF(周期类型=5,'日 ','周 ');
DRAWRECTREL(195,50,440,190,RGB(50,80,50));
DRAWRECTREL(195,240,440,370,RGB(50,80,50));
DRAWRECTREL(195,420,440,550,RGB(50,80,50));
DRAWRECTREL(165,0,190,1000,RGB(50,80,50));
DRAWRECTREL(170,50,185,950,RGB(20,50,20));
DRAWTEXT_FIX(周期类型=5 OR 周期类型=6,0.174,0.15,0,'大 '),COLORWHITE;
DRAWTEXT_FIX(周期类型=5 OR 周期类型=6,0.174,0.35,0,'盘'),COLORWHITE;
DRAWTEXT_FIX(周期类型=5 OR 周期类型=6,0.174,0.55, 0,WWW1),COLORWHITE;
DRAWTEXT_FIX(周期类型=5 OR 周期类型=6,0.174,0.75, 0,'线 '),COLORWHITE;
{=====买及止损告知======}
均价:=(3*C+H+L+O)/6;
VAR1:=(8*均价+7*REF(均价,1)+6*REF(均价,2)+5*REF(均价,3)+4*REF(均价,4)+3*REF(均价,5)+2*REF(均价,6)+REF(均价,8))/36;
VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)AND CLOSE>VAR2 AND CLOSE<VAR1;
SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1)AND CLOSE<VAR2) OR (VAR1>VAR2 AND VAR1<REF(VAR1,1)AND VAR2<REF(VAR2,1) AND CLOSE<VAR2);
SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<VAR2;
XD1:=VAR1=VAR2 AND CLOSE<VAR2 OR (VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1)AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<VAR2);
XD2:=VAR1=VAR2 AND CLOSE>VAR1;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
WW1:=' 【 调 整 结 束 短 线 介 入 】'; WW2:=' 【 转 向 特 征 注 意 离 场 】';
WW3:=' 【 股 价 偏 离 注 意 调 整 】'; QQ1:=' 【 上 升 通 道 走 势 良 好 】';
QQ2:=' 【 通 道 改 变 坚 决 离 场 】'; QQ3:=' 【 上 升 通 道 调 整 洗 盘 】';
KK1:=' 【 短 期 底 部 准 备 进 入 】'; KK2:=' 【 下 跌 通 道 只 宜 观 望 】';
AKK:=IF(CONST(SZ1)=1,WW1,IF(CONST(SZ5)=1,WW2,IF(CONST(SZ3)=1,WW3,IF(CONST(SZ2)=1,QQ1,
IF(CONST(SZ6)=1,QQ2,IF(CONST(SZ4)=1,QQ3,IF(CONST(XD2)=1,KK1,IF(CONST(XD1)=1,KK2,DRAWNULL))))))));
AA5:=STRCAT(' ',AKK);
DRAWTEXT_FIX(C>0,0.32,0.27,0,AA5),COLORWHITE;
DRAWICON(CURRBARSCOUNT=81 AND (CONST(SZ1)=1 OR CONST(XD2)=1 OR CONST(SZ2)=1 OR CONST(SZ4)=1),73,38);
DRAWICON(CURRBARSCOUNT=81 AND (CONST(SZ5)=1 OR CONST(SZ3)=1 OR CONST(SZ6)=1 OR CONST(XD1)=1),73,39);
AA6:=STRCAT(STRCAT(DYBLOCK,' ' ),HYBLOCK);
DRAWTEXT_FIX(C>0,0.2,0.08,0,AA6),COLORWHITE;
DRAWRECTREL(340,50,440,190,RGB(50,10,70));{左上屏色彩}
AA7:=STRCAT(STRCAT(STRCAT(STRCAT('套牢 : ',CON2STR(CONST(100-WINNER(CLOSE)*100),2)),' % 跑道费 :'),CON2STR(C*0.006,2)),' 元');
DRAWTEXT_FIX(C>0,0.275,0.08,0,AA7),COLORYELLOW;
TT:=240/FROMOPEN;
比:=TT;
AY2:=EMA(CLOSE,12)-EMA(CLOSE,26);
AZ2:=EMA(AY2,9);
LT2:=(AY2-AZ2);
L211:=IF(LT2,LLV(L,21),DRAWNULL),COLOR217158,CIRCLEDOT;
ZGD:=HHV(H,80)*0.99;
ZGD2:=CONST(ZGD);
ZDD:=LLV(L211,80);
ZDD2:=CONST(ZDD);
YA4:=MA(CLOSE,20);
YA5:=(CLOSE > MA(CLOSE,5));
YA6:=(MA(CLOSE,5) > MA(CLOSE,10));
YA7:=(CLOSE > MA(CLOSE,10));
YA8:=(MA(CLOSE,5) > MA(CLOSE,20));
YA9:=(CLOSE > MA(CLOSE,20));
YA10:=REF(YA4,1);
YA11:=(YA4 > YA10);
YAVX:=(((((IF(YA5,10,(0 - 10)) + IF(YA6,10,(0 - 10))) + IF(YA7,10,(0 - 10))) + IF(YA8,10,(0 - 10))) + IF(YA9,10,(0 - 10))) + IF(YA11,10,(0 - 10)));
DSLX:=(CLOSE / INDEXC);
DSLX1:=MA(DSLX,5);
DSLX2:=MA(DSLX,10);
YYV1:=MA(VOL,5);
YYV2:=MA(VOL,10);
J1:=CONST(IF( YAVX > 0,200,100));
J2:=CONST(IF( YAVX > 0,00,100));
J3:=CONST(IF( YAVX > 0,100,100));
ZGD3:=ZGD2; ZDD3:=ZDD2; ZGD4:=ZGD2;
情况1:=CONST(IF(((CROSS(YAVX,1) AND (YYV1 >= YYV2)) AND (DSLX >= DSLX1)),1,0));
情况2:=CONST(IF(((CROSS(YAVX,1) AND (YYV1 < YYV2)) AND (DSLX >= DSLX1)),1,0));
情况3:=CONST(IF(((CROSS(YAVX,1) AND (YYV1 > YYV2)) AND (DSLX < DSLX1)),1,0));
情况4:=CONST(IF(((CROSS(YAVX,1) AND (YYV1 <= YYV2)) AND (DSLX < DSLX1)),1,0));
情况5:=CONST(IF(((CROSS(1,YAVX) AND (YYV1 >= YYV2)) AND (DSLX >= DSLX1)),1,0));
情况6:=CONST(IF(((CROSS(1,YAVX) AND (YYV1 < YYV2)) AND (DSLX >= DSLX1)),1,0));
情况7:=CONST(IF(((CROSS(1,YAVX) AND (YYV1 >= YYV2)) AND (DSLX < DSLX1)),1,0));
情况8:=CONST(IF(((CROSS(1,YAVX) AND (YYV1 < YYV2)) AND (DSLX < DSLX1)),1,0));
情况9:=CONST(IF(((((YAVX >= 1) AND (REF(YAVX,1) > 0)) AND (YYV1 >= YYV2)) AND (DSLX >= DSLX1)),1,0));
情况10:=CONST(IF(((((YAVX >= 1) AND (REF(YAVX,1) > 0)) AND (YYV1 < YYV2)) AND (DSLX >= DSLX1)),1,0));
情况11:=CONST(IF(((((YAVX >= 1) AND (REF(YAVX,1) > 0)) AND (YYV1 >= YYV2)) AND (DSLX < DSLX1)),1,0)),NODRAW;
情况12:=CONST(IF(((((YAVX >= 1) AND (REF(YAVX,1) > 0)) AND (YYV1 < YYV2)) AND (DSLX < DSLX1)),1,0));
情况13:=CONST(IF(((((YAVX < 1) AND (REF(YAVX,1) < 0)) AND (YYV1 >= YYV2)) AND (DSLX >= DSLX1)),1,0));
情况14:=CONST(IF(((((YAVX < 1) AND (REF(YAVX,1) < 0)) AND (YYV1 < YYV2)) AND (DSLX >= DSLX1)),1,0));
情况15:=CONST(IF(((((YAVX < 1) AND (REF(YAVX,1) < 0)) AND (YYV1 >= YYV2)) AND (DSLX < DSLX1)),1,0));
情况16:=CONST(IF(((((YAVX < 1) AND (REF(YAVX,1) < 0)) AND (YYV1 < YYV2)) AND (DSLX < DSLX1)),1,0));
大盘1:=CONST(IF((CROSS(YAVX,1) AND (YYV1 >= YYV2)),1,0));
大盘2:=CONST(IF((CROSS(YAVX,1) AND (YYV1 < YYV2)),1,0));
大盘3:=CONST(IF((CROSS(1,YAVX) AND (YYV1 >= YYV2)),1,0));
大盘4:=CONST(IF((CROSS(1,YAVX) AND (YYV1 < YYV2)),1,0));
大盘5:=CONST(IF((((YAVX >= 1) AND (REF(YAVX,1) > 0)) AND (YYV1 >= YYV2)),1,0));
大盘6:=CONST(IF((((YAVX >= 1) AND (REF(YAVX,1) > 0)) AND (YYV1 < YYV2)),1,0));
大盘7:=CONST(IF((((YAVX < 1) AND (REF(YAVX,1) < 0)) AND (YYV1 >= YYV2)),1,0));
大盘8:=CONST(IF((((YAVX < 1) AND (REF(YAVX,1) < 0)) AND (YYV1 < YYV2)),1,0));
间隔:=0.2;{www.gpxiazai.com}
TAS1:=IF(情况1=1,1,0.015{首位});
TAS2:=IF(情况2=1,TAS1+间隔,TAS1);
TAS3:=IF(情况3=1,TAS2+间隔,TAS2);
TAS4:=IF(情况4=1,TAS3+间隔,TAS3);
TAS5:=IF(情况5=1,TAS4+间隔,TAS4);
TAS6:=IF(情况6=1,TAS5+间隔,TAS5);
TAS7:=IF(情况7=1,TAS6+间隔,TAS6);
TAS8:=IF(情况8=1,TAS7+间隔,TAS7);
TAS9:=IF(情况9=1,TAS8+间隔,TAS8);
TAS10:=IF(情况10=1,TAS9+间隔,TAS9);
TAS11:=IF(情况11=1,TAS10+间隔,TAS10);
TAS12:=IF(情况12=1,TAS11+间隔,TAS11);
TAS13:=IF(情况13=1,TAS12+间隔,TAS12);
TAS14:=IF(情况14=1,TAS13+间隔,TAS13);
TAS15:=IF(情况15=1,TAS14+间隔,TAS14);
TAS16:=IF(情况16=1,TAS15+间隔,TAS15);
高低位:=0.44;
DRAWTEXT_FIX(情况1=1, TAS1,高低位,0,'量 能 理 想 , 明 显 走 强 , 仓 位 控 在 70 % 左 右 '),COLORWHITE;
DRAWTEXT_FIX(情况2=1, TAS2,高低位,0,'走 势 趋 强 , 短 线 进 场 , 仓 位 在 50 % 左 右 。'),COLORWHITE;
DRAWTEXT_FIX(情况3=1, TAS3,高低位,0,'量 价 良 好 , 短 线 可 进 场 , 仓 位 50 % 左 右 '),COLORWHITE;
DRAWTEXT_FIX(情况4=1, TAS4,高低位,0,'形 态 尚 可 , 未 全 走 强 , 仓 位 30 % 左 右 。'),COLORWHITE;
DRAWTEXT_FIX(情况5=1, TAS5,高低位,0,'形 态 已 变 坏 , 重 仓 者 减 大 半 , 清 仓 者 观 望'),COLORWHITE;
DRAWTEXT_FIX(情况6=1, TAS6,高低位,0,'随 大 盘 下 跌 , 明 显 缩 量 , 减 持 或 清 仓 '),COLORWHITE;
DRAWTEXT_FIX(情况7=1, TAS7,高低位,0,'该 股 放 量 下 跌 , 不 抢 反 弹 , 离 场 观 望 。'),COLORWHITE;
DRAWTEXT_FIX(情况8=1, TAS8,高低位,0,'该 股 缩 量 下 跌 , 人 气 散 失 , 离 场 观 望 。'),COLORWHITE;
DRAWTEXT_FIX(情况9=1, TAS9,高低位,0,'该 股 形 态 良 好 , 强 势 明 显 , 可 以 继 续 持 有'),COLORWHITE;
DRAWTEXT_FIX(情况10=1,TAS10,高低位,0,'上 行 趋 势 不 变 , 量 能 转 弱 , 注 意 风 险 。'),COLORWHITE;
DRAWTEXT_FIX(情况11=1,TAS11,高低位,0,'该 股 仍 具 潜 力 , 但 偏 弱 ,可 以 考 虑 减 仓 。'),COLORWHITE;
DRAWTEXT_FIX(情况12=1,TAS12,高低位,0,'该 股 走 势 趋 弱 , 减 大 部 分 筹 码 或 空 仓 。'),COLORWHITE;
DRAWTEXT_FIX(情况13=1,TAS13,高低位,0,'该 股 形 态 不 佳 , 注 意 成 交 量 ,不 适 合 参 与'),COLORWHITE;
DRAWTEXT_FIX(情况14=1,TAS14,高低位,0,'该 股 趋 势 不 明 , 股 价 偏 弱 , 暂 不 参 与 。'),COLORWHITE;
DRAWTEXT_FIX(情况15=1,TAS15,高低位,0,'有 走 强 迹 象 , 但 量 能 不 足 , 不 适 合 操 作'),COLORWHITE;
DRAWTEXT_FIX(情况16=1,TAS16,高低位,0,'该 股 走 势 太 弱 , 并 没 有 太 大 的 参 与 价 值'),COLORWHITE;
状况升:=情况1=1 OR 情况2=1 OR 情况3=1 OR 情况4=1 OR 情况9=1 OR 情况10=1;
状况降:=情况5=1 OR 情况6=1 OR 情况7=1 OR 情况8=1 ;
状况平:=情况11=1 OR 情况12=1 OR 情况13=1 OR 情况14=1 OR 情况15=1 OR 情况16=1;
DRAWICON(CURRBARSCOUNT=95 AND 状况升,55,33);
DRAWICON(CURRBARSCOUNT=95 AND 状况降,55,31);
DRAWICON(CURRBARSCOUNT=95 AND 状况平,55,32);
{=============}
LC:=REF(CLOSE,1);
WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
获利筹码:=CONST(WINNER(C)*100);
SATT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能饱和:=(IF(SATT>1,1,SATT)*100);
WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活跃:=(WRSI-WR10);
活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));
DRAWTEXT_FIX(1,0.265,0.61,1,STRCAT(STRCAT('量能饱和:',CON2STR(量能饱和,2)),'%')),COLORWHITE;
DRAWTEXT_FIX(1,0.265,0.74,1,STRCAT(STRCAT('活跃度比:',CON2STR(活跃度比,2)),'%')),COLORWHITE;
DRAWTEXT_FIX(1,0.265,0.87,1,STRCAT(STRCAT('获利筹码:',CON2STR(获利筹码,2)),'%')),COLORWHITE;
DRAWRECTREL(440,607,268,684,RGB(250,250,250));
DRAWRECTREL(440,610,268,680,RGB(150,10,250));
DRAWRECTREL(440,736,268,814,RGB(250,250,250));
DRAWRECTREL(440,740,268,810,RGB(150,10,250));
DRAWRECTREL(440,866,268,943,RGB(250,250,250));
DRAWRECTREL(440,870,268,940,RGB(150,10,250));
DRAWRECTREL(440,610,268+CONST(量能饱和*(440-268)/100),680,RGB(0,100,0));
DRAWRECTREL(440,740,268+CONST(活跃度比*(440-268)/100),810,RGB(0,100,0));
DRAWRECTREL(440,870,268+CONST(获利筹码*(440-268)/100),940,RGB(0,100,0));
主力筹码估算:=EMA(WINNER(CLOSE)*70,3),NODRAW,LINETHICK0;
散户筹码估算:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3),NODRAW;
主力控盘比率:=主力筹码估算/(主力筹码估算+散户筹码估算)*100,NODRAW,LINETHICK0;
控盘比率:=STRCAT(STRCAT('主力控盘比率: ',VAR2STR(主力控盘比率,2)),' %');
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.21,0.27,0,控盘比率),COLORYELLOW;
{==========个股九转============}
AP1:=C<=REF(C,4) OR C<=REF(L,4);
条约A8:=AP1 AND REF(AP1=0,8) AND REF(AP1=1,1) AND EVERY(AP1,8);
条约A9:=AP1 AND REF(AP1=0,9) AND REF(AP1=1,1) AND EVERY(AP1,9);
BA1:=C>=REF(C,4) OR C>=REF(H,4);
条约BA8:=BA1 AND REF(BA1=0,8) AND REF(BA1=1,1) AND EVERY(BA1,8);
条约BA9:=BA1 AND REF(BA1=0,9) AND REF(BA1=1,1) AND EVERY(BA1,9);
XXX:=条约A8 OR 条约BA8;
DRAWNUMBER( XXX=0 AND REFX(XXX=1,1) AND MMM ,93.3,7),COLORWHITE;
DRAWNUMBER( XXX=0 AND REFX(XXX=0,1) AND REFX(XXX=1,2)AND MMM ,93.3,6),COLORWHITE;
DRAWNUMBER( XXX=0 AND REFX(XXX=0,2) AND REFX(XXX=1,3)AND MMM ,93.3,5),COLORWHITE;
DRAWNUMBER( XXX=0 AND REFX(XXX=0,3) AND REFX(XXX=1,4)AND MMM ,93.3,4),COLORWHITE;
DRAWNUMBER( XXX=0 AND REFX(XXX=0,4) AND REFX(XXX=1,5)AND MMM ,93.3,3),COLORWHITE;
DRAWNUMBER( XXX=0 AND REFX(XXX=0,5) AND REFX(XXX=1,6)AND MMM ,93.3,2),COLORWHITE;
DRAWNUMBER( XXX=0 AND REFX(XXX=0,6) AND REFX(XXX=1,7)AND MMM ,93.3,1),COLORWHITE;
DRAWNUMBER(条约A8 OR 条约BA8 AND MMM ,93.3,8),COLORWHITE;
DRAWNUMBER(条约A9 OR 条约BA9 AND MMM,93.3,9),COLORWHITE;
STICKLINE(条约A8 OR 条约A9 AND MMM,96,97,3,0),COLORRED;
STICKLINE(条约BA8 OR 条约BA9 AND MMM,96,97,3,0),COLORGREEN;
{=====大盘九转=====}
CP1:="999999$C"<=REF("999999$C",4) OR "999999$C"<=REF("999999$L",4);
条约AF8:=CP1 AND REF(CP1=0,8) AND REF(CP1=1,1) AND EVERY(CP1,8);
条约AF9:=CP1 AND REF(CP1=0,9) AND REF(CP1=1,1) AND EVERY(CP1,9);
DA1:="999999$C">=REF("999999$C",4) OR "999999$C">=REF("999999$H",4);
条约BF8:=DA1 AND REF(DA1=0,8) AND REF(DA1=1,1) AND EVERY(DA1,8);
条约BF9:=DA1 AND REF(DA1=0,9) AND REF(DA1=1,1) AND EVERY(DA1,9);
XXXA:=条约AF8 OR 条约BF8;
DRAWNUMBER( XXXA=0 AND REFX(XXXA=1,1) AND MMM,8,7),COLORWHITE;
DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,1) AND REFX(XXXA=1,2) AND MMM,8,6),COLORWHITE;
DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,2) AND REFX(XXXA=1,3) AND MMM,8,5),COLORWHITE;
DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,3) AND REFX(XXXA=1,4) AND MMM,8,4),COLORWHITE;
DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,4) AND REFX(XXXA=1,5) AND MMM,8,3),COLORWHITE;
DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,5) AND REFX(XXXA=1,6) AND MMM,8,2),COLORWHITE;
DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,6) AND REFX(XXXA=1,7) AND MMM,8,1),COLORWHITE;
DRAWNUMBER(条约AF8 OR 条约BF8 AND MMM,8,8),COLORWHITE;
DRAWNUMBER(条约AF9 OR 条约BF9 AND MMM,8,9),COLORWHITE;
STICKLINE(条约AF8 OR 条约AF9 AND MMM,11,10,3,0),COLORRED;STICKLINE(条约BF8 OR 条约BF9 AND MMM,11,10,3,0),COLORGREEN;
DRAWRECTREL(475,50,643,950,RGB(50,70,50));
DRAWRECTREL(648,0,653,1000,RGB(20,50,20));
WWW2:=IF(周期类型=5,'周 ','月 ');
DRAWRECTREL(445,0,470,1000,RGB(50,80,50));
DRAWRECTREL(450,50,465,950,RGB(20,50,20));
DRAWTEXT_FIX(C>0,0.454,0.15, 0,'个 '),COLORWHITE;
DRAWTEXT_FIX(C>0,0.454,0.33, 0,'股 '),COLORWHITE;
DRAWTEXT_FIX(C>0,0.454,0.51, 0,WWW2),COLORWHITE;
DRAWTEXT_FIX(C>0,0.454,0.69, 0,'线 '),COLORWHITE;
{=====个股K线=========}
定位A:=41;
根数A:=21;
ZQZ:=TOTALBARSCOUNT;
ZQ1:=BARSCOUNT(C);
ZH:=ISLASTBAR;
N1:=ZQZ-ZQ1;{周K线显示开始位置}
HH1:=IF(周期类型=6,FSKY.ZH#MONTH,IF(周期类型=5,FSKY.ZH#WEEK,IF(周期类型=4,FSKY.ZH#DAY,DRAWNULL))),LINETHICK;
LL1:=IF(周期类型=6,FSKY.ZL#MONTH,IF(周期类型=5,FSKY.ZL#WEEK,IF(周期类型=4,FSKY.ZL#DAY,DRAWNULL))),LINETHICK;
CAC1:=IF(周期类型=6,FSKY.ZC#MONTH,IF(周期类型=5,FSKY.ZC#WEEK,IF(周期类型=4,FSKY.ZC#DAY,DRAWNULL))),LINETHICK;
OO1:=IF(周期类型=6,FSKY.ZO#MONTH,IF(周期类型=5,FSKY.ZO#WEEK,IF(周期类型=4,FSKY.ZO#DAY,DRAWNULL))),LINETHICK;
QA1:=IF(周期类型=6,FSKY.DT1#MONTH,IF(周期类型=5,FSKY.DT1#WEEK,IF(周期类型=4,FSKY.DT1#DAY,DRAWNULL))),LINETHICK;
QA2:=QA1>REF(QA1,1);{分K线更后}
QA3:=SUM(QA2,0);{当前分K线位置}
QA4:=CONST(QA3)-QA3;
SAAU:=IF(ZH,0,SUMBARS(QA2,N1-QA4)-1);
CA1:=REF(CAC1,SAAU);
OA1:=REF(OO1,SAAU);
HA1:=REF(HH1,SAAU);
LA1:=REF(LL1,SAAU);
ARC:=REFX(CA1,定位A);
ARO:=REFX(OA1,定位A);
ARH:=REFX(HA1,定位A);
ARL:=REFX(LA1,定位A);
AJ4:=ARC>=REF(ARC,1);
AJ5:=ARC<REF(ARC,1);
过滤A:=ARH=REF(ARH,1) AND ARL=REF(ARL,1);
WA:=N1<定位A+根数A AND 过滤A=0;{周K线显示区域}
高值1:=CONST(HHV(ARH,60));
低值1:=CONST(LLV(ARL,60));
偏值1:=(高值1-低值1);
调高低:=60;
高A1:=IF(WA ,调高低/(偏值1/(ARH-低值1))+3,DRAWNULL);
开1:=IF(WA ,调高低/(偏值1/(ARO-低值1))+3,DRAWNULL);
低1:=IF(WA,调高低/(偏值1/(ARL-低值1))+3,DRAWNULL);
收1:=IF(WA,调高低/(偏值1/(ARC-低值1))+3,DRAWNULL);
STICKLINE(WA AND AJ4,高A1,低1,0,0),COLORRED;
STICKLINE(WA AND AJ5,高A1,低1,0,0),COLORGREEN;
STICKLINE(WA AND AJ4,收1,开1,2,0),COLORRED;
STICKLINE(WA AND AJ5,收1,开1,2,0),COLORGREEN;
{========个股红==========}
VARX1:=(2*CLOSE+HIGH+LOW)/4;
VARX2:=LLV(LOW,5);
VAR3:=HHV(HIGH,5);
VAR4:=EMA((VARX1-VARX2)/(VAR3-VARX2)*100,5);
MAA1:=MA(VAR4,2);
红:=VAR4>=MAA1;
个股红:=MA(C,3)>=REF(MA(C,3),1),COLORGREEN,NODRAW;
SAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
SAR2:=(REF(SAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
SAR3:=(REF(SAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
SAR4:=(REF(SAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
SAR5:=(REF(SAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
SAR6:=(REF(SAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
SAR7:=(REF(SAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
SAR8:=(REF(SAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
SAR9:=(REF(SAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
SARA:=(REF(SAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
SARB:=(REF(SARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
SARC:=(REF(SARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
红色持股:=SAR1 OR SAR2 OR SAR3 OR SAR4 OR SAR5 OR SAR6 OR SAR7 OR SAR8 OR SAR9 OR SARA OR SARB OR SARC,COLOR0000FF,NODRAW;
红色:=红 OR 个股红 OR 红色持股 AND MMM ;
CC:="999999$CLOSE";
KK:=MA(CC,3);
大盘绿:=KK<REF(KK,1),COLORGREEN,NODRAW;
色变1:=IF(CONST(红色=0),RGB(50,10,70),RGB(153,51,0));
色变2:=IF(CONST(大盘绿),RGB(50,10,70),RGB(153,51,0));
DRAWRECTREL(653,0,710,185,色变1);
DRAWRECTREL(653,820,710,1000,色变2);
WA1:=' 个 股 九 转';
WA2:=' 个 股 休 息';
WA3:=IF(CONST(红色=0),WA2,WA1),COLORWHITE;
DRAWTEXT_FIX(C>0,0.66,0.06,0,WA3),COLORWHITE;
WAA1:=' 大 盘 九 转';
WAA2:=' 大 盘 休 息';
WAA3:=IF(CONST(大盘绿),WAA2,WAA1),COLORWHITE;
DRAWTEXT_FIX(C>0,0.66,0.9,0,WAA3),COLORWHITE;
{==============}
DRAWRECTREL(975,0,1000,1000,RGB(50,80,50));
DRAWRECTREL(980,50,995,950,RGB(20,50,20));
DRAWTEXT_FIX(C>0,0.982,0.15, 0,'成'),COLORWHITE;
DRAWTEXT_FIX(C>0,0.982,0.4, 0,'交'),COLORWHITE;
DRAWTEXT_FIX(C>0,0.982,0.65,0,'量'),COLORWHITE;