交易系统_《宝塔K线》《主力吃货》《多空K线》

{宝塔 K线【主图指标】08 宝塔线+SAR指标}
 
    {使用方法:黄托底买进,绿压顶卖出。}

平均成本线:COST(50)COLOR0099FF,DOTLINE,NODRAW;

{压力与支撑}

压力均线画线:HHV(HIGH,20),COLORFFCC00,DOTLINE,NODRAW;
    支撑均线画线:LLV(LOW,20),COLORFFCC00,DOTLINE,NODRAW;
    压力均线20:=HHV(LOW,20),COLORFFCC00,DOTLINE;
    支撑均线20:=LLV(HIGH,20),COLORFFCC00,DOTLINE;
    标注001:DRAWICON(FILTERX(CROSS(C,压力均线20),10),H*1.02,2);
    标注002:DRAWICON(FILTERX(CROSS(C,支撑均线20),10),L*0.98,1);

MA5:MA(C,5),COLORWHITE,DOTLINE;
    选股预警:DRAWTEXT_FIX(CURRBARSCOUNT=1 AND LONGCROSS(C,MA5,3),0.82,0.08,0,'股价上穿5日均  ★★★')COLORMAGENTA;

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,COLORYELLOW,LINETHICK3;

宝塔多空线1:IF(宝塔多空线>REF(宝塔多空线,1)OR C>(宝塔多空线),宝塔多空线,DRAWNULL)COLORMAGENTA,DOTLINE,LINETHICK3;
    宝塔多空线2:IF(宝塔多空线<REF(宝塔多空线,1)OR C<(宝塔多空线),宝塔多空线,DRAWNULL)COLORGREEN,DOTLINE,LINETHICK3;

标识01:=STICKLINE(REF(宝塔多空线,1)<宝塔多空线,宝塔多空线,REF(宝塔多空线,1),3,1),COLORRED;
    标识02:=STICKLINE(REF(宝塔多空线,1)>宝塔多空线,宝塔多空线,REF(宝塔多空线,1),3,1),COLORCYAN;

VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
    VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    标识03:STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
    VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,1),COLORRED;
    VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
    VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    标识04:STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
    VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;
    VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
    VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
    标识05:STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,1),COLORYELLOW;
    VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
    VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
    标识06:STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,2),COLOR00FF00{98FD};
    标识07:STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR0099FF;
    标识08:=STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;
    标识09:=STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR10ECFF;
    标识10:=STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR10FFFF;
    标识11:=STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR10F0FF;
    标识12:=STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORGREEN;
    标识13:=STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR93FFD1;
    标识14:=STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR93FF22;
    标识15:=STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR24FF22;
    标识16:=STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR090FF2;

{庄家成本}

A00:=SUMBARS(V,CAPITAL*1); 
    A01:=SUM(COST(10),A00)/A00; {在A周期里获利10%的平均价}
    A02:=SUM(COST(20),A00)/A00; {在A周期里获利20%的平均价}
    A03:=SUM(COST(30),A00)/A00; {在A周期里获利30%的平均价}
    A04:=SUM(COST(40),A00)/A00; {在A周期里获利40%的平均价}
    A05:=SUM(COST(50),A00)/A00; {在A周期里获利50%的平均价}
    庄家成本:(5*A01+4*A02+3*A03+2*A04+A05)/15,DOTLINE,COLORCYAN,NODRAW;
    庄得利:C>=(庄家成本)COLORRED,NODRAW;
    庄差钱:C<(庄家成本)COLORGREEN,NODRAW;

持仓:=IF(CLOSE>=SAR(4,2,20),SAR(4,2,20),DRAWNULL),COLORRED;
    空仓:=IF(CLOSE<=SAR(4,2,20),SAR(4,2,20),DRAWNULL),COLORGREEN;
    BS:=STICKLINE(C/REF(C,1)>1.095,O,C,1.5,0),COLORYELLOW;
    SAR持仓标识:DRAWTEXT(CLOSE>=SAR(4,2,20),SAR(4,2,20)-0.3,'●')COLOR0099FF;
    SAR空仓标识:DRAWTEXT(CLOSE<=SAR(4,2,20),SAR(4,2,20)+0.3,'●')COLORFF0033;

