手机版
官方微信
扫描关注:理想财富微信公众号
理想论坛App
扫描下载理想论坛App
RSS

请老师帮助做选股预警公式

[通达信]
设置
1334 6 冯060213 Lv.2 发表于 · 2020-10-12 11:15 举报 显示全部楼层 复制 正序浏览 |
跳转到指定楼层
请老师根据下面的主图指标,做两个选股预警公式:1、当股价上涨突破移动均线时预警;2、当股价跌至移动均线附近(距离移动均线1%)时预警。谢谢老师,辛苦了。

DRAWTEXT_FIX(1,0.02,0,0,'所属行业:')COLOR0080FF;
DRAWTEXT_FIX(1,0.10,0,0,HYBLOCK)COLOR0080FF;
DRAWTEXT_FIX(1,0.21,0,0,'所属地区:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.28,0,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.35,0,0,'概念板块:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.43,0,0,GNBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.02,0.06,0,'主营:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.08,0.06,0,EXTERNSTR(0,9996))COLOR00FFFF; {上市公司主营}
DRAWTEXT_FIX(1,0.02.0,0.17,0,'解禁:')COLORFF00FF; {未来三个月内有解禁}
DRAWTEXT_FIX(1,0.12,0.17,0,EXTERNSTR(0,901))COLORFF00FF;
DRAWTEXT_FIX(1,0.02,0.12,0,FGBLOCK),COLOR0000FF;{风格};
DRAWTEXT(SIGNALS_USER(9991,0)>0,H*1.012,'增'),COLORFF00FF;
DRAWTEXT(SIGNALS_USER(9991,0)<0,L*0.990,'减'),COLORBLUE;

{D:2 222 8}
DRAWICON(CURRBARSCOUNT=D-7 AND NOT(CURRBARSCOUNT=1),L,4);
{波段高低点}
G:=ZIG((H+MAX(C,O))/2,5);
G1:=G>REF(G,1) AND G>REFX(G,1);
D1:=G<REF(G,1) AND G<REFX(G,1);
D:=ZIG((L+MIN(C,O))/2,5);
G2:=D>REF(D,1) AND D>REFX(D,1);
D2:=D<REF(D,1) AND D<REFX(D,1);
GG:=FILTER(G1 OR G2,5) AND CURRBARSCOUNT>D;
DD:=FILTER(D1 OR D2,5) AND CURRBARSCOUNT>D;
{前期高低点距今}
GB1:=BARSLAST(GG);         
GB2:=REFV(GB1,GB1+1)+GB1+1;
GB3:=REFV(GB1,GB2+1)+GB2+1;
GB4:=REFV(GB1,GB3+1)+GB3+1;
DB1:=BARSLAST(DD);         
DB2:=REFV(DB1,DB1+1)+DB1+1;
DB3:=REFV(DB1,DB2+1)+DB2+1;
DB4:=REFV(DB1,DB3+1)+DB3+1;
{均线}
E2:=EMA(C,20);
               A21:=REFV(100*ABS(G-E2)/E2,GB1)<2; A22:=REFV(100*ABS(G-E2)/E2,GB2)<2;
               A23:=REFV(100*ABS(G-E2)/E2,GB3)<2; A24:=REFV(100*ABS(G-E2)/E2,GB4)<2;
               B21:=REFV(100*ABS(D-E2)/E2,DB1)<2; B22:=REFV(100*ABS(D-E2)/E2,DB2)<2;
               B23:=REFV(100*ABS(D-E2)/E2,DB3)<2; B24:=REFV(100*ABS(D-E2)/E2,DB4)<2;
               CX2:=A21+A22+A23+A24+B21+B22+B23+B24,NODRAW;
E3:=EMA(C,30);
               A31:=REFV(100*ABS(G-E3)/E3,GB1)<2; A32:=REFV(100*ABS(G-E3)/E3,GB2)<2;
               A33:=REFV(100*ABS(G-E3)/E3,GB3)<2; A34:=REFV(100*ABS(G-E3)/E3,GB4)<2;
               B31:=REFV(100*ABS(D-E3)/E3,DB1)<2; B32:=REFV(100*ABS(D-E3)/E3,DB2)<2;
               B33:=REFV(100*ABS(D-E3)/E3,DB3)<2; B34:=REFV(100*ABS(D-E3)/E3,DB4)<2;
               CX3:=A31+A32+A33+A34+B31+B32+B33+B34,NODRAW;
E4:=EMA(C,40);
               A41:=REFV(100*ABS(G-E4)/E4,GB1)<2; A42:=REFV(100*ABS(G-E4)/E4,GB2)<2;
               A43:=REFV(100*ABS(G-E4)/E4,GB3)<2; A44:=REFV(100*ABS(G-E4)/E4,GB4)<2;
               B41:=REFV(100*ABS(D-E4)/E4,DB1)<2; B42:=REFV(100*ABS(D-E4)/E4,DB2)<2;
               B43:=REFV(100*ABS(D-E4)/E4,DB3)<2; B44:=REFV(100*ABS(D-E4)/E4,DB4)<2;
               CX4:=A41+A42+A43+A44+B41+B42+B43+B44,NODRAW;
E5:=EMA(C,50);
               A51:=REFV(100*ABS(G-E5)/E5,GB1)<2; A52:=REFV(100*ABS(G-E5)/E5,GB2)<2;
               A53:=REFV(100*ABS(G-E5)/E5,GB3)<2; A54:=REFV(100*ABS(G-E5)/E5,GB4)<2;
               B51:=REFV(100*ABS(D-E5)/E5,DB1)<2; B52:=REFV(100*ABS(D-E5)/E5,DB2)<2;
               B53:=REFV(100*ABS(D-E5)/E5,DB3)<2; B54:=REFV(100*ABS(D-E5)/E5,DB4)<2;
               CX5:=A51+A52+A53+A54+B51+B52+B53+B54,NODRAW;
E6:=EMA(C,60);
               A61:=REFV(100*ABS(G-E6)/E6,GB1)<2; A62:=REFV(100*ABS(G-E6)/E6,GB2)<2;
               A63:=REFV(100*ABS(G-E6)/E6,GB3)<2; A64:=REFV(100*ABS(G-E6)/E6,GB4)<2;
               B61:=REFV(100*ABS(D-E6)/E6,DB1)<2; B62:=REFV(100*ABS(D-E6)/E6,DB2)<2;
               B63:=REFV(100*ABS(D-E6)/E6,DB3)<2; B64:=REFV(100*ABS(D-E6)/E6,DB4)<2;
               CX6:=A61+A62+A63+A64+B61+B62+B63+B64,NODRAW;
E7:=EMA(C,70);
               A71:=REFV(100*ABS(G-E7)/E7,GB1)<2; A72:=REFV(100*ABS(G-E7)/E7,GB2)<2;
               A73:=REFV(100*ABS(G-E7)/E7,GB3)<2; A74:=REFV(100*ABS(G-E7)/E7,GB4)<2;
               B71:=REFV(100*ABS(D-E7)/E7,DB1)<2; B72:=REFV(100*ABS(D-E7)/E7,DB2)<2;
               B73:=REFV(100*ABS(D-E7)/E7,DB3)<2; B74:=REFV(100*ABS(D-E7)/E7,DB4)<2;
               CX7:=A71+A72+A73+A74+B71+B72+B73+B74,NODRAW;
E8:=EMA(C,80);
               A81:=REFV(100*ABS(G-E8)/E8,GB1)<2; A82:=REFV(100*ABS(G-E8)/E8,GB2)<2;
               A83:=REFV(100*ABS(G-E8)/E8,GB3)<2; A84:=REFV(100*ABS(G-E8)/E8,GB4)<2;
               B81:=REFV(100*ABS(D-E8)/E8,DB1)<2; B82:=REFV(100*ABS(D-E8)/E8,DB2)<2;
               B83:=REFV(100*ABS(D-E8)/E8,DB3)<2; B84:=REFV(100*ABS(D-E8)/E8,DB4)<2;
               CX8:=A81+A82+A83+A84+B81+B82+B83+B84;
E9:=EMA(C,90);
               A91:=REFV(100*ABS(G-E9)/E9,GB1)<2; A92:=REFV(100*ABS(G-E9)/E9,GB2)<2;
               A93:=REFV(100*ABS(G-E9)/E9,GB3)<2; A94:=REFV(100*ABS(G-E9)/E9,GB4)<2;
               B91:=REFV(100*ABS(D-E9)/E9,DB1)<2; B92:=REFV(100*ABS(D-E9)/E9,DB2)<2;
               B93:=REFV(100*ABS(D-E9)/E9,DB3)<2; B94:=REFV(100*ABS(D-E9)/E9,DB4)<2;
               CX9:=A91+A92+A93+A94+B91+B92+B93+B94;
E10:=EMA(C,100);
               A101:=REFV(100*ABS(G-E10)/E10,GB1)<2; A102:=REFV(100*ABS(G-E10)/E10,GB2)<2;
               A103:=REFV(100*ABS(G-E10)/E10,GB3)<2; A104:=REFV(100*ABS(G-E10)/E10,GB4)<2;
               B101:=REFV(100*ABS(D-E10)/E10,DB1)<2; B102:=REFV(100*ABS(D-E10)/E10,DB2)<2;
               B103:=REFV(100*ABS(D-E10)/E10,DB3)<2; B104:=REFV(100*ABS(D-E10)/E10,DB4)<2;
               CX10:=A101+A102+A103+A104+B101+B102+B103+B104;
E11:=EMA(C,110);
               A111:=REFV(100*ABS(G-E11)/E11,GB1)<2; A112:=REFV(100*ABS(G-E11)/E11,GB2)<2;
               A113:=REFV(100*ABS(G-E11)/E11,GB3)<2; A114:=REFV(100*ABS(G-E11)/E11,GB4)<2;
               B111:=REFV(100*ABS(D-E11)/E11,DB1)<2; B112:=REFV(100*ABS(D-E11)/E11,DB2)<2;
               B113:=REFV(100*ABS(D-E11)/E11,DB3)<2; B114:=REFV(100*ABS(D-E11)/E11,DB4)<2;
               CX11:=A111+A112+A113+A114+B111+B112+B113+B114;
E12:=EMA(C,120);
               A121:=REFV(100*ABS(G-E12)/E12,GB1)<2; A122:=REFV(100*ABS(G-E12)/E12,GB2)<2;
               A123:=REFV(100*ABS(G-E12)/E12,GB3)<2; A124:=REFV(100*ABS(G-E12)/E12,GB4)<2;
               B121:=REFV(100*ABS(D-E12)/E12,DB1)<2; B122:=REFV(100*ABS(D-E12)/E12,DB2)<2;
               B123:=REFV(100*ABS(D-E12)/E12,DB3)<2; B124:=REFV(100*ABS(D-E12)/E12,DB4)<2;
               CX12:=A121+A122+A123+A124+B121+B122+B123+B124;
MCX:=MAX(CX2,MAX(CX3,MAX(CX4,MAX(CX5,MAX(CX6,MAX(CX7,MAX(CX8,MAX(CX9,MAX(CX10,MAX(CX11,CX12))))))))));
P2:=CX2=MCX AND MCX>1; P3:=CX3=MCX AND MCX>1; P4:=CX4=MCX AND MCX>1; P5:=CX5=MCX AND MCX>1;P6:=CX6=MCX AND MCX>1;
P7:=CX7=MCX AND MCX>1; P8:=CX8=MCX AND MCX>1; P9:=CX9=MCX AND MCX>1; P10:=CX10=MCX AND MCX>1; P11:=CX11=MCX AND MCX>1; P12:=CX12=MCX AND MCX>1;
N1:=CONST(IF((P2 AND P4) OR (P3 AND P2=0 AND P4=0),30,IF(P2 AND P3 AND P4=0,25,IF(P2=0 AND P3 AND P4,35,IF(P2 AND P3=0 AND P4=0,20,IF(P2=0 AND P3=0 AND P4,40,0)))))),NODRAW;
N2:=CONST(IF((P5 AND P7) OR (P6 AND P5=0 AND P7=0),60,IF(P5 AND P6 AND P7=0,55,IF(P5=0 AND P6 AND P7,65,IF(P5 AND P6=0 AND P7=0,50,IF(P5=0 AND P6=0 AND P7,70,0)))))),NODRAW;
N3:=CONST(IF((P8 AND P10) OR (P9 AND P8=0 AND P10=0),90,IF(P8 AND P9 AND P10=0,85,IF(P8=0 AND P9 AND P10,95,IF(P8 AND P9=0 AND P10=0,80,IF(P8=0 AND P9=0 AND P10,100,0)))))),NODRAW;
N4:=CONST(IF(P11 AND P12,115,IF(P11 AND P12=0,110,IF(P11=0 AND P12,120,0)))),NODRAW;
周期:IF(N4>0,N4,IF(N3>0,N3,IF(N2>0,N2,IF(N1>0,N1,IF(TOTALBARSCOUNT<55,13,55))))),NODRAW;
NOTEXTEE1:IF(N1>0,EMA(C,N1),DRAWNULL),COLORLIBLUE;
NOTEXTEE2:IF(N2>0 AND N1<=0,EMA(C,N2),DRAWNULL),COLORLIBLUE;
NOTEXTEE3:IF(N3>0 AND N1<=0 AND N2<=0,EMA(C,N3),DRAWNULL),COLORLIBLUE;
NOTEXTEE4:IF(N4>0,EMA(C,N4),DRAWNULL),COLORLIBLUE;
NOTEXTEE0:=EMA(C,周期);
NOTEXT01:IF(NOTEXTEE0>=REF(NOTEXTEE0,1) AND 周期>1,NOTEXTEE0,DRAWNULL),COLORRED,LINETHICK2;
NOTEXT02:IF(NOTEXTEE0<=REF(NOTEXTEE0,1) AND 周期>1,NOTEXTEE0,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWNUMBER(ISLASTBAR,EMA(C,周期),EMA(C,周期));
DRAWKLINE(H,O,L,C);

举报

扔鸡蛋(0) 回复

勤学务实
Lv.3
发表于 2020-10-13 09:22 复制 查看全部楼层
{选出均线多头向上}
E2:=EMA(C,20);
E3:=EMA(C,30);
E4:=EMA(C,40);
E5:=EMA(C,50);
E6:=EMA(C,60);
E7:=EMA(C,70);
E8:=EMA(C,80);
E9:=EMA(C,90);
E10:=EMA(C,100);
E11:=EMA(C,110);
E12:=EMA(C,120);
XG:  E2>E3 && E3>E4 && E4>E5 && E5>E6 && E6>E7 && E7>E8 && E8>E9 && E9>E10 && E10>E11 && E11>E12;

举报

扔鸡蛋(0) 回复

勤学务实
Lv.3
发表于 2020-10-13 09:10 复制 查看全部楼层
针炙探索 发表于 2020-10-12 23:04
老师.请给主图涨幅10个点以上的K线涂成黄色.谢老师了

老师.这两个公式能不能做成只选出均线多头向上 ...

{主图涨幅10个点以上的K线涂成黄色}
DRAWTEXT_FIX(1,0.02,0,0,'所属行业:')COLOR0080FF;
DRAWTEXT_FIX(1,0.10,0,0,HYBLOCK)COLOR0080FF;
DRAWTEXT_FIX(1,0.21,0,0,'所属地区:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.28,0,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.35,0,0,'概念板块:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.43,0,0,GNBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.02,0.06,0,'主营:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.08,0.06,0,EXTERNSTR(0,9996))COLOR00FFFF; {上市公司主营}
DRAWTEXT_FIX(1,0.02.0,0.17,0,'解禁:')COLORFF00FF; {未来三个月内有解禁}
DRAWTEXT_FIX(1,0.12,0.17,0,EXTERNSTR(0,901))COLORFF00FF;
DRAWTEXT_FIX(1,0.02,0.12,0,FGBLOCK),COLOR0000FF;{风格};
DRAWTEXT(SIGNALS_USER(9991,0)>0,H*1.012,'增'),COLORFF00FF;
DRAWTEXT(SIGNALS_USER(9991,0)<0,L*0.990,'减'),COLORBLUE;

{D:2 222 8}
DRAWICON(CURRBARSCOUNT=D-7 AND NOT(CURRBARSCOUNT=1),L,4);
{波段高低点}
G:=ZIG((H+MAX(C,O))/2,5);
G1:=G>REF(G,1) AND G>REFX(G,1);
D1:=G<REF(G,1) AND G<REFX(G,1);
D:=ZIG((L+MIN(C,O))/2,5);
G2:=D>REF(D,1) AND D>REFX(D,1);
D2:=D<REF(D,1) AND D<REFX(D,1);
GG:=FILTER(G1 OR G2,5) AND CURRBARSCOUNT>D;
DD:=FILTER(D1 OR D2,5) AND CURRBARSCOUNT>D;
{前期高低点距今}
GB1:=BARSLAST(GG);         
GB2:=REFV(GB1,GB1+1)+GB1+1;
GB3:=REFV(GB1,GB2+1)+GB2+1;
GB4:=REFV(GB1,GB3+1)+GB3+1;
DB1:=BARSLAST(DD);         
DB2:=REFV(DB1,DB1+1)+DB1+1;
DB3:=REFV(DB1,DB2+1)+DB2+1;
DB4:=REFV(DB1,DB3+1)+DB3+1;
{均线}
E2:=EMA(C,20);
                A21:=REFV(100*ABS(G-E2)/E2,GB1)<2; A22:=REFV(100*ABS(G-E2)/E2,GB2)<2;
                A23:=REFV(100*ABS(G-E2)/E2,GB3)<2; A24:=REFV(100*ABS(G-E2)/E2,GB4)<2;
                B21:=REFV(100*ABS(D-E2)/E2,DB1)<2; B22:=REFV(100*ABS(D-E2)/E2,DB2)<2;
                B23:=REFV(100*ABS(D-E2)/E2,DB3)<2; B24:=REFV(100*ABS(D-E2)/E2,DB4)<2;
                CX2:=A21+A22+A23+A24+B21+B22+B23+B24,NODRAW;
E3:=EMA(C,30);
                A31:=REFV(100*ABS(G-E3)/E3,GB1)<2; A32:=REFV(100*ABS(G-E3)/E3,GB2)<2;
                A33:=REFV(100*ABS(G-E3)/E3,GB3)<2; A34:=REFV(100*ABS(G-E3)/E3,GB4)<2;
                B31:=REFV(100*ABS(D-E3)/E3,DB1)<2; B32:=REFV(100*ABS(D-E3)/E3,DB2)<2;
                B33:=REFV(100*ABS(D-E3)/E3,DB3)<2; B34:=REFV(100*ABS(D-E3)/E3,DB4)<2;
                CX3:=A31+A32+A33+A34+B31+B32+B33+B34,NODRAW;
E4:=EMA(C,40);
                A41:=REFV(100*ABS(G-E4)/E4,GB1)<2; A42:=REFV(100*ABS(G-E4)/E4,GB2)<2;
                A43:=REFV(100*ABS(G-E4)/E4,GB3)<2; A44:=REFV(100*ABS(G-E4)/E4,GB4)<2;
                B41:=REFV(100*ABS(D-E4)/E4,DB1)<2; B42:=REFV(100*ABS(D-E4)/E4,DB2)<2;
                B43:=REFV(100*ABS(D-E4)/E4,DB3)<2; B44:=REFV(100*ABS(D-E4)/E4,DB4)<2;
                CX4:=A41+A42+A43+A44+B41+B42+B43+B44,NODRAW;
E5:=EMA(C,50);
                A51:=REFV(100*ABS(G-E5)/E5,GB1)<2; A52:=REFV(100*ABS(G-E5)/E5,GB2)<2;
                A53:=REFV(100*ABS(G-E5)/E5,GB3)<2; A54:=REFV(100*ABS(G-E5)/E5,GB4)<2;
                B51:=REFV(100*ABS(D-E5)/E5,DB1)<2; B52:=REFV(100*ABS(D-E5)/E5,DB2)<2;
                B53:=REFV(100*ABS(D-E5)/E5,DB3)<2; B54:=REFV(100*ABS(D-E5)/E5,DB4)<2;
                CX5:=A51+A52+A53+A54+B51+B52+B53+B54,NODRAW;
E6:=EMA(C,60);
                A61:=REFV(100*ABS(G-E6)/E6,GB1)<2; A62:=REFV(100*ABS(G-E6)/E6,GB2)<2;
                A63:=REFV(100*ABS(G-E6)/E6,GB3)<2; A64:=REFV(100*ABS(G-E6)/E6,GB4)<2;
                B61:=REFV(100*ABS(D-E6)/E6,DB1)<2; B62:=REFV(100*ABS(D-E6)/E6,DB2)<2;
                B63:=REFV(100*ABS(D-E6)/E6,DB3)<2; B64:=REFV(100*ABS(D-E6)/E6,DB4)<2;
                CX6:=A61+A62+A63+A64+B61+B62+B63+B64,NODRAW;
E7:=EMA(C,70);
                A71:=REFV(100*ABS(G-E7)/E7,GB1)<2; A72:=REFV(100*ABS(G-E7)/E7,GB2)<2;
                A73:=REFV(100*ABS(G-E7)/E7,GB3)<2; A74:=REFV(100*ABS(G-E7)/E7,GB4)<2;
                B71:=REFV(100*ABS(D-E7)/E7,DB1)<2; B72:=REFV(100*ABS(D-E7)/E7,DB2)<2;
                B73:=REFV(100*ABS(D-E7)/E7,DB3)<2; B74:=REFV(100*ABS(D-E7)/E7,DB4)<2;
                CX7:=A71+A72+A73+A74+B71+B72+B73+B74,NODRAW;
E8:=EMA(C,80);
                A81:=REFV(100*ABS(G-E8)/E8,GB1)<2; A82:=REFV(100*ABS(G-E8)/E8,GB2)<2;
                A83:=REFV(100*ABS(G-E8)/E8,GB3)<2; A84:=REFV(100*ABS(G-E8)/E8,GB4)<2;
                B81:=REFV(100*ABS(D-E8)/E8,DB1)<2; B82:=REFV(100*ABS(D-E8)/E8,DB2)<2;
                B83:=REFV(100*ABS(D-E8)/E8,DB3)<2; B84:=REFV(100*ABS(D-E8)/E8,DB4)<2;
                CX8:=A81+A82+A83+A84+B81+B82+B83+B84;
E9:=EMA(C,90);
                A91:=REFV(100*ABS(G-E9)/E9,GB1)<2; A92:=REFV(100*ABS(G-E9)/E9,GB2)<2;
                A93:=REFV(100*ABS(G-E9)/E9,GB3)<2; A94:=REFV(100*ABS(G-E9)/E9,GB4)<2;
                B91:=REFV(100*ABS(D-E9)/E9,DB1)<2; B92:=REFV(100*ABS(D-E9)/E9,DB2)<2;
                B93:=REFV(100*ABS(D-E9)/E9,DB3)<2; B94:=REFV(100*ABS(D-E9)/E9,DB4)<2;
                CX9:=A91+A92+A93+A94+B91+B92+B93+B94;
E10:=EMA(C,100);
                A101:=REFV(100*ABS(G-E10)/E10,GB1)<2; A102:=REFV(100*ABS(G-E10)/E10,GB2)<2;
                A103:=REFV(100*ABS(G-E10)/E10,GB3)<2; A104:=REFV(100*ABS(G-E10)/E10,GB4)<2;
                B101:=REFV(100*ABS(D-E10)/E10,DB1)<2; B102:=REFV(100*ABS(D-E10)/E10,DB2)<2;
                B103:=REFV(100*ABS(D-E10)/E10,DB3)<2; B104:=REFV(100*ABS(D-E10)/E10,DB4)<2;
                CX10:=A101+A102+A103+A104+B101+B102+B103+B104;
E11:=EMA(C,110);
                A111:=REFV(100*ABS(G-E11)/E11,GB1)<2; A112:=REFV(100*ABS(G-E11)/E11,GB2)<2;
                A113:=REFV(100*ABS(G-E11)/E11,GB3)<2; A114:=REFV(100*ABS(G-E11)/E11,GB4)<2;
                B111:=REFV(100*ABS(D-E11)/E11,DB1)<2; B112:=REFV(100*ABS(D-E11)/E11,DB2)<2;
                B113:=REFV(100*ABS(D-E11)/E11,DB3)<2; B114:=REFV(100*ABS(D-E11)/E11,DB4)<2;
                CX11:=A111+A112+A113+A114+B111+B112+B113+B114;
E12:=EMA(C,120);
                A121:=REFV(100*ABS(G-E12)/E12,GB1)<2; A122:=REFV(100*ABS(G-E12)/E12,GB2)<2;
                A123:=REFV(100*ABS(G-E12)/E12,GB3)<2; A124:=REFV(100*ABS(G-E12)/E12,GB4)<2;
                B121:=REFV(100*ABS(D-E12)/E12,DB1)<2; B122:=REFV(100*ABS(D-E12)/E12,DB2)<2;
                B123:=REFV(100*ABS(D-E12)/E12,DB3)<2; B124:=REFV(100*ABS(D-E12)/E12,DB4)<2;
                CX12:=A121+A122+A123+A124+B121+B122+B123+B124;
MCX:=MAX(CX2,MAX(CX3,MAX(CX4,MAX(CX5,MAX(CX6,MAX(CX7,MAX(CX8,MAX(CX9,MAX(CX10,MAX(CX11,CX12))))))))));
P2:=CX2=MCX AND MCX>1; P3:=CX3=MCX AND MCX>1; P4:=CX4=MCX AND MCX>1; P5:=CX5=MCX AND MCX>1;P6:=CX6=MCX AND MCX>1;
P7:=CX7=MCX AND MCX>1; P8:=CX8=MCX AND MCX>1; P9:=CX9=MCX AND MCX>1; P10:=CX10=MCX AND MCX>1; P11:=CX11=MCX AND MCX>1; P12:=CX12=MCX AND MCX>1;
N1:=CONST(IF((P2 AND P4) OR (P3 AND P2=0 AND P4=0),30,IF(P2 AND P3 AND P4=0,25,IF(P2=0 AND P3 AND P4,35,IF(P2 AND P3=0 AND P4=0,20,IF(P2=0 AND P3=0 AND P4,40,0)))))),NODRAW;
N2:=CONST(IF((P5 AND P7) OR (P6 AND P5=0 AND P7=0),60,IF(P5 AND P6 AND P7=0,55,IF(P5=0 AND P6 AND P7,65,IF(P5 AND P6=0 AND P7=0,50,IF(P5=0 AND P6=0 AND P7,70,0)))))),NODRAW;
N3:=CONST(IF((P8 AND P10) OR (P9 AND P8=0 AND P10=0),90,IF(P8 AND P9 AND P10=0,85,IF(P8=0 AND P9 AND P10,95,IF(P8 AND P9=0 AND P10=0,80,IF(P8=0 AND P9=0 AND P10,100,0)))))),NODRAW;
N4:=CONST(IF(P11 AND P12,115,IF(P11 AND P12=0,110,IF(P11=0 AND P12,120,0)))),NODRAW;
周期:IF(N4>0,N4,IF(N3>0,N3,IF(N2>0,N2,IF(N1>0,N1,IF(TOTALBARSCOUNT<55,13,55))))),NODRAW;
NOTEXTEE1:IF(N1>0,EMA(C,N1),DRAWNULL),COLORLIBLUE;
NOTEXTEE2:IF(N2>0 AND N1<=0,EMA(C,N2),DRAWNULL),COLORLIBLUE;
NOTEXTEE3:IF(N3>0 AND N1<=0 AND N2<=0,EMA(C,N3),DRAWNULL),COLORLIBLUE;
NOTEXTEE4:IF(N4>0,EMA(C,N4),DRAWNULL),COLORLIBLUE;
NOTEXTEE0:=EMA(C,周期);
NOTEXT01:IF(NOTEXTEE0>=REF(NOTEXTEE0,1) AND 周期>1,NOTEXTEE0,DRAWNULL),COLORRED,LINETHICK2;
NOTEXT02:IF(NOTEXTEE0<=REF(NOTEXTEE0,1) AND 周期>1,NOTEXTEE0,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWNUMBER(ISLASTBAR,EMA(C,周期),EMA(C,周期));
DRAWKLINE(H,O,L,C);
STICKLINE(C/REF(C,1)>=1.1,O,C,0.5,0),COLORYELLOW;

举报

点亮(0) 扔鸡蛋(0) 回复

针炙探索
Lv.2
发表于 2020-10-12 23:04 复制 查看全部楼层
本帖最后由 针炙探索 于 2020-10-12 23:08 编辑
勤学务实 发表于 2020-10-12 12:19
{当股价上涨突破移动均线时预警}

G:=ZIG((H+MAX(C,O))/2,5);


老师.请给主图涨幅10个点以上的K线涂成黄色.谢老师了

老师.这两个公式能不能做成只选出均线多头向上的股票?麻烦老师您了.

举报

点亮(0) 扔鸡蛋(0) 回复

冯060213
Lv.2
发表于 2020-10-12 15:08 复制 查看全部楼层
勤学务实 发表于 2020-10-12 12:20
{当股价跌至移动均线附近(距离移动均线1%)时预警}

G:=ZIG((H+MAX(C,O))/2,5);

非常感谢老师,辛苦了。

举报

扔鸡蛋(0) 回复

勤学务实
Lv.3
发表于 2020-10-12 12:20 复制 查看全部楼层
{当股价跌至移动均线附近(距离移动均线1%)时预警}

G:=ZIG((H+MAX(C,O))/2,5);
G1:=G>REF(G,1) AND G>REFX(G,1);
D1:=G<REF(G,1) AND G<REFX(G,1);
D:=ZIG((L+MIN(C,O))/2,5);
G2:=D>REF(D,1) AND D>REFX(D,1);
D2:=D<REF(D,1) AND D<REFX(D,1);
GG:=FILTER(G1 OR G2,5) AND CURRBARSCOUNT>D;
DD:=FILTER(D1 OR D2,5) AND CURRBARSCOUNT>D;
GB1:=BARSLAST(GG);         
GB2:=REFV(GB1,GB1+1)+GB1+1;
GB3:=REFV(GB1,GB2+1)+GB2+1;
GB4:=REFV(GB1,GB3+1)+GB3+1;
DB1:=BARSLAST(DD);         
DB2:=REFV(DB1,DB1+1)+DB1+1;
DB3:=REFV(DB1,DB2+1)+DB2+1;
DB4:=REFV(DB1,DB3+1)+DB3+1;
E2:=EMA(C,20);
                A21:=REFV(100*ABS(G-E2)/E2,GB1)<2; A22:=REFV(100*ABS(G-E2)/E2,GB2)<2;
                A23:=REFV(100*ABS(G-E2)/E2,GB3)<2; A24:=REFV(100*ABS(G-E2)/E2,GB4)<2;
                B21:=REFV(100*ABS(D-E2)/E2,DB1)<2; B22:=REFV(100*ABS(D-E2)/E2,DB2)<2;
                B23:=REFV(100*ABS(D-E2)/E2,DB3)<2; B24:=REFV(100*ABS(D-E2)/E2,DB4)<2;
                CX2:=A21+A22+A23+A24+B21+B22+B23+B24;
E3:=EMA(C,30);
                A31:=REFV(100*ABS(G-E3)/E3,GB1)<2; A32:=REFV(100*ABS(G-E3)/E3,GB2)<2;
                A33:=REFV(100*ABS(G-E3)/E3,GB3)<2; A34:=REFV(100*ABS(G-E3)/E3,GB4)<2;
                B31:=REFV(100*ABS(D-E3)/E3,DB1)<2; B32:=REFV(100*ABS(D-E3)/E3,DB2)<2;
                B33:=REFV(100*ABS(D-E3)/E3,DB3)<2; B34:=REFV(100*ABS(D-E3)/E3,DB4)<2;
                CX3:=A31+A32+A33+A34+B31+B32+B33+B34;
E4:=EMA(C,40);
                A41:=REFV(100*ABS(G-E4)/E4,GB1)<2; A42:=REFV(100*ABS(G-E4)/E4,GB2)<2;
                A43:=REFV(100*ABS(G-E4)/E4,GB3)<2; A44:=REFV(100*ABS(G-E4)/E4,GB4)<2;
                B41:=REFV(100*ABS(D-E4)/E4,DB1)<2; B42:=REFV(100*ABS(D-E4)/E4,DB2)<2;
                B43:=REFV(100*ABS(D-E4)/E4,DB3)<2; B44:=REFV(100*ABS(D-E4)/E4,DB4)<2;
                CX4:=A41+A42+A43+A44+B41+B42+B43+B44;
E5:=EMA(C,50);
                A51:=REFV(100*ABS(G-E5)/E5,GB1)<2; A52:=REFV(100*ABS(G-E5)/E5,GB2)<2;
                A53:=REFV(100*ABS(G-E5)/E5,GB3)<2; A54:=REFV(100*ABS(G-E5)/E5,GB4)<2;
                B51:=REFV(100*ABS(D-E5)/E5,DB1)<2; B52:=REFV(100*ABS(D-E5)/E5,DB2)<2;
                B53:=REFV(100*ABS(D-E5)/E5,DB3)<2; B54:=REFV(100*ABS(D-E5)/E5,DB4)<2;
                CX5:=A51+A52+A53+A54+B51+B52+B53+B54;
E6:=EMA(C,60);
                A61:=REFV(100*ABS(G-E6)/E6,GB1)<2; A62:=REFV(100*ABS(G-E6)/E6,GB2)<2;
                A63:=REFV(100*ABS(G-E6)/E6,GB3)<2; A64:=REFV(100*ABS(G-E6)/E6,GB4)<2;
                B61:=REFV(100*ABS(D-E6)/E6,DB1)<2; B62:=REFV(100*ABS(D-E6)/E6,DB2)<2;
                B63:=REFV(100*ABS(D-E6)/E6,DB3)<2; B64:=REFV(100*ABS(D-E6)/E6,DB4)<2;
                CX6:=A61+A62+A63+A64+B61+B62+B63+B64;
E7:=EMA(C,70);
                A71:=REFV(100*ABS(G-E7)/E7,GB1)<2; A72:=REFV(100*ABS(G-E7)/E7,GB2)<2;
                A73:=REFV(100*ABS(G-E7)/E7,GB3)<2; A74:=REFV(100*ABS(G-E7)/E7,GB4)<2;
                B71:=REFV(100*ABS(D-E7)/E7,DB1)<2; B72:=REFV(100*ABS(D-E7)/E7,DB2)<2;
                B73:=REFV(100*ABS(D-E7)/E7,DB3)<2; B74:=REFV(100*ABS(D-E7)/E7,DB4)<2;
                CX7:=A71+A72+A73+A74+B71+B72+B73+B74;
E8:=EMA(C,80);
                A81:=REFV(100*ABS(G-E8)/E8,GB1)<2; A82:=REFV(100*ABS(G-E8)/E8,GB2)<2;
                A83:=REFV(100*ABS(G-E8)/E8,GB3)<2; A84:=REFV(100*ABS(G-E8)/E8,GB4)<2;
                B81:=REFV(100*ABS(D-E8)/E8,DB1)<2; B82:=REFV(100*ABS(D-E8)/E8,DB2)<2;
                B83:=REFV(100*ABS(D-E8)/E8,DB3)<2; B84:=REFV(100*ABS(D-E8)/E8,DB4)<2;
                CX8:=A81+A82+A83+A84+B81+B82+B83+B84;
E9:=EMA(C,90);
                A91:=REFV(100*ABS(G-E9)/E9,GB1)<2; A92:=REFV(100*ABS(G-E9)/E9,GB2)<2;
                A93:=REFV(100*ABS(G-E9)/E9,GB3)<2; A94:=REFV(100*ABS(G-E9)/E9,GB4)<2;
                B91:=REFV(100*ABS(D-E9)/E9,DB1)<2; B92:=REFV(100*ABS(D-E9)/E9,DB2)<2;
                B93:=REFV(100*ABS(D-E9)/E9,DB3)<2; B94:=REFV(100*ABS(D-E9)/E9,DB4)<2;
                CX9:=A91+A92+A93+A94+B91+B92+B93+B94;
E10:=EMA(C,100);
                A101:=REFV(100*ABS(G-E10)/E10,GB1)<2; A102:=REFV(100*ABS(G-E10)/E10,GB2)<2;
                A103:=REFV(100*ABS(G-E10)/E10,GB3)<2; A104:=REFV(100*ABS(G-E10)/E10,GB4)<2;
                B101:=REFV(100*ABS(D-E10)/E10,DB1)<2; B102:=REFV(100*ABS(D-E10)/E10,DB2)<2;
                B103:=REFV(100*ABS(D-E10)/E10,DB3)<2; B104:=REFV(100*ABS(D-E10)/E10,DB4)<2;
                CX10:=A101+A102+A103+A104+B101+B102+B103+B104;
E11:=EMA(C,110);
                A111:=REFV(100*ABS(G-E11)/E11,GB1)<2; A112:=REFV(100*ABS(G-E11)/E11,GB2)<2;
                A113:=REFV(100*ABS(G-E11)/E11,GB3)<2; A114:=REFV(100*ABS(G-E11)/E11,GB4)<2;
                B111:=REFV(100*ABS(D-E11)/E11,DB1)<2; B112:=REFV(100*ABS(D-E11)/E11,DB2)<2;
                B113:=REFV(100*ABS(D-E11)/E11,DB3)<2; B114:=REFV(100*ABS(D-E11)/E11,DB4)<2;
                CX11:=A111+A112+A113+A114+B111+B112+B113+B114;
E12:=EMA(C,120);
                A121:=REFV(100*ABS(G-E12)/E12,GB1)<2; A122:=REFV(100*ABS(G-E12)/E12,GB2)<2;
                A123:=REFV(100*ABS(G-E12)/E12,GB3)<2; A124:=REFV(100*ABS(G-E12)/E12,GB4)<2;
                B121:=REFV(100*ABS(D-E12)/E12,DB1)<2; B122:=REFV(100*ABS(D-E12)/E12,DB2)<2;
                B123:=REFV(100*ABS(D-E12)/E12,DB3)<2; B124:=REFV(100*ABS(D-E12)/E12,DB4)<2;
                CX12:=A121+A122+A123+A124+B121+B122+B123+B124;
MCX:=MAX(CX2,MAX(CX3,MAX(CX4,MAX(CX5,MAX(CX6,MAX(CX7,MAX(CX8,MAX(CX9,MAX(CX10,MAX(CX11,CX12))))))))));
P2:=CX2=MCX AND MCX>1; P3:=CX3=MCX AND MCX>1; P4:=CX4=MCX AND MCX>1; P5:=CX5=MCX AND MCX>1;P6:=CX6=MCX AND MCX>1;
P7:=CX7=MCX AND MCX>1; P8:=CX8=MCX AND MCX>1; P9:=CX9=MCX AND MCX>1; P10:=CX10=MCX AND MCX>1; P11:=CX11=MCX AND MCX>1; P12:=CX12=MCX AND MCX>1;
N1:=CONST(IF((P2 AND P4) OR (P3 AND P2=0 AND P4=0),30,IF(P2 AND P3 AND P4=0,25,IF(P2=0 AND P3 AND P4,35,IF(P2 AND P3=0 AND P4=0,20,IF(P2=0 AND P3=0 AND P4,40,0))))));
N2:=CONST(IF((P5 AND P7) OR (P6 AND P5=0 AND P7=0),60,IF(P5 AND P6 AND P7=0,55,IF(P5=0 AND P6 AND P7,65,IF(P5 AND P6=0 AND P7=0,50,IF(P5=0 AND P6=0 AND P7,70,0))))));
N3:=CONST(IF((P8 AND P10) OR (P9 AND P8=0 AND P10=0),90,IF(P8 AND P9 AND P10=0,85,IF(P8=0 AND P9 AND P10,95,IF(P8 AND P9=0 AND P10=0,80,IF(P8=0 AND P9=0 AND P10,100,0))))));
N4:=CONST(IF(P11 AND P12,115,IF(P11 AND P12=0,110,IF(P11=0 AND P12,120,0))));
周期:=IF(N4>0,N4,IF(N3>0,N3,IF(N2>0,N2,IF(N1>0,N1,IF(TOTALBARSCOUNT<55,13,55)))));
NOTEXTEE0:=EMA(C,周期);
NOTEXT01:=IF(NOTEXTEE0>=REF(NOTEXTEE0,1) AND 周期>1,NOTEXTEE0,DRAWNULL);
NOTEXT02:=IF(NOTEXTEE0<=REF(NOTEXTEE0,1) AND 周期>1,NOTEXTEE0,DRAWNULL);
XG: CROSS(NOTEXTEE0*1.01,C);

举报

扔鸡蛋(0) 回复

勤学务实
Lv.3
发表于 2020-10-12 12:19 复制 查看全部楼层
{当股价上涨突破移动均线时预警}

G:=ZIG((H+MAX(C,O))/2,5);
G1:=G>REF(G,1) AND G>REFX(G,1);
D1:=G<REF(G,1) AND G<REFX(G,1);
D:=ZIG((L+MIN(C,O))/2,5);
G2:=D>REF(D,1) AND D>REFX(D,1);
D2:=D<REF(D,1) AND D<REFX(D,1);
GG:=FILTER(G1 OR G2,5) AND CURRBARSCOUNT>D;
DD:=FILTER(D1 OR D2,5) AND CURRBARSCOUNT>D;
GB1:=BARSLAST(GG);         
GB2:=REFV(GB1,GB1+1)+GB1+1;
GB3:=REFV(GB1,GB2+1)+GB2+1;
GB4:=REFV(GB1,GB3+1)+GB3+1;
DB1:=BARSLAST(DD);         
DB2:=REFV(DB1,DB1+1)+DB1+1;
DB3:=REFV(DB1,DB2+1)+DB2+1;
DB4:=REFV(DB1,DB3+1)+DB3+1;
E2:=EMA(C,20);
                A21:=REFV(100*ABS(G-E2)/E2,GB1)<2; A22:=REFV(100*ABS(G-E2)/E2,GB2)<2;
                A23:=REFV(100*ABS(G-E2)/E2,GB3)<2; A24:=REFV(100*ABS(G-E2)/E2,GB4)<2;
                B21:=REFV(100*ABS(D-E2)/E2,DB1)<2; B22:=REFV(100*ABS(D-E2)/E2,DB2)<2;
                B23:=REFV(100*ABS(D-E2)/E2,DB3)<2; B24:=REFV(100*ABS(D-E2)/E2,DB4)<2;
                CX2:=A21+A22+A23+A24+B21+B22+B23+B24;
E3:=EMA(C,30);
                A31:=REFV(100*ABS(G-E3)/E3,GB1)<2; A32:=REFV(100*ABS(G-E3)/E3,GB2)<2;
                A33:=REFV(100*ABS(G-E3)/E3,GB3)<2; A34:=REFV(100*ABS(G-E3)/E3,GB4)<2;
                B31:=REFV(100*ABS(D-E3)/E3,DB1)<2; B32:=REFV(100*ABS(D-E3)/E3,DB2)<2;
                B33:=REFV(100*ABS(D-E3)/E3,DB3)<2; B34:=REFV(100*ABS(D-E3)/E3,DB4)<2;
                CX3:=A31+A32+A33+A34+B31+B32+B33+B34;
E4:=EMA(C,40);
                A41:=REFV(100*ABS(G-E4)/E4,GB1)<2; A42:=REFV(100*ABS(G-E4)/E4,GB2)<2;
                A43:=REFV(100*ABS(G-E4)/E4,GB3)<2; A44:=REFV(100*ABS(G-E4)/E4,GB4)<2;
                B41:=REFV(100*ABS(D-E4)/E4,DB1)<2; B42:=REFV(100*ABS(D-E4)/E4,DB2)<2;
                B43:=REFV(100*ABS(D-E4)/E4,DB3)<2; B44:=REFV(100*ABS(D-E4)/E4,DB4)<2;
                CX4:=A41+A42+A43+A44+B41+B42+B43+B44;
E5:=EMA(C,50);
                A51:=REFV(100*ABS(G-E5)/E5,GB1)<2; A52:=REFV(100*ABS(G-E5)/E5,GB2)<2;
                A53:=REFV(100*ABS(G-E5)/E5,GB3)<2; A54:=REFV(100*ABS(G-E5)/E5,GB4)<2;
                B51:=REFV(100*ABS(D-E5)/E5,DB1)<2; B52:=REFV(100*ABS(D-E5)/E5,DB2)<2;
                B53:=REFV(100*ABS(D-E5)/E5,DB3)<2; B54:=REFV(100*ABS(D-E5)/E5,DB4)<2;
                CX5:=A51+A52+A53+A54+B51+B52+B53+B54;
E6:=EMA(C,60);
                A61:=REFV(100*ABS(G-E6)/E6,GB1)<2; A62:=REFV(100*ABS(G-E6)/E6,GB2)<2;
                A63:=REFV(100*ABS(G-E6)/E6,GB3)<2; A64:=REFV(100*ABS(G-E6)/E6,GB4)<2;
                B61:=REFV(100*ABS(D-E6)/E6,DB1)<2; B62:=REFV(100*ABS(D-E6)/E6,DB2)<2;
                B63:=REFV(100*ABS(D-E6)/E6,DB3)<2; B64:=REFV(100*ABS(D-E6)/E6,DB4)<2;
                CX6:=A61+A62+A63+A64+B61+B62+B63+B64;
E7:=EMA(C,70);
                A71:=REFV(100*ABS(G-E7)/E7,GB1)<2; A72:=REFV(100*ABS(G-E7)/E7,GB2)<2;
                A73:=REFV(100*ABS(G-E7)/E7,GB3)<2; A74:=REFV(100*ABS(G-E7)/E7,GB4)<2;
                B71:=REFV(100*ABS(D-E7)/E7,DB1)<2; B72:=REFV(100*ABS(D-E7)/E7,DB2)<2;
                B73:=REFV(100*ABS(D-E7)/E7,DB3)<2; B74:=REFV(100*ABS(D-E7)/E7,DB4)<2;
                CX7:=A71+A72+A73+A74+B71+B72+B73+B74;
E8:=EMA(C,80);
                A81:=REFV(100*ABS(G-E8)/E8,GB1)<2; A82:=REFV(100*ABS(G-E8)/E8,GB2)<2;
                A83:=REFV(100*ABS(G-E8)/E8,GB3)<2; A84:=REFV(100*ABS(G-E8)/E8,GB4)<2;
                B81:=REFV(100*ABS(D-E8)/E8,DB1)<2; B82:=REFV(100*ABS(D-E8)/E8,DB2)<2;
                B83:=REFV(100*ABS(D-E8)/E8,DB3)<2; B84:=REFV(100*ABS(D-E8)/E8,DB4)<2;
                CX8:=A81+A82+A83+A84+B81+B82+B83+B84;
E9:=EMA(C,90);
                A91:=REFV(100*ABS(G-E9)/E9,GB1)<2; A92:=REFV(100*ABS(G-E9)/E9,GB2)<2;
                A93:=REFV(100*ABS(G-E9)/E9,GB3)<2; A94:=REFV(100*ABS(G-E9)/E9,GB4)<2;
                B91:=REFV(100*ABS(D-E9)/E9,DB1)<2; B92:=REFV(100*ABS(D-E9)/E9,DB2)<2;
                B93:=REFV(100*ABS(D-E9)/E9,DB3)<2; B94:=REFV(100*ABS(D-E9)/E9,DB4)<2;
                CX9:=A91+A92+A93+A94+B91+B92+B93+B94;
E10:=EMA(C,100);
                A101:=REFV(100*ABS(G-E10)/E10,GB1)<2; A102:=REFV(100*ABS(G-E10)/E10,GB2)<2;
                A103:=REFV(100*ABS(G-E10)/E10,GB3)<2; A104:=REFV(100*ABS(G-E10)/E10,GB4)<2;
                B101:=REFV(100*ABS(D-E10)/E10,DB1)<2; B102:=REFV(100*ABS(D-E10)/E10,DB2)<2;
                B103:=REFV(100*ABS(D-E10)/E10,DB3)<2; B104:=REFV(100*ABS(D-E10)/E10,DB4)<2;
                CX10:=A101+A102+A103+A104+B101+B102+B103+B104;
E11:=EMA(C,110);
                A111:=REFV(100*ABS(G-E11)/E11,GB1)<2; A112:=REFV(100*ABS(G-E11)/E11,GB2)<2;
                A113:=REFV(100*ABS(G-E11)/E11,GB3)<2; A114:=REFV(100*ABS(G-E11)/E11,GB4)<2;
                B111:=REFV(100*ABS(D-E11)/E11,DB1)<2; B112:=REFV(100*ABS(D-E11)/E11,DB2)<2;
                B113:=REFV(100*ABS(D-E11)/E11,DB3)<2; B114:=REFV(100*ABS(D-E11)/E11,DB4)<2;
                CX11:=A111+A112+A113+A114+B111+B112+B113+B114;
E12:=EMA(C,120);
                A121:=REFV(100*ABS(G-E12)/E12,GB1)<2; A122:=REFV(100*ABS(G-E12)/E12,GB2)<2;
                A123:=REFV(100*ABS(G-E12)/E12,GB3)<2; A124:=REFV(100*ABS(G-E12)/E12,GB4)<2;
                B121:=REFV(100*ABS(D-E12)/E12,DB1)<2; B122:=REFV(100*ABS(D-E12)/E12,DB2)<2;
                B123:=REFV(100*ABS(D-E12)/E12,DB3)<2; B124:=REFV(100*ABS(D-E12)/E12,DB4)<2;
                CX12:=A121+A122+A123+A124+B121+B122+B123+B124;
MCX:=MAX(CX2,MAX(CX3,MAX(CX4,MAX(CX5,MAX(CX6,MAX(CX7,MAX(CX8,MAX(CX9,MAX(CX10,MAX(CX11,CX12))))))))));
P2:=CX2=MCX AND MCX>1; P3:=CX3=MCX AND MCX>1; P4:=CX4=MCX AND MCX>1; P5:=CX5=MCX AND MCX>1;P6:=CX6=MCX AND MCX>1;
P7:=CX7=MCX AND MCX>1; P8:=CX8=MCX AND MCX>1; P9:=CX9=MCX AND MCX>1; P10:=CX10=MCX AND MCX>1; P11:=CX11=MCX AND MCX>1; P12:=CX12=MCX AND MCX>1;
N1:=CONST(IF((P2 AND P4) OR (P3 AND P2=0 AND P4=0),30,IF(P2 AND P3 AND P4=0,25,IF(P2=0 AND P3 AND P4,35,IF(P2 AND P3=0 AND P4=0,20,IF(P2=0 AND P3=0 AND P4,40,0))))));
N2:=CONST(IF((P5 AND P7) OR (P6 AND P5=0 AND P7=0),60,IF(P5 AND P6 AND P7=0,55,IF(P5=0 AND P6 AND P7,65,IF(P5 AND P6=0 AND P7=0,50,IF(P5=0 AND P6=0 AND P7,70,0))))));
N3:=CONST(IF((P8 AND P10) OR (P9 AND P8=0 AND P10=0),90,IF(P8 AND P9 AND P10=0,85,IF(P8=0 AND P9 AND P10,95,IF(P8 AND P9=0 AND P10=0,80,IF(P8=0 AND P9=0 AND P10,100,0))))));
N4:=CONST(IF(P11 AND P12,115,IF(P11 AND P12=0,110,IF(P11=0 AND P12,120,0))));
周期:=IF(N4>0,N4,IF(N3>0,N3,IF(N2>0,N2,IF(N1>0,N1,IF(TOTALBARSCOUNT<55,13,55)))));
NOTEXTEE0:=EMA(C,周期);
NOTEXT01:=IF(NOTEXTEE0>=REF(NOTEXTEE0,1) AND 周期>1,NOTEXTEE0,DRAWNULL);
NOTEXT02:=IF(NOTEXTEE0<=REF(NOTEXTEE0,1) AND 周期>1,NOTEXTEE0,DRAWNULL);
XG: CROSS(C,NOTEXTEE0);

举报

点亮(1) 扔鸡蛋(0) 回复

您需要登录后才可以回帖 登录

本版积分规则 《理想财富服务协议》《免责声明》

论坛问题
微信扫一扫,添加好友咨询
驿站问题
微信扫一扫,添加好友咨询
广告投放
微信扫一扫,添加好友咨询
回顶部 到页底
快速回复 返回顶部 返回列表