优化整合指标 单阳不破 一阳穿三线 幅度线 均价线 布林线 支撑与压力线
此指标是以某日期为定点结合量价,此指标可调整转换均价线或布林线以”研判涨幅度“买卖。
图中的修饰符{信号}是出布林线上轨和RSI>76 RSI>80.K线有单阳不破和一阳破三线。
{优化整合主图 单阳不破 一阳穿三线 幅度线 均价线 布林线 支撑与压力线}
INPUT:RQA(2011,1990,3000),RQB(1,1,12),RQC(1,1,31),DF(0,0,6),FA(0,0,2),EA(0,0,2);
INPUT:P1(5,0,255),P2(10,0,255),P3(20,0,255),P4(55,0,255),P5(120,0,255);
TTt:=ISLASTBAR=1;
AS1:=((H-L)/L)*100;
AS2:=H-L;
MAI:=C*1.015;
MAII:=C*1.03;
DRAWTEXTEX(TTT,0,310,1,'▼明短线赢利[1.5%--3%:]'+'/'+NUMTOSTR(MAI[SYSPARAM(1)],2)+'--'+NUMTOSTR(MAII [SYSPARAM(1)],2)),Color00dd00;
DRAWTEXTEX(TTt,0,176,1,'【振幅:'+NUMTOSTR(AS1[SYSPARAM(1)],2)+'% '+NUMTOSTR(AS2[SYSPARAM(1)],2)+'元 】'+''),Colordddd00;
DRAWTEXTEX(TTT,0,1,1,'【代码:'+STKLABEL+' 名称:'+STKNAME+'】'),ColorffFFFF;//DRAWTEXTEX(TTT,0,270,14,'【创于2011.02.17晚】'),ColorffFFFF;
aa:=BLKNAME;
BB:=STRLEFT(AA,STRFIND(AA,',',1)-1);
K:=STKCOUNT(BB);
SYL:=C/FINANCE(33);
DRAWTEXTEX(TTT AND fa,0,3,14,' 所属板块: '+BB+', 共有:'+NUMTOSTR(K,0)+' 家上市公司'+' 发行价'+NUMTOSTR(FINANCE(51),2)+'元'+' 发行量'+NUMTOSTR(FINANCE(52),2)+ '万股【市盈率:'+NUMTOSTR(SYL,2)),COLORDDaaDD;
RQD:=(RQA-1900)*10000+RQB*100+RQC;
DJ:=REF(L,BARSLAST(DATE<=RQD ));//求某一日期的最低价
上涨:=BARSSINCE(BACKSET(BARSTATUS=2,BARSLAST(L=DJ)+1));
VERTLINE(DJ AND DATE>=RQD AND DF>=1),COLOR333333,LINEDOT;//画垂直线
STICKLINE(C>=O,low,high,0.5,0),colorFF;
STICKLINE(C>=O,close,open,8,0),color102088;
STICKLINE(C>=O,close,open,7,0),color102099;
STICKLINE(C>=O,close,open,6,0),color1020AA;
STICKLINE(C>=O,close,open,5,0),color1020BB;
STICKLINE(C>=O,close,open,4,0),color1020CC;
STICKLINE(C>=O,close,open,3,0),color1020DD;
STICKLINE(C>=O,close,open,2,0),color1020EE;
STICKLINE(C>=O,close,open,1,0),color1020FF;
STICKLINE(C<=O,low,high,0.5,0),colorFF8800;
STICKLINE(C<=O,close,open,8,0),colorFF7700;
STICKLINE(C<=O,close,open,7,0),colorFF8800;
STICKLINE(C<=O,close,open,6,0),colorFF9900;
STICKLINE(C<=O,close,open,5,0),colorFFAA00;
STICKLINE(C<=O,close,open,4,0),colorFFBB00;
STICKLINE(C<=O,close,open,3,0),colorFFCC00;
STICKLINE(C<=O,close,open,2,0),colorFFDD00;
STICKLINE(C<=O,close,open,1,0),colorFFEE00;
POLYLINE(DATE>=RQD AND DF>=1,DJ),Color999999;//实用画直线
POLYLINE(DATE>=RQD AND DF>=2,DJ*1.03),Color999999,LINEDOT;//实用画直线
POLYLINE(DATE>=RQD AND DF>=2,DJ*1.05),Color999999,LINEDOT;//实用画直线
POLYLINE(DATE>=RQD AND DF>=3,DJ*1.08),Color999999,LINEDOT;//实用画直线
POLYLINE(DATE>=RQD AND DF>=3,DJ*1.13),Color999999,LINEDOT;//实用画直线
POLYLINE(DATE>=RQD AND DF>=4,DJ*1.18),Color999999,LINEDOT;//实用画直线
POLYLINE(DATE>=RQD AND DF>=4,DJ*1.25),Color999999,LINEDOT;//实用画直线
POLYLINE(DATE>=RQD AND DF>=5,DJ*1.34),Color999999,LINEDOT;//实用画直线
POLYLINE(DATE>=RQD AND DF>=5,DJ*1.37),Color999999,LINEDOT;//实用画直线
DRAWTEXT(上涨=0 AND DF>=1,DJ,'1'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=1 AND DF>=1,DJ,'2'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=2 AND DF>=1,DJ,'3'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=3 AND DF>=1,DJ,'4'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=4 AND DF>=1,DJ,'5'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=5 AND DF>=1,DJ,'6'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=6 AND DF>=1,DJ,'7'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=7 AND DF>=1,DJ,'8'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=8 AND DF>=1,DJ,'9'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=9 AND DF>=1,DJ,'10'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=10 AND DF>=1,DJ,'11'),COLORFFFFFF,pxdn5;
DRAWTEXT(上涨=11 AND DF>=1,DJ,'12'),COLORFFFFFF,pxdn5;
{单阳不破}
//阳涨幅:=4;
//阳倍量:=2;
//单阳:=C>O*(1+阳涨幅/100) AND VOL>REF(VOL,1)*阳倍量;
阳涨幅:=3.5;
阳倍量:=1.9;
单阳收:=C;
单阳开:=O;
单阳:=单阳收>=REF(C,1)*(1+阳涨幅/100)AND VOL>REF(VOL,1)*阳倍量;
DRAWTEXT(BARSTATUS=0 AND 单阳,L,'阳'),COLOR00FFFF,pxdn5;
高不破价:=REF(C,BARSLAST(单阳));
低不破价:=REF(L,BARSLAST(单阳));
单阳不破:=BARSTATUS=0 AND BARSLAST(单阳)<11 AND (LLV(L,BARSLAST(单阳))>低不破价 OR LLV(L,BARSLAST(单阳))=低不破价);
STICKLINE(单阳不破,低不破价-低不破价*0.0005,低不破价,11,0),COLORGREEN;
STICKLINE(单阳不破,高不破价,高不破价,11,0),COLORRED;
STICKLINE(单阳,单阳开,单阳收,6,0),COLORYELLOW;
QKB:=IF(C>O,O,C);
QKAB:=IF(C>O,O+(C-O)*0.75,O+(C-O)*0.75);
STICKLINE(BARSTATUS=0 AND 单阳,QKB,QKAB,6,0),COLORFF2693;
实体幅度2:=REF((O+(C-O)*0.667),BARSLAST(单阳));{//当日实体幅度的2/3}
实体幅度1:=REF((O+(C-O)*0.333),BARSLAST(单阳));{//当日实体幅度的1/3}
幅度的1二:=REF((L+(H-L)/2),BARSLAST(单阳));{//当日幅度的1/2}
STICKLINE(单阳不破,幅度的1二,幅度的1二,8,1),COLOR209FFF,LINEDOT;
STICKLINE(单阳不破,实体幅度2,实体幅度2,4,1),COLORFFFF00;
STICKLINE(单阳不破,实体幅度1,实体幅度1,4,1),COLORFFFF00;
DRAWTEXT(BARSLAST(单阳)=1 AND 单阳不破,低不破价,'1'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=2 AND 单阳不破,低不破价,'2'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=3 AND 单阳不破,低不破价,'3'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=4 AND 单阳不破,低不破价,'4'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=5 AND 单阳不破,低不破价,'5'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=6 AND 单阳不破,低不破价,'6'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=7 AND 单阳不破,低不破价,'7'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=8 AND 单阳不破,低不破价,'8'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=9 AND 单阳不破,低不破价,'9'),COLORGREEN,pxdn5;
DRAWTEXT(BARSLAST(单阳)=10 AND 单阳不破,低不破价,'10'),COLORGREEN,pxdn5;
DRAWTEXT(上涨=0 AND DF>=2,DJ*1.03,' 3% ['+NUMTOSTR(DJ*1.03,2)+']'),ALIGN1,PXDN5,COLORWHITE;
DRAWTEXT(上涨=0 AND DF>=2,DJ*1.05,' 5% ['+NUMTOSTR(DJ*1.05,2)+']'),ALIGN1,PXDN5,COLORWHITE;
DRAWTEXT(上涨=0 AND DF>=3,DJ*1.08,' 8% ['+NUMTOSTR(DJ*1.08,2)+']'),ALIGN1,PXDN5,COLORWHITE;
DRAWTEXT(上涨=0 AND DF>=3,DJ*1.13,' 13% ['+NUMTOSTR(DJ*1.13,2)+']'),ALIGN1,PXDN5,COLORWHITE;
DRAWTEXT(上涨=0 AND DF>=4,DJ*1.18,' 18% ['+NUMTOSTR(DJ*1.18,2)+']'),ALIGN1,PXDN5,COLORWHITE;
DRAWTEXT(上涨=0 AND DF>=4,DJ*1.25,' 25% ['+NUMTOSTR(DJ*1.25,2)+']'),ALIGN1,PXDN5,COLORWHITE;
DRAWTEXT(上涨=0 AND DF>=5,DJ*1.34,' 34% ['+NUMTOSTR(DJ*1.34,2)+']'),ALIGN1,PXDN5,COLORWHITE;
DRAWTEXT(上涨=0 AND DF>=5,DJ*1.37,' 37% ['+NUMTOSTR(DJ*1.37,2)+']'),ALIGN1,PXDN5,COLORWHITE;
{一阳穿三线}
MA2:=EMA(C,2);
MA5:=EMA(C,5),COLORFFFFFF;
MA13:=EMA(C,13),COLOR00FFFF;
MA34:=EMA(C,34),COLORFF00FF;
MA55:=EMA(C,55),COLOR00FF00;
YCX:=MA5>=REF(MA5,1);
H1:=MAX(MAX(MA5,MA13),MA34);
L1:=MIN(MIN(MA5,MA13),MA34);
QK:=IF(C>O,O,C);
QKA:=IF(C>O,O+(C-O)*0.35,O+(C-O)*0.25);
一阳穿三线:= H1<C AND O<L1 AND YCX AND MA2>REF(MA2,1);
STICKLINE(一阳穿三线,QK,QKA,6,0),COLORYELLOW;
BQ:=IF((SYSPARAM(1) = (BARSSINCE((C > 0)) + 1)),1,0);
BQ1:=(H<REF(L,1));BQ2:=(L>REF(H,1));
BQ3:=REF(L,1)-H; BQ4:=L-REF(H,1);
BQ5:=REF(L,1); BQ6:=H;
BQ7:=REF(H,1); BQ8:=L;
QZH:=IF(BQ1,BQ1,BQ2);
QZH1:=IF(BQ1,BQ5,BQ7);
QZH2:=IF(BQ1,BQ6,BQ8);
QK:=IF(C>O,C,O);
QK1:=IF(C>O,O,C);
QKA:=IF(C>O,o+(c-o)*0.65,o+(c-o)*0.35); |