{个股类别}

BK1:=STRCAT(STRSPACE(DYBLOCK),HYBLOCK);
    BK2:=STRCAT(STRSPACE(BK1),GNBLOCK);
    BK3:=STRCAT(STRSPACE(BK2),FGBLOCK);
    BK4:=STRCAT(STRSPACE(BK3),ZHBLOCK);
    个股类别:DRAWTEXT_FIX(1,0.01,1,0,BK4),COLORRED;

短期震荡值:100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5))NODRAW,COLORCYAN;
    中期震荡值:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10))NODRAW,COLOR0099FF;
    中长期震荡值:100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20))NODRAW,COLORMAGENTA;
    长期震荡值:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30))NODRAW,COLORRED,LINETHICK2;
    短线预警:DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 短期震荡值=(100)AND 中期震荡值=(100)AND 中长期震荡值=(100)AND 长期震荡值=(100),0.90,0.01,0,'小心短线见顶   ★★★')COLOR0099FF;
    短线提醒:DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 短期震荡值<=(6)AND 中期震荡值<=(6)AND 中长期震荡值<=(6)AND 长期震荡值<=(6),0.90,0.98,0,'短线已然超跌   ★★★')COLORGREEN;
   
    {年 月 日 星期}

D1:=YEAR AND MONTH AND DAY;
    AA1:=STRCAT(CON2STR(YEAR,0),'年');
    AA2:=STRCAT(CON2STR(MONTH,0),'月');
    AA3:=STRCAT(CON2STR(DAY,0),'日');
    AA4:=STRCAT('  星期',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日')))))));
    AA:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'');
    位置标注:DRAWTEXT_FIX(D1,0.89,0.03,0,AA),COLORGREEN; {在冒号 : 后面加上一个等于 = 符号,年月日及星期就不再显示了。}

{用法注释}

D00:=1;
    AA00:=DRAWGBK('     ★★★   “三平底” 黄托底 买进。','.','.','.','.','.');
    AA00图标:DRAWTEXT_FIX(D00=1,0.01,0.03,0,AA00),COLOR0099FF;
    D01:=1;
    AA01:=DRAWGBK('     ★★★   “三平顶” 绿压顶 卖出。','.','.','.','.','.');
    AA01图标:DRAWTEXT_FIX(D01=1,0.01,0.11,0,AA01),COLORGREEN;

{主力吃货【副图指标】}

