通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
MV5:=EMA(V,5);
MA5:=EMA(C,5);
MV5角度:=ATAN((MV5/REF(MV5,1)-1)*100)*180/3.1416;
MA5角度:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
量角:IF(MV5角度 30,MV5角度,0),COLOR0000FF,LINETHICK0;
价角:IF(MA5角度 0,MA5角度,MA5角度),COLORFFFFFF,LINETHICK2;
PARTLINE(价角,价角 REF(价角,1)AND价角 =0,RGB(255,0,0),价角 REF(价角,1)AND价角 0,RGB(0,255,0)),LINETHICK2;
QSXS:=MA5角度 REF(MA5角度,1)ANDMV5角度
∠45↑:IF(CROSS(MA5角度,30),1,0),COLORFFFFFF,POINTDOT,LINETHICK0;
买强:IF(MA5角度 45ANDQSXS,10,0),COLOR00FFFF,POINTDOT,LINETHICK0;
防火:IF(MA5角度 70ANDMV5角度 80,20,0),COLORFF00FF,POINTDOT,LINETHICK0;
卖疯:IF(MA5角度 80ANDMV5角度 80,30,0),COLOR0000FF,POINTDOT,LINETHICK0;
WK:=MA5角度=LLV(MA5角度,3)ANDMA5角度-HHV(MA5角度,4) =0-50;
挖坑:IF(WKANDCOUNT(买强OR防火,6),0-30,0),COLOR00FF00;
海底:IF(MA5角度 0-75,0-50,0-75),COLORFF8800;
{以下设置副图显示方式}
STICKLINE(MV5角度 30,MV5角度,30,0.1,0),COLOR0000FF;
STICKLINE(买强,0,10,4,0),COLOR00FFFF;
STICKLINE(防火,10,20,4,0),COLORFF00FF;
STICKLINE(卖疯,20,30,4,0),COLOR0000FF;
DRAWTEXT(∠45↑,30, ↑ ),COLORFFFFFF;
VERTLINE(∠45↑,2),COLOR00FFFF;
30,COLORFFFFFF;
M3:=MA(C,3);
M5:=MA(C,5);
N1:=BARSLAST(CROSS(M3,M5));
N2:=BARSLAST(CROSS(M5,M3));
N:=IF(N1 N2,N1+1,0-N2-1);
STICKLINE(N 0,0-75,0-75+N*2,8,0),COLOR0000FF;
STICKLINE(N 0,0-75,0-75+N*2,8,0),COLORFFFF00;
WC:= 001引用.C1#WEEK LINETHICK0;
WO1:=IF(WEEKDAY REF(WEEKDAY,1),O,DRAWNULL);
WO:=HHV(WO1,WEEKDAY),LINETHICK0;
WH:=HHV(H,WEEKDAY),LINETHICK0;
WL:=LLV(L,WEEKDAY),LINETHICK0;
MC:= 001引用.C1#MONTH LINETHICK0;
MO1:=IF(DAY REF(DAY,1),O,DRAWNULL);
MO:=HHV(MO1,DAY),LINETHICK0;
A:=DAY REF(DAY,1);
B:=BARSLAST(A)+1;
MH:=HHV(H,B),LINETHICK0;
ML:=LLV(L,B),LINETHICK0;
STICKLINE(MC =MO,MO,MC,4,0),COLOR5CA8FD;
STICKLINE(MC MO,MO,MC,4,0),COLOR008B00;
STICKLINE(WC =WO,WO,WC,4,0),COLOR003399;
STICKLINE(WC WO,WO,WC,4,0),COLOR993300;
{JC:=(REF(C,3)+REF(C,5)+REF(C,7)+REF(C,8)+REF(C,13)+REF(C,21))/6;
参考价:SMA(JC,5,1),CIRCLEDOT,COLORGREEN;
IF(C =参考价,参考价,DRAWNULL),CIRCLEDOT,COLOR0000FF;价:}
GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L),LINETHICK0;
明日支撑:=L+(C-GJ),LINETHICK0;
今日阻力:IF(ISLASTBAR,REF(明日阻力,1),DRAWNULL),POINTDOT,LINETHICK4,COLORMAGENTA;
今日支撑:IF(ISLASTBAR,REF(明日支撑,1),DRAWNULL),POINTDOT,LINETHICK4,COLORMAGENTA;
DRAWKLINE(H,O,L,C);
MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA30:MA(CLOSE,30);
MA60:MA(CLOSE,60);
VAR3:=AMOUNT/VOL/100;
EMA13:EMA(CLOSE,13),LINETHICK2,COLORWHITE;
MA21:MA(CLOSE,21);
MA34:MA(CLOSE,34),LINETHICK2,COLORYELLOW;
STICKLINE(EMA13 MA34,EMA13,MA34,4,0),COLOR000082;
STICKLINE(EMA13 MA34,EMA13,MA34,4,0),COLORBLUE;
VAR11:=(2*CLOSE+HIGH+LOW)/4;
MA62:=MA(CLOSE,62);
MA90:=MA(CLOSE,90);
MA120:=MA(CLOSE,120);
MA250:=MA(CLOSE,250);
DRAWBAND(MA120,RGB(555,96,96),MA250,RGB(0,550,0));
AA62:MA(CLOSE,62),COLORYELLOW,LINETHICK2;
AA90:MA(CLOSE,90),COLORLIMAGENTA,LINETHICK2;
DRAWBAND(MA62,RGB(155,96,96),MA90,RGB(0,150,0));
短轨A:MA(MA(CLOSE,3),1),LINETHICK2,COLOR0000FF;
短轨B:MA(MA(CLOSE,5),5),LINETHICK2,COLOR00FF00;
DRAWBAND(短轨A,RGB(255,96,96),短轨B,RGB(0,250,0));
XZ:=IF(SSR 60,SSR,59);
H60:=HHV(H,60)=H;
V60:=HHV(V,60)=V;
HV60:=H60ANDV60;
WZ:=FILTERX(HV60,XZ);
H REF(H,BArslAst(WZ));
公式解读:
编写条件:
过去5日内,5日、10日、20日、30日高度粘合的公式。
编写方法:
N:=5;
ma5:=MA(C,5);MA10:=MA(C,10);MA20:=MA(C,20);MA30:=MA(C,30);
MLH:=Max(Max(MA5,MA10),Max(MA20,MA30));
MLL:=Min(Min(MA5,MA10),Min(MA20,MA30));
XG:HHV(MLH/MLL-1,N) 0.03