通达信波段牛马主图指标公式
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线: (20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLOR00FFFF;
马线:MA(牛线,3),COLOR0000FF;
DRAWBAND(牛线,RGB(150,0,80),马线,RGB(0,0,250));
A:=(3*C+L+O+H)/6;
X1:=(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;
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=2*(S2-S6);
主力成本:EMA(X1,13),COLORFF00FF,LINETHICK;
短期底部:LLV(HIGH,30),LINETHICK2,COLORFFCC00;
D1:=EXPMA(C,20),COLOR00FFFF,LINETHICK2;
CG:=EXPMA(EXPMA(CLOSE,30),1),LINETHICK3,COLOR00FF00 ;
AA1:=IF(CG>=REF(CG,1),CG,DRAWNULL),COLORRED ,LINETHICK3;
STICKLINE(C>=D1&& C>=O,H,L,0,0),COLORRED;
STICKLINE(C>=D1 && C<O,C,O,3,1),COLORRED;
STICKLINE(C>=D1 && C<O,O,H,0,0),COLORRED;
STICKLINE(C>=D1 && C<O,C,L,0,0),COLORRED;
STICKLINE(C<D1 && C>O,C,O,3,1),COLORBLUE;
STICKLINE(C<D1 && C<=O,C,O,3,1),COLORBLUE;
STICKLINE(C<D1 && C<=O,H,L,0,1),COLORBLUE;
STICKLINE(C<D1 && C>O,C,H,0,1),COLORBLUE;
STICKLINE(C<D1 && C>O,O,L,0,1),COLORBLUE;
VAR111:=EMA(CLOSE,4)-EMA(CLOSE,13);
AAG:=VAR111>=REF(VAR111,1);
BB:=VAR111<REF(VAR111,1);
买入:=DRAWICON(CROSS(AAG,BB),L,1);
卖出:=DRAWICON(CROSS(BB,AAG),H,2);
STICKLINE(买入,O,(C-O)/2+O,3,0),COLOR335555;
STICKLINE(买入,O,(C-O)/2+O,2.2,0),COLOR338888;
STICKLINE(买入,O,(C-O)/2+O,1.5,0),COLOR33AAAA;
STICKLINE(买入,O,(C-O)/2+O,1,0),COLOR33CCCC;
STICKLINE(买入,O,(C-O)/2+O,0,0),COLOR33EEEE;
STICKLINE(卖出,O,(C-O)/2+O,3,0),COLOR550055;
STICKLINE(卖出,O,(C-O)/2+O,2.2,0),COLOR880088;
STICKLINE(卖出,O,(C-O)/2+O,1.5,0),COLORAA00AA;
STICKLINE(卖出,O,(C-O)/2+O,1,0),COLORCC00CC;
STICKLINE(卖出,O,(C-O)/2+O,0.5,0),COLOREE00EE;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
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);
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;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),4,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;
DRAWICON(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW*0.95,17);
DRAWTEXT(VAR1>90,LOW*0.92,'←追肥'),COLORFF00FF;
DRAWICON(VAR1>90,LOW*0.92,25);
大资金:=(VAR18 AND COUNT(VAR18,30)=1);
DRAWTEXT(大资金,LOW*0.85,'▲大资金');
{季节变化}
AA:=BARSCOUNT(C);
AH:=HHV(H,200);
AL:=LLV(L,200);
A0:=(AH-AL)/40;
B11:=L-A0;
STICKLINE((AA+0)/34=FLOOR((AA+0)/34),B11,B11-1.5*A0,2,0),COLORF00FF0;
DRAWTEXT((AA+0)/34=FLOOR((AA+0)/34),B11-1*A0,'季节变化'),COLORLIGREEN;
{大笔出货}
VAR22:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VAR23:=(HIGH+LOW+CLOSE)/3;
VAR24:=(VAR23-MA(VAR23,14))/(0.015*AVEDEV(VAR23,14));
VAR25:=(VAR23-MA(VAR23,70))/(0.015*AVEDEV(VAR23,70));
VAR26:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR27:=100-ABS(VAR26);
VAR28:=IF(VAR27<90,VAR27,100);
VAR29:=IF(VAR22>0,VAR22,0);
VAR30:=IF(VAR25>=200 AND VAR24>=150,15,IF(VAR25<=-200 AND VAR24<=-150,-15,VAR15))+60;
VAR31:=VAR29>48 AND VAR30>60 AND VAR28<100;
DRAWTEXT(VAR31 AND COUNT(VAR31,30)=1,HIGH*1.02,'大笔出货'),LINETHICK1,COLORFFCC66;
XXS:=MA(HIGH,5)*(1+5/100);
DRAWTEXT(CROSS(XXS,C),H,'←收割'),COLORGREEN,LINETHICK1;
XL1:=((LLV(LOW,3) = LLV(LOW,60)) AND ((CLOSE / REF(CLOSE,1)) >= 1.04));
XL2:=(((CLOSE - EMA(CLOSE,21)) / EMA(CLOSE,21)) * 100);
XL3:=CROSS(XL2,(0 - 20));
DRAWTEXT(FILTER(((XL1 > 0) AND LOW),5),(LOW - 0.4),'●买点');
DRAWTEXT((XL3 > 0),(LOW - 0.2),'●绝对底部');
DRAWTEXT(CROSS(90,RSI) , HIGH*1.01,'←逢高出局!'),COLOR00FF00 ;