漂亮实用的主图--神笔马良。这是一个老公式了,欢迎大家使用。公式有源码,也请有能力的人优化。
神笔马良
VV:=(C+L+H)/3;
DSA:=SMA(EMA(VV,2),2,1)LINETHICK2,COLORRED;
Y396:=DSA;
险1:=Y396*1.1,COLORLIRED;
险2:=Y396*1.125,COLORLIRED;
险3:=Y396*1.15,COLORLIRED;
良1:=Y396*0.9,COLORLIBLUE;
良2:=Y396*0.875,COLORLIBLUE;
良3:=Y396*0.85,COLORLIBLUE;
变色:=IF(Y396
{WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;}
{WSR2:=CROSS(WSR1,5);}
{WSR3:=CROSS(8,WSR1);}
{WSR4:=CROSS(WSR1,-5);}
{WSR5:=CROSS(WSR1,-8);}
{WSR6:=WSR3;}
{WSR7:=WSR4 OR WSR5;}
{WSR8:=WSR7 AND FILTER(WSR7,5);}
{WSR10:DRAWICON(WSR8,L-0.01,1);}
{WSR9:=WSR6 AND FILTER(WSR6,5);}
{WSR11:DRAWICON(WSR9,H+0.01,2);}
WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;
WSR2:=CROSS(WSR1,5);
WSR3:=CROSS(8,WSR1);
WSR4:=CROSS(WSR1,-5);
WSR5:=CROSS(WSR1,-8);
WSR6:=WSR3;
WSR7:=WSR4 OR WSR5;
WSR8:=WSR7 AND FILTER(WSR7,5);
WSR10:DRAWICON(WSR8,L-0.01,1);
WSR9:=WSR6 AND FILTER(WSR6,5);
WSR11:DRAWICON(WSR9,H+0.01,2);
WSR12:=O<良3;
DRAWICON(WSR12 AND FILTER(WSR12,12),L-0.03,9);
W1:=C>REF(C,1) AND MACD0 AND V
W2:=C>REF(C,1) AND MACD<0 AND MACD
XG:=W1 OR W2;
VAR1:=AMOUNT/VOL/7;
VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
VAR3:=SUM(AMOUNT,10)/VAR1/7;
VAR4:=DMA(VAR2,VOL/VAR3);
VAR5:=(CLOSE-VAR4)/VAR4*100,COLORLIMAGENTA;
XG1:=CROSS(VAR5,MA(VAR5,2)) AND VAR5<0 AND C<(HHV(H,5)*0.88) AND REF(O>C,1) AND REF(O>C,2);
XG3:=XG AND XG1 AND L<良1;
WSR13:=O>良3 AND L<良1 OR XG3;
DRAWICON(WSR13 AND FILTER(WSR13,10),L-0.03,5);
WSR14:=H>险3;DRAWICON(WSR14 AND FILTER(WSR14,15),H+0.03,6);
WSR15:=H<险3 AND H>险2;DRAWICON(WSR15 AND FILTER(WSR15,5),H+0.03,4);
WSR16:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3);
WSR17:=(INDEXC-MA(INDEXC,8))/MA(INDEXC,8);
WSR18:=(INDEXC-MA(INDEXC,18))/MA(INDEXC,18);
WSR19:=(WSR16 + WSR17 + WSR18)/3;
WSR20:=(C-MA(C,3))/MA(C,3);
WSR21:=(C-MA(C,8))/MA(C,8);
WSR22:=(C-MA(C,18))/MA(C,18);
WSR23:=(WSR20 + WSR21 + WSR22)/3;
WSR24:=(WSR19>REF(WSR19,1) AND CROSS(WSR23,WSR19))*50;
WSR25:=(INDEXC-MA(INDEXC,6))/MA(INDEXC,6);
WSR26:=(INDEXC-MA(INDEXC,12))/MA(INDEXC,12);
WSR27:=(INDEXC-MA(INDEXC,24))/MA(INDEXC,24);
WSR28:=(WSR25 + WSR26 + WSR27)/3;
WSR29:=(C-MA(C,6))/MA(C,6);
WSR30:=(C-MA(C,12))/MA(C,12);
WSR31:=(C-MA(C,24))/MA(C,24);
WSR32:=(WSR29 + WSR30 + WSR31)/3;
WSR33:=(WSR28>REF(WSR28,1) AND CROSS(WSR32,WSR28))*20;
WSR34:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13); {A:=DRAWLINE(LOW<=LLV(LOW,120),LOW,HHV(H,6)<=HHV(H,10),LLV(LOW,6),1),
WSR35:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);
WSR36:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);
WSR37:=(WSR34 + WSR35 + WSR36)/3;
WSR38:=(C-MA(C,13))/MA(C,13);
WSR39:=(C-MA(C,34))/MA(C,34);
WSR40:=(C-MA(C,55))/MA(C,55);
WSR41:=(WSR38 + WSR39 + WSR40)/3;
WSR42:=(WSR37>REF(WSR37,1) AND CROSS(WSR41,WSR37));
WSR43:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);
WSR44:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);
WSR45:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);
WSR46:=(WSR43 + WSR44 + WSR45)/3;
WSR47:=(C-MA(C,30))/MA(C,30);
WSR48:=(C-MA(C,60))/MA(C,60);
WSR49:=(C-MA(C,90))/MA(C,90);
WSR50:=(WSR47 + WSR48 + WSR49)/3;
WSR51:=(WSR46>REF(WSR46,1) AND CROSS(WSR50,WSR46));
WSR52:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);
WSR53:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);
WSR54:=(INDEXC-MA(INDEXC,89))/MA(INDEXC,89);
WSR55:=(WSR52 + WSR53 + WSR54)/3;
WSR56:=(C-MA(C,60))/MA(C,60);
WSR57:=(C-MA(C,120))/MA(C,120);
WSR58:=(C-MA(C,220))/MA(C,220);
WSR59:=(WSR56 + WSR57 + WSR58)/3;
WSR60:=(WSR59>REF(WSR59,1) AND CROSS(WSR59,WSR55));
WSR61:=WSR24 OR WSR33 OR WSR42 OR WSR51 OR WSR60;
{DRAWICON(WSR61 AND H
COLORBLUE ,LINETHICK2;}
A:=(3*C+L+O+H)/6;
TY:=C;
成本:=(MA(CLOSE,60)+MA(CLOSE,70)+MA(CLOSE,90)+MA(CLOSE,108))/4,COLORRED,LINETHICK2;
MA0:MA(C,0)COLORYELLOW ,LINETHICK2;
K:=(C+H+L)/3;
D:=MA(K,4);
阻力:=HHV(D,55),COLORYELLOW,LINETHICK2;
顶部:=HHV(H*0.98,55)COLORFFFFFF,LINETHICK2;
DRAWICON(REF(C,1)
TYP:= (HIGH + LOW +2* C)/4;
均线:=EMA(TYP,3),LINETHICK2,COLORWHITE;
均线上轨:=HHV(均线,14),LINETHICK2,COLORYELLOW;
均线下轨:=LLV(均线,14),LINETHICK2,COLORGREEN;
角度:=ATAN((均线/REF(均线,1)-1)*100)*180/3.1416;
{K线优化}
STICKLINE(CLOSE>=OPEN,HIGH,LOW,0,1 ),COLOR5B5BFF;
STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,2.7,0 ),COLOR0000CC;
STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,2,0 ),COLOR0E0EFF;
STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,1.2,0 ),COLOR4848FF;
STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0.6,0 ),COLOR7878FF;
STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0.1,0 ),COLORA1A1FF;
STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0,0 ),COLORCACAFF;
STICKLINE(CLOSE< OPEN,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< OPEN,OPEN,CLOSE,2.7,0 ),COLOR990000;
STICKLINE(CLOSE< OPEN,OPEN,CLOSE,2,0 ),COLORCC0000;
STICKLINE(CLOSE< OPEN,OPEN,CLOSE,1.2,0 ),COLORFF4400;
STICKLINE(CLOSE< OPEN,OPEN,CLOSE,0.6,0 ),COLORFF8800;
STICKLINE(CLOSE< OPEN,OPEN,CLOSE,0.1,0 ),COLORFFCC00;
STICKLINE(CLOSE< OPEN,OPEN,CLOSE,0,0 ),COLORCYAN;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(X,13);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWICON(FILTER(买=1,5),L*0.97,1);
{DT1:=C>REF(C,N);
DT2:=C>REF(C,M);
STICKLINE(DT2,H,L,0,0),COLORRED;
STICKLINE(DT2=0,H,L,0,0),COLORBLUE;
STICKLINE(DT1,H,MAX(O,C),0,0),COLORRED;
STICKLINE(DT1=0,L,MIN(O,C),0,0),COLORBLUE;
STICKLINE(DT2,O,C,2.5,0),COLORRED;
STICKLINE(DT2=0,O,C,2.5,0),COLORBLUE;
STICKLINE(DT1,(O+C)/2,O,2.5,0),COLORRED;
STICKLINE(DT1=0,(O+C)/2,C,2.5,0),COLORBLUE;};