V1:=(C*2+H+L)/4*10;
    V2:=EMA(V1,13)-EMA(V1,34);
    V3:=EMA(V2,5);
    V4:2*(V2-V3)*5.5,COLORBLACK;
    超大主力吃货:IF(V4>=0,V4,0),COLOR7F00FF,LINETHICK1;
    超大主力吐货:IF(V4<=0,V4,0),COLOR66FF00,LINETHICK1;
    V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
    V6:=EMA(3*V5-2*SMA(V5,18,1),5);
    V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
    V8:=(INDEXC*2+INDEXH+INDEXL)/4;
    V9:=EMA(V8,13)-EMA(V8,34);
    VA:=EMA(V9,3);
    VB:=(V9-VA)/2;
    多头1:DRAWICON(CROSS(REF(V4,0),0),0-0.01,41);
    多头2:DRAWICON(LONGCROSS(REF(V4,0),REF(V4,1),2)AND V4<(-1),V4-0.01,42);
    提示1:DRAWTEXT_FIX(C!=0,0.01,0.06,0,'  绿线(红线)拐头向上进,红线上行速度变缓或拐头向下抛。
    0 轴之上伺机做多,0 轴之下注意防空。    
    买卖点可参考《宝塔K线》主图(三平底进,三平顶出。)效果会更佳。'),COLORRED;
    成交额_万元:AMOUNT/10000,NODRAW,COLORYELLOW; {单位:万元};
    VAR1:=(CLOSE*2+HIGH+LOW)/4;
    VAR2:=EMA(VAR1,13)-EMA(VAR1,34)COLORWHITE,DOTLINE;
    VAR3:=EMA(VAR2,5);
    主力控盘_做多:=2*(VAR2-VAR3)*3.8,DOTLINE,COLORRED,NODRAW;
    主力弃盘_做空:=(-2)*(VAR2-VAR3)*3.8,DOTLINE,COLORYELLOW,NODRAW;
    主力上穿:=DRAWICON(CROSS(REF(主力控盘_做多,0),REF(主力弃盘_做空,0)),0,42);
    主力控盘2:DRAWICON(CROSS(REF(主力控盘_做多,0),REF(主力弃盘_做空,0)),0,34);
    主力弃盘2:=DRAWICON(CROSS(REF(主力弃盘_做空,0),REF(主力控盘_做多,0)),0,35);

{多空 K线【副图指标】}

{参数: N 2 90 14  MM 2 60 6}

零轴:0,COLORLICYAN,DOTLINE; {COLORFFA2AF}
    B1:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4; {均值:11.25}
    B2:=(MA(C,13)+MA(C,26)+MA(C,52)+MA(C,104))/4; {均值:48.75}
    DF:=B1-B2; {均值:-37.50}
    DA:=EMA(DF,70);
    V1:=(DF-DA)*2;
    V2:=EMA(EMA(V1,3),35),COLOR00FF00;
    V3:=EMA(EMA(V2,3),7),COLOR00FF00;
    红:STICKLINE(V1>=REF(V1,1),V1,REF(V1,1),3,1),COLORRED;
    蓝:STICKLINE(V1<REF(V1,1),V1,REF(V1,1),3,1),COLORFF9900;
    白:STICKLINE(V2>=REF(V2,1),V2,REF(V2,1),3,1),COLORWHITE;
    绿:STICKLINE(V2<REF(V2,1),V2,REF(V2,1),3,1),COLOR00FF00;
    紫:STICKLINE(V3>=REF(V3,1),V3,REF(V3,1),3,1),COLORMAGENTA,COLOR888888;
    黄:STICKLINE(V3<REF(V3,1),V3,REF(V3,1),3,1),COLORYELLOW,COLOR555555;
    首红:=CROSS(红,蓝);
    首蓝:=CROSS(蓝,红);
    首红K线1:STICKLINE(首红,V1,REF(V1,1),3,0),COLORRED;
    首红K线2:STICKLINE(首红,V1,REF(V1,1),1.5,0),COLORYELLOW; 
    首蓝K线1:STICKLINE(首蓝,V1,REF(V1,1),3,0),COLORLIBLUE;
    首蓝K线2:STICKLINE(首蓝,V1,REF(V1,1),1,0),COLORBLUE;
    多:=CROSS(红,绿);
    多标识:DRAWICON(多,零轴,5); 
    红蓝金叉:=DRAWICON(CROSS(红,蓝),0.5,9);
    白绿金叉:=DRAWICON(CROSS(白,绿),0.5,34);
    提示1:DRAWTEXT_FIX(C!=0,0.01,0.16,0,'多头时段中的持股时段(多头时段主升段)。  红K线在上+白K线在下 = 持股交易时段 【操盘策略——重仓或满仓——持股】'),COLORRED;
    提示2:DRAWTEXT_FIX(C!=0,0.01,0.23,0,'多头时段中的退守时段(空头时段的前期)。  蓝K线在上+白K线在下 = 持币退守时段 【操盘策略——减仓或清仓——持币】'),COLORGREEN;
    提示3:DRAWTEXT_FIX(C!=0,0.01,0.30,0,'空头时段中的观望时段(空头时段主跌段)。  绿K线在上+蓝K线在下 = 空仓观望时段 【操盘策略——止盈、止损——空仓】'),COLORFF9900;
    提示4:DRAWTEXT_FIX(C!=0,0.01,0.37,0,'空头时段中的磨底时段(空头时段的后期)。  绿K线在上+红K线在下 = 谨慎交易时段 【操盘策略——分阶段——轻仓抄底】'),COLORWHITE;
    提示5:DRAWTEXT_FIX(C!=0,0.01,0.44,0,'浅白色K线——多头趋势辅助。'),COLORMAGENTA,COLOR888888;
    提示6:DRAWTEXT_FIX(C!=0,0.01,0.51,0,'暗白色K线——空头趋势辅助。'),COLORYELLOW,COLOR555555;
    RSV1:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
    ZXK:=SMA(RSV1,3,1);
    牛线:=SMA(ZXK,2,1);
    中线多头信号:DRAWICON(FILTERX(CROSS(牛线,REF(牛线,1))&&牛线<(25),25),V1*0.5,7);
    压力均线30:=HHV(LOW,30),COLORFFCC00,DOTLINE;
    支撑均线30:=LLV(HIGH,30),COLORFFCC00,DOTLINE;
    压力均线画线:=HHV(HIGH,30),COLOR666666,DOTLINE;
    支撑均线画线:=LLV(LOW,30),COLOR666666,DOTLINE;
    低位突破支撑:DRAWICON(FILTERX(CROSS(C,支撑均线30),10),0,1);
    向上突破支撑:=DRAWTEXT(FILTERX(CROSS(C,支撑均线30),10),0,'  支撑位')COLORRED;
    高位遇阻回落:DRAWICON(FILTERX(CROSS(压力均线30,C),10),0,2);
    现价:DYNAINFO(7)COLORWHITE,NODRAW;
    现价赚6%止盈位:REF(现价*1.06,1)COLORRED,NODRAW;
    现价亏3%止损位:REF(现价*0.97,1)COLORGREEN,NODRAW;
    低位接挡:(SMA(LOW,21,2) * 0.94)NODRAW,COLORRED;
    高位逃遁:(SMA(HIGH,21,2) * 1.05)NODRAW,COLORGREEN;
    A:=SUMBARS(V,CAPITAL*1); 
    A01:=SUM(COST(10),A)/A; {在A周期里获利10%的平均价}
    A02:=SUM(COST(20),A)/A; {在A周期里获利20%的平均价}
    A03:=SUM(COST(30),A)/A; {在A周期里获利30%的平均价}
    A04:=SUM(COST(40),A)/A; {在A周期里获利40%的平均价}
    A05:=SUM(COST(50),A)/A; {在A周期里获利50%的平均价}
    庄家成本:(5*A01+4*A02+3*A03+2*A04+A05)/15,DOTLINE,COLORCYAN,NODRAW;
    庄得利:C>=(庄家成本)COLORRED,NODRAW;
    庄差钱:C<(庄家成本)COLORGREEN,NODRAW;
    分钟线首根K线:HOUR<REF(HOUR,1)COLOR0099FF,NODRAW;
    给首日标注:DRAWICON(分钟线首根K线,2,41);
    MTR:=EXPMEMA(MAX(MAX(ABS(HIGH-LOW),ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
    HD :=HIGH-REF(HIGH,1);
    LD :=REF(LOW,1)-LOW;
    DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
    DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
    PDI:=DMP*100/MTR;
    MDI:=DMM*100/MTR;
    多头线:=PDI,COLORRED,LINETHICK2;
    空头线:=MDI,COLORCYAN,LINETHICK1;
    顺势线_多或空:=EXPMEMA(ABS(PDI-MDI)/(MDI+PDI)*100,MM);
    顺势线M:=EXPMEMA(顺势线_多或空,MM);
    Q_1:=C-REF(C,1);
    Q_2:=100*EMA(EMA(Q_1,6),6)/EMA(EMA(ABS(Q_1),6),6);
    Q_3:=CROSS(EMA(C,19),EMA(C,7));
    Q_4:=CROSS(EMA(C,7),EMA(C,19));
    Z1:=L=LLV(L,BARSLAST(Q_3)+1);
    Z2:=LLV(L,BARSLAST(Q_3)+1);
    Z3:=H=HHV(H,BARSLAST(Q_4)+1);
    Z4:=HHV(H,BARSLAST(Q_4)+1);
    Q_A:=DRAWLINE(Z1,Z2,Z3,Z4,0);
    Y1:=H=HHV(H,BARSLAST(Q_4)+1);
    Y2:=HHV(H,BARSLAST(Q_4)+1);
    Y3:=L=LLV(L,BARSLAST(Q_3)+1);
    Y4:=LLV(L,BARSLAST(Q_3)+1);
    Q_B:=DRAWLINE(Y1,Y2,Y3,Y4,0);
    X1:=LLV(Q_2,2)=LLV(Q_2,7) ;
    X2:=COUNT(Q_2<0,2);
    X3:=CROSS(Q_2,MA(Q_2,2));
    X4:=REF(Q_B,1)<REF(Q_B,2);
    X5:=Q_A>REF(Q_B,1);
    买进:=(X1 AND X2 AND X3) AND X4 AND X5;
    TJ:=IF(Q_B<REF(Q_B,1) AND Q_B=Q_A,1,0);
    堪称一绝:=IF(REF(TJ,1)=0 AND TJ>=1,80,10),STICK,COLORRED;
    逢0_持股:IF(Q_B<REF(Q_B,1) AND Q_B=Q_A,0,10),STICK,NODRAW,COLORRED;
    逢10持币:IF(Q_B<REF(Q_B,1) AND Q_B=Q_A,0,10),STICK,NODRAW,COLORGREEN;
    持股:DRAWICON(Q_B<REF(Q_B,1) AND Q_B=Q_A,0,41);
    持币:=DRAWICON(CROSS(蓝,红),0,12);
    DIFF:=EMA(CLOSE,6) - EMA(CLOSE,13);
    DEA:=EMA(DIFF,4);
    MACD:=2*(DIFF-DEA);
    X:=0;
    标识01:=STICKLINE((MACD>0),0,MACD,2.8,1),COLOR0000CC;{红色量柱};
    标识02:=STICKLINE((MACD<0),0,MACD,2.8,1),COLORCC0033;{蓝色量柱}
    标识03:DRAWTEXT(FILTER(CROSS(MACD,0),5),0.2,'M')COLORRED;
    标识04:DRAWTEXT(FILTER(CROSS(0,MACD),5),0.2,'M')COLORGREEN;
    提示0:DRAWTEXT_FIX(C!=0,0.01,0.06,0,'该指标旨在观测资金流入、流出状况,其状态用K线表示。K 线翻红越接近0轴,买入股票的安全性越高。'),COLORRED;

{百万蚂蝗【源码】
    B1:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
    B2:=(MA(C,13)+MA(C,26)+MA(C,52)+MA(C,104))/4;
    DF:=B1-B2;
    DA:=EMA(DF,70);
    V1:=(DF-DA)*2;
    STICKLINE(V1>=REF(V1,1),V1,REF(V1,1),5,1),COLORRED;
    STICKLINE(V1<REF(V1,1),V1,REF(V1,1),5,1),COLORFF9900;
    V2:=EMA(EMA(V1,3),35),COLOR00FF00;
    STICKLINE(V2>=REF(V2,1),V2,REF(V2,1),8,1),COLORWHITE;
    STICKLINE(V2<REF(V2,1),V2,REF(V2,1),8,1),COLOR00FF00;
    0,COLORFFA2AF;};

{多空 K线【选股公式】}

{参数: N 2 90 14  MM 2 60 6}

{零轴:=0;
    B1:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
    B2:=(MA(C,13)+MA(C,26)+MA(C,52)+MA(C,104))/4;
    DF:=B1-B2;
    DA:=EMA(DF,70);
    V1:=(DF-DA)*2;
    V2:=EMA(EMA(V1,3),35);
    V3:=EMA(EMA(V2,3),7);
    红:=STICKLINE(V1>=REF(V1,1),V1,REF(V1,1),3,1);
    蓝:=STICKLINE(V1<REF(V1,1),V1,REF(V1,1),3,1);
    白:=STICKLINE(V2>=REF(V2,1),V2,REF(V2,1),3,1);
    绿:=STICKLINE(V2<REF(V2,1),V2,REF(V2,1),3,1);
    多:=CROSS(红,绿);
    选股:DRAWICON(多,零轴,5); };

(0)

相关推荐