画龙点睛波策 通达信主图公式 源码 贴图
{公式名称: 画龙点睛波策画线方法: 主图叠加}
VAR1:=EMA(CLOSE,1);
VAR2:=EMA(SLOPE(CLOSE,30)*10+CLOSE,45);
STICKLINE(VAR1 =VAR2,REFDATE(HHV(HIGH,0),DATE),REFDATE(LLV(LOW,0),DATE),6,0),COLOR000046;
STICKLINE(VAR1 VAR2,REFDATE(HHV(HIGH,0),DATE),REFDATE(LLV(LOW,0),DATE),6,0),COLOR404048;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(VAR1 =VAR2,CLOSE,OPEN,3,0),COLOR000045;
STICKLINE(VAR1 =VAR2,CLOSE,OPEN,2,0),COLOR000085;
STICKLINE(VAR1 =VAR2,CLOSE,OPEN,1,0),COLOR0000C5;
STICKLINE(VAR1 =VAR2,CLOSE,OPEN,0.3,0),COLOR0000E5;
STICKLINE(VAR1 =VAR2,LOW,HIGH,0,0),COLORRED;
STICKLINE(VAR1 VAR2,LOW,HIGH,0,0),COLORCYAN;
STICKLINE(VAR1 VAR2,CLOSE,OPEN,3.1,0),COLORBLACK;
STICKLINE(VAR1 VAR2,CLOSE,OPEN,2.1,0),COLOR6A6A00;
STICKLINE(VAR1 VAR2,CLOSE,OPEN,1.5,0),COLORDDDD00;
STICKLINE(VAR1 VAR2,CLOSE,OPEN,0.3,0),COLORCYAN;
VAR3:=CLOSE/REF(CLOSE,1) 1.05;
STICKLINE(VAR3,LOW,HIGH,0,0),COLOR0088EE;
STICKLINE(VAR3,CLOSE,OPEN,3,0),COLORBLACK;
STICKLINE(VAR3,CLOSE,OPEN,2.2,0),COLOR0088DD;
STICKLINE(VAR3,CLOSE,OPEN,1.2,0),COLOR00AAFF;
STICKLINE(VAR3,CLOSE,OPEN,0.3,0),COLORYELLOW;
VAR4:=EMA(CLOSE,6);
VAR5:=EXPMA(CLOSE,5);
VAR6:=EMA(VAR4,11);
VAR7:=(3*CLOSE+LOW+OPEN+HIGH)/6;
VAR8:=(20*VAR7+19*REF(VAR7,1)+18*REF(VAR7,2)+17*REF(VAR7,3)+16*REF(VAR7,4)+15*REF(VAR7,5)+14*REF(VAR7,6)+13*REF(VAR7,7)+12*REF(VAR7,8)+11*REF(VAR7,9)+10*REF(VAR7,10)+9*REF(VAR7,11)+8*REF(VAR7,12)+7*REF(VAR7,13)+6*REF(VAR7,14)+5*REF(VAR7,15)+4*REF(VAR7,16)+3*REF(VAR7,17)+2*REF(VAR7,18)+REF(VAR7,20))/210;
VAR9:=MA(VAR8,5);
VAR10:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
VAR11:=IF(EMA(CLOSE,3) VAR6,VAR6,DRAWNULL);
VAR12:=ATAN((VAR10/REF(VAR10,1)-1)*100)*180/3.1416;
VAR13:=EMA(VAR10,30);
VAR14:=EMA(VAR10,60);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DMI.PDI DMI.MDI AND UPNDAY(DMI.ADXR,1) AND DMI.ADX DMI.ADXR,0.46,0.26,0,1),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DMI.PDI DMI.MDI AND UPNDAY(DMI.ADXR,1) AND DMI.ADX DMI.ADXR,0.46,0.26,0,2),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DMI.PDI DMI.MDI,0.46,0.21,0,3),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DMI.PDI DMI.MDI,0.46,0.21,0,4),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS(KDJ.J,KDJ.K),0.46,0.31,0,5),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS(KDJ.K,KDJ.J),0.46,0.31,0,6),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND KDJ.J KDJ.K,0.46,0.36,0,7),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND KDJ.J KDJ.K,0.46,0.36,0,8),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND MACD.DIF MACD.DEA AND MACD.MACD 0,0.46,0.41,0,9),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND MACD.DIF MACD.DEA AND MACD.MACD 0,0.46,0.41,0,10),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND MACD.DIF MACD.DEA,0.46,0.46,0,11),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND MACD.DIF MACD.DEA,0.46,0.46,0,12),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS(MACD.DIF,MACD.DEA),0.46,0.51,0,13),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS(MACD.DEA,MACD.DIF),0.46,0.51,0,14),COLORGREEN;
VAR15:=CURRBARSCOUNT=1 AND UPNDAY(VAR14,1) AND UPNDAY(VAR13,1) AND UPNDAY(VAR6,1) AND UPNDAY(VAR10,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND VAR15,0.46,0.15,0,15),COLORMAGENTA;
VAR16:=CURRBARSCOUNT=1 AND UPNDAY(VAR14,1) AND UPNDAY(VAR13,1) AND DOWNNDAY(VAR6,1) AND UPNDAY(VAR10,1);
VAR17:=CURRBARSCOUNT=1 AND UPNDAY(VAR14,1) AND DOWNNDAY(VAR13,1) AND DOWNNDAY(VAR6,1) AND UPNDAY(VAR10,1);
VAR18:=CURRBARSCOUNT=1 AND UPNDAY(VAR14,1) AND DOWNNDAY(VAR13,1) AND UPNDAY(VAR6,1) AND UPNDAY(VAR10,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (VAR16 OR VAR17 OR VAR18),0.46,0.15,0,16),COLORLIRED;
VAR19:=CURRBARSCOUNT=1 AND UPNDAY(VAR14,1) AND UPNDAY(VAR13,1) AND UPNDAY(VAR6,1) AND DOWNNDAY(VAR10,1);
VAR20:=CURRBARSCOUNT=1 AND UPNDAY(VAR14,1) AND DOWNNDAY(VAR13,1) AND UPNDAY(VAR6,1) AND DOWNNDAY(VAR10,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (VAR19 OR VAR20),0.46,0.15,0,17),COLORYELLOW;
VAR21:=CURRBARSCOUNT=1 AND UPNDAY(VAR14,1) AND UPNDAY(VAR13,1) AND DOWNNDAY(VAR6,1) AND DOWNNDAY(VAR10,1);
VAR22:=CURRBARSCOUNT=1 AND UPNDAY(VAR14,1) AND DOWNNDAY(VAR13,1) AND DOWNNDAY(VAR6,1) AND DOWNNDAY(VAR10,1);
VAR23:=CURRBARSCOUNT=1 AND DOWNNDAY(VAR14,1) AND DOWNNDAY(VAR13,1) AND DOWNNDAY(VAR6,1) AND DOWNNDAY(VAR10,1);
VAR24:=CURRBARSCOUNT=1 AND DOWNNDAY(VAR14,1) AND UPNDAY(VAR13,1) AND DOWNNDAY(VAR6,1) AND DOWNNDAY(VAR10,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (VAR23 OR VAR24 OR VAR21 OR VAR22),0.46,0.15,0,18),COLORYELLOW;
VAR25:=CURRBARSCOUNT=1 AND DOWNNDAY(VAR14,1) AND UPNDAY(VAR13,1) AND UPNDAY(VAR6,1) AND DOWNNDAY(VAR10,1);
VAR26:=CURRBARSCOUNT=1 AND DOWNNDAY(VAR14,1) AND UPNDAY(VAR13,1) AND DOWNNDAY(VAR6,1) AND UPNDAY(VAR10,1);
VAR27:=CURRBARSCOUNT=1 AND DOWNNDAY(VAR14,1) AND DOWNNDAY(VAR13,1) AND UPNDAY(VAR6,1) AND DOWNNDAY(VAR10,1);
VAR28:=CURRBARSCOUNT=1 AND DOWNNDAY(VAR14,1) AND DOWNNDAY(VAR13,1) AND DOWNNDAY(VAR6,1) AND UPNDAY(VAR10,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (VAR25 OR VAR26 OR VAR27 OR VAR28),0.46,0.15,0,19),COLORYELLOW;
VAR29:=CURRBARSCOUNT=1 AND DOWNNDAY(VAR14,1) AND DOWNNDAY(VAR13,1) AND UPNDAY(VAR6,1) AND UPNDAY(VAR10,1);
VAR30:=CURRBARSCOUNT=1 AND DOWNNDAY(VAR14,1) AND UPNDAY(VAR13,1) AND UPNDAY(VAR6,1) AND UPNDAY(VAR10,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (VAR29 OR VAR30),0.46,0.15,0,20),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (VAR29 OR VAR30),0.46,0.15,0,20),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.36,0.09,0,21),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND MACD.MACD 0 AND (CROSS(MACD.DIF,MACD.DEA) OR CROSS(VAR10,VAR6)) AND UPNDAY(VAR6,1),0.55,0.09,0,22),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND MACD.MACD 0 AND (CROSS(MACD.DEA,MACD.DIF) OR CROSS(VAR6,VAR10)) AND DOWNNDAY(VAR6,1),0.55,0.09,0,23),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(VAR6,1) AND DOWNNDAY(VAR10,1),0.55,0.09,0,24),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(VAR6,1) AND UPNDAY(VAR10,1),0.55,0.09,0,25),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(VAR6,1) AND UPNDAY(VAR10,1),0.55,0.09,0,26),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(VAR6,1) AND DOWNNDAY(VAR10,1),0.55,0.09,0,27),COLORWHITE;
VAR31:=(3*CLOSE+HIGH+LOW+OPEN)/6;
VAR32:=(8*VAR31+7*REF(VAR31,1)+6*REF(VAR31,2)+5*REF(VAR31,3)+4*REF(VAR31,4)+3*REF(VAR31,5)+2*REF(VAR31,6)+REF(VAR31,8))/36;
VAR33:=(LLV(VAR32,2)+LLV(VAR32,4)+LLV(VAR32,6))/3;
VAR34:=REF(VAR32,1)=REF(VAR33,1) AND VAR32 VAR33 AND CLOSE VAR32;
VAR35:=VAR32 VAR33 AND VAR32 REF(VAR32,1) AND VAR33 REF(VAR33,1) AND HIGH/VAR32 1.1 AND LOW VAR33 AND CLOSE VAR32;
VAR36:=VAR32 VAR33 AND VAR32 REF(VAR32,1) AND VAR33 =REF(VAR33,1) AND HIGH/VAR32
VAR37:=VAR32 VAR33 AND VAR32 REF(VAR32,1) AND VAR33 REF(VAR33,1) AND CLOSE VAR33 AND CLOSE VAR32;
VAR38:=VAR32 VAR33 AND VAR33 REF(VAR33,1) AND VAR32!=REF(VAR32,1) AND CLOSE VAR33 OR (VAR32 VAR33 AND VAR32 REF(VAR32,1) AND VAR33 REF(VAR33,1) AND CLOSE VAR33);
VAR39:=REF(VAR32,1) REF(VAR33,1) AND VAR32=VAR33 AND CLOSE VAR33;
VAR40:=VAR32=VAR33 AND CLOSE VAR33 OR (VAR32 REF(VAR32,1) AND VAR33 REF(VAR33,1) AND REF(VAR32,1)=REF(VAR33,1) AND CLOSE VAR33);
VAR41:=VAR32=VAR33 AND CLOSE VAR32;
VAR42:=AMOUNT/CLOSE/(HHV(AMOUNT,20)/HHV(CLOSE,20));
VAR43:=IF(VAR42 1,1,VAR42)*100;
DRAWTEXT_FIX(BARSTATUS=2 AND VAR34,0.8,0.05,0,28),COLORYELLOW;
DRAWTEXT_FIX(BARSTATUS=2 AND VAR35,0.8,0.05,0,29),COLORYELLOW;
DRAWTEXT_FIX(BARSTATUS=2 AND VAR36,0.8,0.05,0,30),COLORYELLOW;
DRAWTEXT_FIX(BARSTATUS=2 AND VAR37,0.8,0.05,0,31),COLORYELLOW;
DRAWTEXT_FIX(BARSTATUS=2 AND VAR38,0.8,0.05,0,32),COLORCYAN;
DRAWTEXT_FIX(BARSTATUS=2 AND VAR39,0.8,0.05,0,33),COLORCYAN;
DRAWTEXT_FIX(BARSTATUS=2 AND VAR40,0.8,0.05,0,34),COLORCYAN;
DRAWTEXT_FIX(BARSTATUS=2 AND VAR41,0.8,0.05,0,35),COLORYELLOW;
VAR44:=CLOSE-REF(CLOSE,1);
VAR45:=100*EMA(EMA(VAR44,6),6)/EMA(EMA(ABS(VAR44),6),6);
VAR46:=(EMA(CLOSE,1)+EMA(CLOSE,2)+EMA(CLOSE,3)+EMA(CLOSE,4))/4;
VAR47:=(EMA(CLOSE,10)+EMA(CLOSE,20)+EMA(CLOSE,40)+EMA(CLOSE,80))/4;
VAR48:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),5,1)*100;
VAR49:=REF(CLOSE,1);
VAR50:=(VAR49*1.0035*97+0.2)/99.650002;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.05,0,563),COLORRED;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.1,0,37),COLORCYAN;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.15,0,38),COLORCYAN;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.2,0,39),COLORCYAN;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.25,0,40),COLORCYAN;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.3,0,563),COLORRED;
DRAWTEXT_FIX(CLOSE!=0,0.05,0.1,0,41),COLORYELLOW;
DRAWTEXT_FIX(CLOSE!=0,0.05,0.15,0,42),COLORYELLOW;
DRAWTEXT_FIX(CLOSE!=0,0.05,0.2,0,STRCAT(43,STRCAT(CON2STR(VAR50,2),44))),COLORYELLOW;
DRAWTEXT_FIX(CLOSE!=0,0.05,0.25,0,45),COLORYELLOW;
VAR51:=(HIGH+LOW+OPEN+2*CLOSE)/5;
VAR52:=2*VAR51-LOW;
VAR53:=2*VAR51-HIGH;
VAR54:=VAR51+(HIGH-LOW);
VAR55:=VAR51-(HIGH-LOW);
VAR56:=REF(VAR52,1);
VAR57:=REF(VAR53,1);
DRAWTEXT_FIX(CLOSE!=0,0.02,0.35,0,STRCAT(46,STRCAT(CON2STR(VAR56,2),44))),COLORCYAN;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.4,0,STRCAT(47,STRCAT(CON2STR(VAR57,2),44))),COLOR8E8EFF;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.45,0,STRCAT(48,STRCAT(CON2STR(VAR54,2),44))),COLORWHITE;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.5,0,STRCAT(49,STRCAT(CON2STR(VAR52,2),44))),COLORCYAN;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.55,0,STRCAT(50,STRCAT(CON2STR(VAR53,2),44))),COLOR8E8EFF;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.6,0,STRCAT(51,STRCAT(CON2STR(VAR55,2),44))),COLORYELLOW;
DRAWTEXT_FIX(CLOSE!=0,0.02,0.65,0,563),COLORRED;
操作线20日:EMA(CLOSE,20),NODRAW;
红升:IF(操作线20日 REF(操作线20日,1),操作线20日,DRAWNULL),NODRAW;
绿降:IF(操作线20日 REF(操作线20日,1),操作线20日,DRAWNULL),DOTLINE,COLORRED;
趋势线:EXPMA(CLOSE,5),DOTLINE,COLORYELLOW;
VAR58:=趋势线 REF(趋势线,1);
IF(VAR58,趋势线,DRAWNULL),DOTLINE,COLORYELLOW;
VAR59:=趋势线 REF(趋势线,1);
IF(VAR59,趋势线,DRAWNULL),COLORYELLOW,LINETHICK3;
VAR60:=HHV(HIGH,13)=HIGH AND HIGH REF(HIGH,1);
VAR61:=FILTER(VAR60,12);
VAR62:=LLV(LOW,13)=LOW AND LOW REF(LOW,1);
VAR63:=FILTER(VAR62,12);
VAR64:=BARSLAST(VAR61);
压力:REF(HIGH,VAR64),NODRAW,COLORWHITE;
STICKLINE(1,压力,压力,1.5,0),COLORAEAE00;
VAR65:=BARSLAST(VAR63);
支撑:REF(LOW,VAR65),NODRAW,COLORYELLOW;
STICKLINE(1,支撑,支撑,1.5,0),COLOR006DDB;
VAR66:=100*(压力-支撑)/支撑;
VAR67:=REF(压力,1) AND OPEN =压力 AND CLOSE
DRAWICON(CROSS(VAR1,VAR2),LOW,42);
DRAWICON(CROSS(VAR2,VAR1),HIGH,43);