飞越彩泓变色主图公式

[复制链接]
查看58 | 回复0 | 2022-7-24 06:29:42 | 显示全部楼层 |阅读模式

是参数M1~~M6,自己看图设置吧

 

 MA5 :MA(CLOSE,M1);

MA10:MA(CLOSE,M2);

MA20:MA(CLOSE,M3);

MA30:MA(CLOSE,M4);

MA60:MA(CLOSE,M5);

MA120:MA(CLOSE,M6);

Z1:=STRCAT(HYBLOCK,' ');

Z2:=STRCAT(Z1,DYBLOCK);

Z3:=STRCAT(Z2,' ');

{-------黄托底买进,洋红压顶卖出。-------}

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));

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));

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);

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));

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);

CO:=(C-O);

洋红离场:=VAR1A,COLORMAGENTA,NODRAW;

STICKLINE(洋红离场,O,O+CO/3,3,0),COLORFF0033;

STICKLINE(洋红离场,O,O+CO/3,2.4,0),COLORFF0066;

STICKLINE(洋红离场,O,O+CO/3,1.8,0),COLORFF0099;

STICKLINE(洋红离场,O,O+CO/3,2,0),COLORFF00CC;

STICKLINE(洋红离场,O,O+CO/3,0.8,0),COLORFF00FF;

黄色低买:=VAR19,COLOR33AACC,NODRAW;

STICKLINE(黄色低买,O,O+CO/3,3,0),COLOR3335FF;

STICKLINE(黄色低买,O,O+CO/3,2.6,0),COLOR0064FF;

STICKLINE(黄色低买,O,O+CO/3,1.5,0),COLOR0093FF;

STICKLINE(黄色低买,O,O+CO/3,1.2,0),COLOR00C2FF;

STICKLINE(黄色低买,O,O+CO/3,0.5,0),COLOR00FFFF;

{涨跌停显示III}

STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,3.2,0),COLOR0099FF;

STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,3.2,0),COLORGREEN;

{=========短均线>长均线\\变色========}

IF(MA5>=REF(MA5,1) AND MA5>=MA10,MA5,DRAWNULL),COLORMAGENTA,LINETHICK1;

IF(MA10>=REF(MA10,1) AND MA10>=MA20,MA10,DRAWNULL),COLOR990066,LINETHICK2;

IF(MA20>=REF(MA20,1) AND MA20>=MA30,MA20,DRAWNULL),COLOR3333CC,LINETHICK2;

IF(MA5<=REF(MA5,1) AND MA5<=MA10,MA5,DRAWNULL),COLORDDDDDD,LINETHICK1;

IF(MA30>=REF(MA30,1) AND MA30>=MA30 AND C>MA30,MA30,DRAWNULL),COLOR00CCFF,LINETHICK3;

散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;

庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;

DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←低吸'),COLORLIRED;

DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←高抛'),COLORGREEN;

DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);

DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);

卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);

DRAWICON(卖出<0,H+0.05,15); 买线:=EMA(CLOSE,2);

卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);

B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;

S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;

VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;

S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;

A0:=(L+H+C*2)/4;

A1:EMA(A0,13)COLORBLUE,LINETHICK2;

A2:=EMA(A0,24)COLORLIBLUE,LINETHICK2;

A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;

A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;

看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),COLORMAGENTA{,LINETHICK2};

逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),COLORCYAN,{LINETHICK2};

买入持股:IF(A1X>=0,A1,DRAWNULL)COLORRED,LINETHICK3;

卖出空仓:IF(A1X<0 AND A2X<0,A1,DRAWNULL)COLORGREEN,LINETHICK3;

空:=EMA(C,5);

均衡:=EMA(空,5),COLORWHITE;

中轨:=HHV(MA(H,13),13),COLORYELLOW,LINETHICK1;

趋势:=LLV(MA(H,13),1),COLORRED,LINETHICK1;

VARAZ:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;

VARBZ:=EMA(0.667*REF(VARAZ,1)+0.333*VARAZ,5);

VARCZ:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;

VAR1Z:=(HIGH+LOW+OPEN+2*CLOSE)/5;

VAR2Z:=REF(VAR1Z,1);

VAR3Z:=SMA(MAX(VAR1Z-VAR2Z,0),10,1)/SMA(ABS(VAR1Z-VAR2Z),10,1)*100;

VAR4Z:=FILTER(IF(COUNT(VAR3Z<20,5)>=1 AND COUNT(VAR1Z=LLV(VAR1Z,10),10)>=1 AND

CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0),5);

DRAWICON(VAR4Z,LOW,25);

VAR5Z:=FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11);

DRAWTEXT(VAR5Z,LOW*0.985,'进'),COLORYELLOW;

DRAWTEXT(VAR5Z,LOW*0.995,'^' ),COLORYELLOW;

{买}

VARMACD1:=3;

VARMACD3:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) - (2)*

(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1));

DRAWICON(CROSS(VARMACD3,VARMACD1),L*0.95,25);

ZA1:=C*2-REF(C,8.5/2);

ZA2:=REF(C,19/3)*2-C;

短期对称:=(ZA1+ZA2)/2;

