感谢阿虎爱上兔的《用均线简单寻找未来黑马!》
现加上天地线还请阿虎指正
源码:
▼天顶:HHV(HIGH,35),COLORGREEN, LINETHICK1.8;
▲地底:LLV(LOW,55),COLORRED,LINETHICK1.8;
{均线定势}
M5:MA(C,5),COLORWHITE;
M10:=MA(C,10),COLORYELLOW;
MA30:MA(C,30),COLORRED;
M60:MA(C,60),COLORFFCC66;
平衡线:EMA(CLOSE,8),COLORFF9966;
PMA:=MA(C,5);
X:=(3*C+L+O+H)/6;
多空线:(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)
+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)
+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+
REF(X,20))/210,COLORFF00FF,LINETHICK2;
乖离:(C/M60-1)*100,COLORFF00FF,NODRAW;
STICKLINE(CROSS(M10,M60),H,L,1,0),COLORYELLOW;{上升开始,初期有回抽,后期直上}
STICKLINE(CROSS(M60,M10),H,L,1,0),COLORWHITE;{空仓休息};
VARZT:=BARSLAST(C/REF(C,1)>1.094);
DRAWTEXT(VARZT=2,L*0.95,'3T'),COLORYELLOW;
DRAWTEXT(VARZT=4,H*1.06,'5T'),COLORYELLOW;
DRAWTEXT(VARZT=7,L*0.95,'8T'),COLORYELLOW;
DRAWTEXT(VARZT=12,H*1.06,'13T'),COLORYELLOW;
DRAWTEXT(VARZT=20,L*0.95,'21T'),COLORYELLOW;
DRAWTEXT(VARZT=33,H*1.06,'34T'),COLORYELLOW;
DRAWTEXT(VARZT=54,L*0.95,'55T'),COLORYELLOW;
DRAWTEXT(VARZT=88,H*1.06,'89T'),COLORYELLOW;
DRAWTEXT(VARZT=143,L*0.95,'144T'),COLORYELLOW;
DRAWTEXT(VARZT=232,H*1.06,'233T'),COLORYELLOW;
DRAWTEXT(VARZT=376,L*0.95,'377T'),COLORYELLOW;
DD:=多空线<REF(多空线,1);
IF(DD,多空线,DRAWNULL),COLOR00FFFF,LINETHICK2;
A:=(PMA>多空线);
IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;
{涨停标注}
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
{财务数据}
DRAWTEXT_FIX(ISLASTBAR,0.18,0.01,1,'上市日期:'),COLOR00FF00;
DRAWNUMBER_FIX(ISLASTBAR,0.18,0.01,0,FINANCE(42)),COLOR00FF00;
DRAWTEXT_FIX(1,0.01,0.13,0,EXTERNSTR(0,1)),COLORRED;
DRAWTEXT_FIX(1,0.26,0.01,0,EXTERNSTR(0,2)),COLORDD00DD;
DRAWTEXT_FIX(1,0.01,0.066,0,EXTERNSTR(0,3)),COLOR00DD00;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.01,1,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR ,0.065,0.01,0,HYBLOCK),COLORYELLOW;
{单阳不破}
阳涨幅:=3.5;
阳倍量:=1.9;
单阳收:=C;
单阳开:=O;
单阳:=单阳收>=REF(C,1)*(1+阳涨幅/100)AND VOL>REF(VOL,1)*阳倍量;
DRAWTEXT(CURRBARSCOUNT<100 AND 单阳,L*0.98,'阳'),COLOR00FFFF;
高不破价:=REF(C,BARSLAST(单阳));
低不破价:=REF(L,BARSLAST(单阳));
单阳不破:=CURRBARSCOUNT<100 AND BARSLAST(单阳)<11 AND (LLV(L,BARSLAST(单阳))>低不破价 OR LLV(L,BARSLAST(单阳))=低不破价);
DRAWTEXT(BARSLAST(单阳)=1 AND 单阳不破,低不破价*0.98,'1'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=2 AND 单阳不破,低不破价*0.98,'2'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=3 AND 单阳不破,低不破价*0.98,'3'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=4 AND 单阳不破,低不破价*0.98,'4'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=5 AND 单阳不破,低不破价*0.98,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=6 AND 单阳不破,低不破价*0.98,'6'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=7 AND 单阳不破,低不破价*0.98,'7'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=8 AND 单阳不破,低不破价*0.98,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=9 AND 单阳不破,低不破价*0.98,'9'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=10 AND 单阳不破,低不破价*0.98,'10'),COLORGREEN;
{黄金柱}
三日不破:=MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(L,3);
三日量缩:=(MAX(MAX(V,REF(V,1)),REF(V,2))<REF(V,3));
三日价涨A:=C>=REF(C,1);
三日价涨B:=C<REF(C,1);
三日价涨C:=MIN(MIN(C,REF(C,1)),REF(C,2))>=REF(L,3);
TIM:=IF(DATE<1140214,1,0);
缩倍柱:=(VOL*1.95<=REF(VOL,1))*TIM;
百日低量:=(VOL=LLV(VOL,100))*TIM;
倍量柱:=C>REF(C,1)*1.04 AND (VOL>=1.9*REF(VOL,1))*TIM;
四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4))*TIM;
四日前高量柱:=(REF(VOL,3)>=REF(VOL,4) AND REF(VOL,3)<1.9*REF(VOL,4) AND 三日量缩)*TIM;
前三引用不成立:=COUNT(REF(四日前倍量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0 AND COUNT(REF(四日前高量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0;
倍量黄金柱:=四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量黄金柱:=四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
黄金柱:=倍量黄金柱 OR 高量黄金柱;
次倍量黄金柱:=NOT(黄金柱) AND 四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次高量黄金柱:=NOT(黄金柱) AND 四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次黄金柱:=次倍量黄金柱 OR 次高量黄金柱;
准倍量黄金柱:=NOT(黄金柱 OR 次黄金柱) AND 四日前倍量柱 AND ((三日量缩 AND 三日价涨C) OR (COUNT(倍量柱,3)>=1 AND 三日不破)) AND 前三引用不成立;
准高量黄金柱:=NOT(黄金柱 OR 次黄金柱) AND 四日前高量柱 AND (三日量缩 AND 三日价涨C) AND 前三引用不成立;
准黄金柱:=准倍量黄金柱 OR 准高量黄金柱;
倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
将军柱:=倍量将军柱 OR 高量将军柱;
次倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次将军柱:=次倍量将军柱 OR 次高量将军柱;
准倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前倍量柱 AND 三日价涨C AND 前三引用不成立;
准高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前高量柱 AND 三日价涨C AND 前三引用不成立;
准将军柱:=准倍量将军柱 OR 准高量将军柱;
BACKSET100:=BACKSET(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱 OR 准将军柱,4);
FILTER100:=FILTER(BACKSET100,3),NODRAW;
BACKSET101:=BACKSET(黄金柱,4);
FILTER101:=FILTER(BACKSET101,3);
BACKSET102:=BACKSET(次黄金柱,4);
FILTER102:=FILTER(BACKSET102,3);
BACKSET103:=BACKSET(准黄金柱,4);
FILTER103:=FILTER(BACKSET103,3);
BACKSET104:=BACKSET(将军柱,4);
FILTER104:=FILTER(BACKSET104,3);
BACKSET105:=BACKSET(次将军柱,4);
FILTER105:=FILTER(BACKSET105,3);
BACKSET106:=BACKSET(准将军柱,4);
FILTER106:=FILTER(BACKSET106,3);
黄金线下影线:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<=REF(L,3);
黄金线实体下端:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<=MIN(REF(C,3),REF(O,3)) AND MIN(MIN(L,REF(L,1)),REF(L,2))>REF(L,3),LINETHICK0;
黄金线上影线:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(H,3);
黄金线实体上端:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>=MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<REF(H,3);
黄金线实体中间:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3));
黄金线实体中间1:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3)) AND REF(L,2)=MIN(MIN(L,REF(L,1)),REF(L,2));
黄金线实体中间2:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3)) AND REF(L,1)=MIN(MIN(L,REF(L,1)),REF(L,2));
黄金线实体中间3:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))< |