通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
之字幅度:25(1--100)找起点
斜率:360(0--1080)倾斜划线
取点:1(1--2)1取低点2取高点
分:1(1--2)1为2为六等分
}
之字幅度:=25;斜率:=360;取点:=1;分:=1;
起点:=IF(取点=1,TROUGHBARS(L,之字幅度,1),PEAKBARS(H,之
字幅度,1));
价位1:=CONST(IF(取点=1,HHV(H,PEAKBARS(H,之字幅度,1)),LLV(L,TROUGHBARS(L,之字幅度,1))));
L价位:=DRAWLINE(起点=0,L,ISLASTBAR,REF(L,BARSLAST(起点=0)),0);
H价位:=DRAWLINE(起点
=0,H,ISLASTBAR,REF(H,BARSLAST(起点=0)),0);
价位2:=IF(取点=1,L价位,H价位);
价幅度:=ABS(价位1-价位2);
上限划位:=CONST(FINDHIGH(H,1,CONST(PEAKBARS(H,之字
幅度,1)),1))*1.1;
下限划位:=CONST(FINDLOW(L,1,CONST(起点),1))*0.9;
上分0:=价位2+IF(分=1,0.191,1/6)*价幅度;
上分1:=价位2+IF(分=1,0.382,2/6)*价幅度;
上分2:=价位2+IF(分=1,0.5,3/6)*价幅度;
上分3:=价位2+IF(分=1,0.618,4/6)*价幅度;
上分4:=价位2+IF(分=1,0.809,5/6)*价幅度;
上分5:=价位2+IF(分=1,1,6/6)*价幅度;
上斜线0:=IF(BETWEEN(价位2+(斜率-360)*起点*0.001,上限划
位,下限划位),价位2+(斜率-360)*起点*0.001,DRAWNULL);
上斜线1:=IF(BETWEEN(上分0+(斜率-360)*起点*0.001,上限划
位,下限划位),上分0+(斜率-360)*起点*0.001,DRAWNULL);
上斜线2:=IF(BETWEEN(上分1+(斜率-360)*起点*0.001,上限划
位,下限划位),上分1+(斜率-360)*起点*0.001,DRAWNULL);
上斜线3:=IF(BETWEEN(上分2+(斜率-360)*起点*0.001,上限划
位,下限划位),上分2+(斜率-360)*起点*0.001,DRAWNULL);
上斜线4:=IF(BETWEEN(上分3+(斜率-360)*起点*0.001,上限划
位,下限划位),上分3+(斜率-360)*起点*0.001,DRAWNULL);
上斜线5:=IF(BETWEEN(上分4+(斜率-360)*起点*0.001,上限划
位,下限划位),上分4+(斜率-360)*起点*0.001,DRAWNULL);
上斜线6:=IF(BETWEEN(上分5+(斜率-360)*起点*0.001,上限划
位,下限划位),上分5+(斜率-360)*起点*0.001,DRAWNULL);
下分0:=价位2-IF(分=1,0.191,1/6)*价幅度;
下分1:=价位2-IF(分=1,0.382,2/6)*价幅度;
下分2:=价位2-IF(分=1,0.5,3/6)*价幅度;
下分3:=价位2-IF(分=1,0.618,4/6)*价幅度;
下分4:=价位2-IF(分=1,0.809,5/6)*价幅度;
下分5:=价位2-IF(分=1,1,6/6)*价幅度;
下斜线0:=IF(BETWEEN(价位2-(斜率-360)*起点*0.001,上限划位,
下限划位),价位2-(斜率-360)*起点*0.001,DRAWNULL);
下斜线1:=IF(BETWEEN(下分0-(斜率-360)*起点*0.001,上限划位,
下限划位),下分0-(斜率-360)*起点*0.001,DRAWNULL);
下斜线2:=IF(BETWEEN(下分1-(斜率-360)*起点*0.001,上限划位,
下限划位),下分1-(斜率-360)*起点*0.001,DRAWNULL);
下斜线3:=IF(BETWEEN(下分2-(斜率-360)*起点*0.001,上限划位,
下限划位),下分2-(斜率-360)*起点*0.001,DRAWNULL);
下斜线4:=IF(BETWEEN(下分3-(斜率-360)*起点*0.001,上限划位,
下限划位),下分3-(斜率-360)*起点*0.001,DRAWNULL);
下斜线5:=IF(BETWEEN(下分4-(斜率-360)*起点*0.001,上限划位,
下限划位),下分4-(斜率-360)*起点*0.001,DRAWNULL);
下斜线6:=IF(BETWEEN(下分5-(斜率-360)*起点*0.001,上限划位,
下限划位),下分5-(斜率-360)*起点*0.001,DRAWNULL);
{通达信股票指标公式}
斜线0:IF(取点=1,上斜线0,下斜线0),COLORGREEN;
斜线1:IF(取点=1,上斜线1,下斜线1),COLORGREEN;
斜线2:IF(取点=1,上斜线2,下斜线2),COLORGREEN;
斜线3:IF(取点=1,上斜线3,下斜线3),COLORGREEN;
斜线4:IF(取点=1,上斜线4,下斜线4),COLORGREEN;
斜线5:IF(取点=1,上斜线5,下斜线5),COLORGREEN;
斜线6:IF(取点=1,上斜线6,下斜线6),COLORGREEN;
划分0:=IF(分=1, 0 , 0
划分1:=IF(分=1, 0.191 , 1/6
划分2:=IF(分=1, 0.382 , 2/6
划分3:=IF(分=1, 0.5 , 3/6
划分4:=IF(分=1, 0.618 , 4/6
划分5:=IF(分=1, 0.809 , 5/6
划分6:=IF(分=1, 1 , 6/6
DRAWTEXT(起点=0,斜线0,划分0),COLORWHITE;
DRAWTEXT(起点=0,斜线1,划分1),COLORWHITE;
DRAWTEXT(起点=0,斜线2,划分2),COLORWHITE;
DRAWTEXT(起点=0,斜线3,划分3),COLORWHITE;
DRAWTEXT(起点=0,斜线4,划分4),COLORWHITE;
DRAWTEXT(起点=0,斜线5,划分5),COLORWHITE;
DRAWTEXT(起点=0,斜线6,划分6),COLORWHITE
AAB:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
{HIGHN日前的最高价=2*HIGHN+1日内最高价的最高值}
QY:=BACKSET(AAB,HIGHN+1);{若AA则将最近HIGHN+1
周期置为1}
CC:=FILTER(QY,HIGHN)ANDH=HHV(H,HIGHN+1);
{QY的HIGHN日过滤AND最高价=HIGHN+1日内最高价
的最高值}
DRAWICON(CC,H*1.005,2);
DDD:=BARSLAST(CC);{上次CC距今天数}
GDTS:=IF(CC,CURRBARSCOUNT,0);{如果CC,返回到最后交
易日的周,否则返回0}
DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MMM:=IF(CURRBARSCOUNT GDCS2,0,1);
高点压
力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOU
NT=GDCS1,H,1)COLORGREEN,DOTLINE;
压力
A:DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(
H,GDCS2-1),1),COLOR0055FF,DOTLINE;
压力
B:DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(
H,GDCS1-1),1),COLORYELLOW,DOTLINE;
AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN)ANDL=LLV(L,LOWN+1);
{DRAWICON(CC1,L*0.98,1);}
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(L,DD1),L);
UPQK:=LOW-REF(HIGH,1);
STICKLINE(CLOSE REF(CLOSE,1)
UPQK 0,REF(HIGH,1),LOW,15,1),COLORYELLOW;
DOWNQK:=REF(LOW,1)-HIGH;
STICKLINE(CLOSE REF(CLOSE,1)
DOWNQK 0,REF(LOW,1),HIGH,15,1),COLORGREEN;
MA10:MA(CLOSE,170),COLOR0000FF;
MA20:MA(CLOSE,350),COLORFF0080;
DRAWKLINE(H,O,L,C);
N:=20;T:=20;
M1:=MA(C,N);
HPB:=REF(HHV(H,N),1);
LPB:=REF(LLV(L,T),1);
{多头交易}
BUYIN:=H
BUYEXIT:=L
SINGAL:=IF(BUYIN,1,IF(BUYEXIT,-1,0));
CURRSIGN:=REF(SINGAL,BARSLAST(SINGAL));
UPTREND:=CURRSIGN=1;
DWTREND:=CURRSIGN=-1;
{跟踪止损}
空平:=IF(DWTREND,HPB,M1),LINETHICK2;
多止:=IF(UPTREND,LPB,M1),LINETHICK2;
信
LINETHICK0;
DRAWICON(BARSLAST(DWTREND)=1,多止,4);
DRAWICON(BARSLAST(UPTREND)=1,空平,5);
号持续:=IF(DWTREND,BARSLAST(UPTREND),BARSLAST(DWTREND)),
AND
AND
{DRAWGBKLAST(CLOSE 0,STRIP(RGB(95,95,95),RGB(0,0,0),0
))}
VAR1:=AMOUNT/VOL/100;
指导:
EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA
(CLOSE,24))/4,2),COLORWHITE;
界:MA(CLOSE,27),COLORYELLOW;
红轨道:MA(MA(CLOSE,3),1),LINETHICK1,COLOR0000FF;
绿轨道:MA(MA(CLOSE,3),3),LINETHICK1,COLOR00FF00;
{波动}
TRTR:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-
HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR,10);
STICKLINE((TR ATR*1.5)AND(C O),O,C,4,0),COLOR00FF00;
STICKLINE((TR ATR*1.5)
(C O),O,C,4,0),COLORMAGENTA
MA5:MA(CLOSE,5),COLOR0000FF;
MA10:MA(CLOSE,10),COLOR00FF00;
MA30:MA(CLOSE,30),COLORYELLOW;
MA60:MA(CLOSE,60),COLORRED,POINTDOT,LINETHICK4;
MA250:MA(CLOSE,250),COLORFF9933,LINETHICK4;
N:=3;
VAR11:=MA(CLOSE,N);
VAR12:=MA(CLOSE,2*N);
VAR13:=MA(CLOSE,3*N);
VAR14:=MA(CLOSE,4*N);
VAR15:=MA((VAR11+VAR12+VAR13+VAR14)/4,5);
上轨:VAR15*1.08,COLORYELLOW,LINETHICK3;
下轨:VAR15*0.92,COLORYELLOW,LINETHICK3;
中上:VAR15*1.05,COLORGREEN,LINETHICK2;
中下:VAR15*0.95,COLORGREEN,LINETHICK2;
VAR1:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14))));
VAR2:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14))));
VAR3:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
STICKLINE(VAR2 MA(VAR3,6),LOW,HIGH,0,1),COLORLIBLUE;
STICKLINE(VAR2 MA(VAR3,6),LOW,HIGH,0,1),COLORRED;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),(CLOSE-
0.03),OPEN,3.05,0),COLORLIBLUE;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),CLOSE,OPEN,3.05,1),COLORLIBLUE;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),OPEN,(CLOSE-
0.03),3.05,0),COLORRED;
STICKLINE(((OPENMA(VAR3,6))),OPEN,CLOSE,3.05,1),COLORRED;
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW-(LOW*0.02)),7);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.02)),8);
PT:=REF(H,1)-REF(L,1);
CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
强:IF(AH REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
阻:IF(NH 强,(强-CDP)*0.618+CDP,NH)NODRAW,COLORBLUE;
M:=IF(AL REF(C,1)/1.1,REF(C,1)/1.1,AL);
撑:IF(NL M,CDP-(CDP-M)*0.618,NL)NODRAW;
底:IF(AL REF(C,1)/1.1,REF(C,1)/1.1,AL)NODRAW;
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13 1ANDEMA(X1,13) REF(EMA(X1,8),1),10),
EMA8, ∠45上升 ),COLORWHITE;
AA1:=AMOUNT/V;
BB1:=L AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100
DD1:=L MA(C,5)*0.921;
EE1:=V MA(V,5)*1.5;
FF1:=BB1ANDCC1ANDDD1ANDEE1;
DRAWTEXT(FF1,(LOW*0.99), ⽼⿏仓 ),COLOR4080FF;
A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-
LLV(L,55))*100,5,1);
⿊马线:=EMA(A51,5);
A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
线:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2));
DRAWTEXT(CROSS(趋势线,0)AND⿊马线 40,(HIGH*0.97), ▲⼤⿊马 ),COLORYELLOW;
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), 底 ),COLORA6E500;
DRAWTEXT(CROSS(88,RSI),(HIGH*1.02), 顶背离 ),COLOR1880FF;
VAR299:=LLV(LOW,27);
VAR399:=HHV(HIGH,34);
VAR499:=EMA((CLOSE-VAR299)/(VAR399-VAR299)*4,4)*25;
注意买:=IF((VAR499 10),80,100);
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;
超跌:=IF(J 0,10,0);
BDDD:=LLV(J,2)=LLV(J,8);
买⼊:=IF(CROSS(J,REF(J+0.01,1))ANDBDDDANDJ 20,30,0);
DRAWTEXT(买⼊AND注意买=100AND超跌=0,LOW, ),COLOR8000FF;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX 0,2)ANDCROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(FILTER(买=1,5),LOW-0.03, 拉升 ),COLORFFDE00;
V2:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);
STICKLINE(V2 =1,O,C,1,0),COLORWHITE;
LC33:=REF(CLOSE,1);
RSI33:=((SMA(MAX((CLOSE-LC33),0),3,1)/SMA(ABS((CLOSE-LC33)),3,1))*100);
FF33:=EMA(CLOSE,3);
MA153:=EMA(CLOSE,21);
AA:=(HHV(HIGH,20)-(2*ATR));
BB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));
SSS:=CROSS(MIN(MA(CLOSE,13),AA),CLOSE);
BBB:=BARSLAST(BB);
SSSB:=BARSLAST(SSS);
B1:=((BBB=0)AND(REF(SSSB,1) REF(BBB,1)));
B1B:=BARSLAST(B1);
B2:=((((BB=1)AND(B1B0))AND(COUNT(BB,SSSB)
B2B:=BARSLAST(B2);
B3:=((((BB=1)AND(B2B B1B))AND(COUNT(BB,SSSB) 4))and(count(bb,sssb)
2));
GK1赋值:(收盘价+最低价+最高价)/3
GK2赋值:GK1的6日指数移动平均
GK3赋值:GK2的5日指数移动平均
HJ1赋值:(3日前的收盘价-收盘价)/3日前的收盘价*100 5
HJ2赋值:HJ1的10日过滤
HJ3赋值:上次HJ2距今天数
HJ4赋值:HJ3+2日前的最高价
HJ5赋值:HJ3+1日前的最高价
HJ6赋值:HJ3日前的最高价
HJ7赋值:HJ4和HJ5的较大值
HJ8赋值:HJ7和HJ6的较大值
HJ9赋值:(收盘价-1日前的收盘价)/1日前的收盘价*100 5
MV1赋值:HJ3 150
MV2赋值:(开盘价-HJ8)/HJ8*100 30
MV3赋值:(收盘价-HJ3日内最低价的最低值)/HJ3日内最低价的最低值*100 50
MV4赋值:(收盘价-5日前的开盘价)/5日前的开盘价*100 30
MV5赋值:(手)/成交量(手)的5日简单移动平均 3.5
MV6赋值:(收盘价-89日前的收盘价)/89日前的收盘价*100 80
BA赋值:HJ9 AND MV1 AND MV2 AND MV3 AND MV4 AND MV5 AND MV6
BL赋值:BA的15日过滤
PL1赋值:(((收盘价-收盘价的54日简单移动平均)/收盘价的54日简单移动平均) 0.1)
PL2赋值:(((收盘价-收盘价的20日简单移动平均)/收盘价的10日简单移动平均) 0.3)
OUU赋值:(((PL1=1) AND (PL2=1))*0.2)
IH赋值:((((OUU=0) AND (1日前的OUU=0.2)) AND (1日前的(统计10日中满足(OUU=0.2)的天数=10)=1))*-0.1)
NY赋值:IH=-0.1
XDF赋值:(BL OR NY)
VARA赋值:以成交量(手)/当前流通股本(手)为权重成交额(元)/成交量(手)/100的动态移动平均
VARAA赋值:现价/(1日前的收盘价) 1.05 AND (现价/开盘价 1.05)
FLIGA赋值:(成交量(手)/1日前的成交量(手) 1.2 AND 统计1日中满足收阳线的天数) OR (最低价 1日前的最高价 AND 统计1日中满足收阴线的天数 AND 成交量(手)/1日前的成交量(手) 1.2)
DRA赋值:XDF AND 收盘价/1日前的收盘价 1.025 AND FLIGA AND VARAA
YF赋值:研发费用/营业收入 0.005
输出猎鹰:GK2上穿GK3 AND YF AND DRA AND 收入同比% 5
SSRP: SSRP.SSRP
MA1:MA(SSRP,6);
MA2:MA(SSRP,19);
DRAWICON(CROSS(SSRP,MA1),MA1,1);
XG:CROSS(SSRP,MA1),NODRAW;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超BOR大BOR中BOR小BOR超SOR大SOR中SOR小
S)!=0);
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗
进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(0,CONST(950-(ABS(大宗
进)*250/DAZHIV))-20,30,950,IF(CONST(大宗
进 0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(32,CONST(950-(ABS(大宗
出)*250/DAZHIV))-20,62,950,IF(CONST(大宗
出 0),RGB(23,125,255),RGB(255,0,0)));
DRAWRECTREL(92,CONST(950-(ABS(非大宗
进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗
进 0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(124,CONST(950-(ABS(非大宗
出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗
出 0),RGB(23,125,255),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0, 进出 ),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0, 进出 ),COLORCYAN;
M1:=EMA(EMA(C,21),3);
M2:=EMA(EMA(C,34),3);
TT2:=CROSS(C,M1)ANDCROSS(C,M2);
DRAWTEXT(TT2,L*0.96, 阳
四方力道
{四方力道}
V1:=DMA((((HIGH+LOW)+(CLOSE*2))/4.15),0.9);
HY1:=REF(EMA(V1,3),1);
实时线:MA(CLOSE,1),COLOR006400;
神秘线:HY1,COLOR400080;
DRAWTEXT(CROSS(CLOSE,HY1),LOW*0.95, B ),LINETHICK2,COLORYELLOW;
DRAWTEXT(CROSS(HY1,CLOSE),HIGH*1.08, S ),LINETHICK3,COLORWHITE;
APP:=(VOL/(((HIGH-LOW)*2)-ABS((CLOSE-OPEN))));
ZL:=IF((CLOSE OPEN),(APP*(HIGH-LOW)),IF((CLOSE OPEN),(APP*
((HIGH-OPEN)+(CLOSE-LOW))),(VOL/2)));
SF:=IF((CLOSE OPEN),(0-(APP*((HIGH-CLOSE)+(OPEN-
LOW)))),IF((CLOSE OPEN),(0-(APP*(HIGH-LOW))),(0-(VOL/2))));
库存能量:=MA((ZL+SF),2)
MA05:MA(C,5)LINETHICK3,COLOR00CCFF;
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
五日乖离率:=(C-MA05)/MA05*100;
BB05:=ATAN((MA05/REF(MA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((MA05-REF(MA05,1))/REF(MA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
IF(BB05 30ANDMA05 REF(MA05,1),MA05,DRAWNULL),LINETHICK3,COLORRED;
BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
IF(BB05 0ANDMA05 REF(MA05,1),MA05,DRAWNULL),LINETHICK3,COLORGREEN;
三拾日乖离率:=(C-MA30)/MA30*100,NODRAW;
VAR1:=(MA20-MA30) REF((MA20-MA30),1)ANDMA20 REF(MA20,1)AND
MA30 REF(MA30,1);
VAR2:=(MA30-MA20) REF((MA30-MA20),1)ANDMA20 REF(MA20,1)AND
MA30 REF(MA30,1);
BB30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;
强势狙击:=FILTER(BB30 30ANDBB10 45ANDCROSS(BB05,60),10);
加仓:=FILTER(COUNT(CROSS(BB05,30),5) =1ANDMA05 REF(MA05,1)AND三拾日乖
离率 REF(三拾日乖离率,1)ANDMA10 REF(MA10,1)
AND加速度5 REF(加速度5,1)AND速度5 REF(速度5,1),10);
清仓:=FILTER(COUNT(CROSS(30,BB05),5) =1AND(C MA30ORO MA30)AND
MA05 REF(MA05,1)AND三拾日乖离率 REF(三拾日乖离率,1)AND
MA10 REF(MA10,1),10);
DRAWTEXT(加仓,LOW*0.98, ←加仓 ),COLORRED;
JC:=CROSS(0,五日乖离率)AND三拾日乖离率 REF(三拾日乖离率,1)AND
MA10 REF(MA10,1);
减仓:=FILTER(JC,10);
MR:=COUNT(CROSS(五日乖离率,0),3) =1AND三拾日乖离率 REF(三拾日乖离率,1)
ANDMA05 REF(MA05,1)AND(C/REF(C,1)-1)*100 5ANDREF(C,1) MA30;
买入:=FILTER(MR,10);
DRAWTEXT(减仓,HIGH*1.02, ←风险 ),COLORCYAN;
DRAWTEXT(买入,LOW*0.98, ←买入 ),COLORYELLOW;
DRAWTEXT(清仓,HIGH*1.02, ←清仓 ),COLORGREEN;
DRAWTEXT(强势狙击,LOW*0.98, ←强势狙击 ),COLORYELLOW;
VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));
VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);
MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;
压力:MA(REF(HHV(C,30),1),2),COLOR9DFFFF;
支撑:MA(REF(LLV(C,30),1),2),COLORABFF46;