关键点:=HHV(短期对称,27/2);

M1:=L*2-REF(H,27/2);

M2:=REF(H,27/2)*2-L;

M3:=(M1+M2)/2;

中期对称:=FORCAST(M3,21);

趋势判断:=MA(M3,27*2),COLOR0000FF,NODRAW;

ZA5:=趋势判断-REF(趋势判断,1);

{通达信版}

IF(ZA5<0,趋势判断,DRAWNULL),COLOR00FF00,POINTDOT,LINETHICK4;

IF(ZA5>0,趋势判断,DRAWNULL),COLOR0000FF,POINTDOT,LINETHICK4;

IF(ZA5=0,趋势判断,DRAWNULL),COLOR00FFFF,POINTDOT,LINETHICK4;

TOWERC:=FORCAST(EMA((3*CLOSE+2*OPEN+HIGH+LOW)/7,3),6);

DIRECTIONMAX:=MAX(REF(TOWERC,1),REF(TOWERC,1));

DIRECTIONMIN:=MIN(REF(TOWERC,1),REF(TOWERC,1));

STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,DIRECTIONMAX,3.5,1),COLORLIRED;

STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,DIRECTIONMIN,3.5,1),COLORBLUE; 

HV:=HHV(V,5)=V OR V/REF(V,1)>=5;

FT:=BARSLAST(HV);

量能平台:=IF(HV,C,REF(C,FT));

DRAWTEXT(量能平台>REF(量能平台,1)AND C<REF(C,1),L,'*带量跌'),COLORGREEN;

DRAWTEXT(量能平台<REF(量能平台,1) AND C>REF(C,1),L,'*缩量涨'),COLORYELLOW;

DRAWTEXT(量能平台>REF(量能平台,1) AND C>REF(C,1) AND C>MA(C,13)  AND C=HHV(C,20) AND C/REF(C,1)>1.05,L,'*突破量'),COLORMAGENTA;

拉升线:IF(CURRBARSCOUNT=1 AND REF(C,1)<REF(C,2) AND C>REF(C,1) AND MA5>REF(MA5,1),CONST(REF(C,1)*1.01),DRAWNULL),COLORYELLOW;

 V1:STICKLINE(CURRBARSCOUNT=1 AND C>=REF(C,1),拉升线,拉升线*0.998,20,0),COLORYELLOW;

 DRAWTEXT(CURRBARSCOUNT=1 AND 拉升线=CONST(REF(C,1)*1.01),L*0.99,'上穿此线介入'),COLORYELLOW;

 DRAWKLINE(H,拉升线,L,C);

{顶底背离}

LC:=REF(CLOSE,1);

RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);

FF:=EMA(CLOSE,3);

MA15:=EMA(CLOSE,21);

DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'底背离'),COLORRED;

{DRAWICON(CROSS(FF,MA15),(LOW * 0.99),7); }

{顶背离}

RSI1:=((SMA(MAX((CLOSE - (REF(CLOSE,1))),0),3,1) / SMA(ABS((CLOSE - (REF(CLOSE,1)))),3,1))* 100);

DRAWTEXT(CROSS(88,RSI1) AND  (MA(C,3))>(EMA(C,3)) ,(HIGH + 0.3),'顶背离'),COLORGREEN;

{DRAWICON(CROSS(88,RSI1) AND  (MA(C,3))>(EMA(C,3)) ,(HIGH + 0.3),8); };

DRAWTEXT(REF(C,BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1))+1)>C AND

REF("MACD.DIF",BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1))+1)

<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA")

>0,L-0.02,'MACD底背离'),COLORRED;{MACD底背离}

DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)>C AND

REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)<"KDJ.K" AND

CROSS("KDJ.K","KDJ.D"),L-0.10,'KDJ底背离'),COLORBLUE;{KDJ底背离}

DRAWTEXT(REF(C,BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)>C AND

REF("RSI.RSI1",BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)

<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2")

>0,L-0.18,'RSI底背离');{RSI底背离};

DRAWTEXT(REF(C,BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1))+1)<C

AND REF("MACD.DIF",BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1))+1)

>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF")

>0,H+0.16,'MACD顶背离'),COLORGREEN;{MACD顶背离};

DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)<C

AND REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)

>"KDJ.K" AND CROSS("KDJ.D","KDJ.K")>0,H+0.08,'KDJ顶背离');{KDJ顶背离};

{涨跌提示}

涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);

STICKLINE(涨停,OPEN,CLOSE,1.5,0),COLORYELLOW;

跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);

STICKLINE(跌停,OPEN,CLOSE,1.5,0),COLORWHITE;

机构:=(L2_VOL(0,0) - L2_VOL(0,1))*VOL/CAPITAL;

累计:=EMA(机构,60)*60,COLORMAGENTA;

均值:=EMA(累计,MIN(10,60)),COLORWHITE;

VAR21:=CROSS(累计,均值);

GD:=VAR21, STICK;

DRAWTEXT(GD,L*0.97, '↖启爆点'),COLORYELLOW;

STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;

STICKLINE(C/REF(C,1)<0.95,C,O,2,0),COLORGREEN;
 

641411921.png

641411921.png

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则