舞文弄墨通达信公式 主图 源码附图
AMV0:=VOL*(O+C)/2;
CG:MA(C,3),COLORFFCC66,LINETHICK2;
FL:=HHV(CG,2);
黄金线:HHV(CG,2),COLOR00FF00;
FS:CG-(FL-CG),COLORRED,LINETHICK2;
十:MA(C,13),COLOR00FFFF,LINETHICK2;
涨:IF(MA(CLOSE,13)>REF(MA(CLOSE,13),1),MA(CLOSE,13),DRAWNULL),COLORRED,LINETHICK2;
平:IF(MA(CLOSE,13)=REF(MA(CLOSE,13),1),MA(CLOSE,13),DRAWNULL),COLOR00FFFF,LINETHICK3;
跌:IF(MA(CLOSE,13)<REF(MA(CLOSE,13),1),MA(CLOSE,13),DRAWNULL),COLORGREEN,LINETHICK2;
DRAWTEXT(平=十,十*0.998-0.01,'关注'),COLORCYAN;TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
A:=REF(C,BARSLAST(HD)); B:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
波峰:IF(T1,A,A),COLORFF00FF,POINTDOT;
STICKLINE(T1,A,A,9,0),COLORFF00FF;
波谷:IF(T2,B,B),COLOR80FF00,POINTDOT;
STICKLINE(T2,B,B,9,0),COLOR80FF00;VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'买'),COLORRED;
S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
DRAWTEXT(卖1>0,HIGH*1.02,'卖'),COLORGREEN;
{股灵吧决策}
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
X1:=(C+L+H)/3;
X2:=EMA(X1,6);
X3:=EMA(X2,5);
GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5));
GR3:=COUNT("BIAS.BIAS2"(6,13,24)>10 AND H=HHV(H,GR1),GR1);
GR4:=H=HHV(H,GR1);
GR5:="MACD.MACD"(9,17,8)<REF("MACD.MACD"(9,17,8),1);
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
生命线:MA(CLOSE,43),LINETHICK3,COLORWHITE;
AA1:=MA(C,5);
BB1:=MA(C,15);
AF:=CROSS(AA1,BB1);
STICKLINE(AF,LLV(L,4),LLV(L,4),50,1),COLORRED,LINETHICK3;
DRAWTEXT(AF,LLV(L,4),'止损线'),COLORYELLOW;
VAR01:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25);
VAR02:=HIGH-REF(HIGH,1);
VAR03:=REF(LOW,1)-LOW;
VAR04:=SUM(IF(VAR02>0 AND VAR02>VAR03,VAR02,0),25);
VAR05:=SUM(IF(VAR03>0 AND VAR03>VAR02,VAR03,0),25);
VAR06:=VAR04*100/VAR01;
VAR07:=VAR05*100/VAR01;
VAR08:=MA(ABS(VAR07-VAR06)/(VAR07+VAR06)*100,15);
VAR09:=(VAR08+REF(VAR08,15))/2;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),4.1,1)/SMA(ABS(CLOSE-LC),4.1,1)*100;
DRAWICON(CROSS(84,RSI) ,H*1.03,5);
DRAWICON(CROSS(RSI,11) ,L*0.99,4);
VAR27:=REF(CLOSE,1);
VAR28:=SMA(MAX(CLOSE-VAR27,0),5.5,1)/SMA(ABS(CLOSE-VAR27),6,1)*100;
DRAWICON(IF(CROSS(76,VAR28),1,0),H*1.03,5);
DRAWTEXT(FILTER(EMA(CLOSE,60)-EMA(CLOSE,12)>0 AND EMA(CLOSE,12)/LOW>1.15,5),
LOW,'☆'),LINETHICK7 , COLORFF00FF;
VARA:=((AMOUNT)/(VOL))/(100);
VARB:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
VARC:=((SUM(AMOUNT,7))/(VARA))/(100);
VARD:=DMA(VARB,(VOL)/(VARC));
VARE:=((CLOSE-VARD)/(VARD))*(100);
VARF:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
VARJ:=MA(VARE,20)+STD(VARE,20);
BIAS18:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
AA:=SMA(VARF,3,1);
SS:=(REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (AA>79);
DRAWTEXT((REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND
(AA>SS),H*1.02,'☆卖'),LINETHICK7,COLORGREEN;
VAR31:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2);{ZIG 有未来}
VAR32:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);
STICKLINE(VAR31,C,O,1,0),COLORYELLOW,LINETHICK2;{高位黄s}
STICKLINE(VAR31,C,O,1,0),COLORYELLOW,LINETHICK2;{高位黄s}
STICKLINE(VAR31,H,L,1,0),COLORYELLOW,LINETHICK2;{高位黄s}
STICKLINE(VAR32,C,O,1,0),COLORFF00FF,LINETHICK2;{底位红色}
STICKLINE(VAR32,C,O,1,0),COLORFF00FF,LINETHICK2;{底位红色}
STICKLINE(VAR32,H,L,1,0),COLORFF00FF,LINETHICK2;{底位红色};
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
AMV0赋值:成交量*(O+C)/2
输出CG:C的3日简单移动平均,COLORFFCC66, 线宽为2
FL赋值:2日内CG最高值
输出黄金线:2日内CG最高值,COLOR00FF00
输出FS:CG-(FL-CG),画红色, 线宽为2
输出十:C的13日简单移动平均,COLOR00FFFF, 线宽为2
输出涨:IF(CLOSE的13日简单移动平均>REF(CLOSE的13日简单移动平均,1),CLOSE的13日简单移动平均,DRAWNULL),画红色, 线宽为2
输出平:IF(CLOSE的13日简单移动平均=REF(CLOSE的13日简单移动平均,1),CLOSE的13日简单移动平均,DRAWNULL),COLOR00FFFF, 线宽为3
输出跌:IF(CLOSE的13日简单移动平均[当满足条件平=十时,在十*0.998-0.01和'关注'位置书写文字]
TY赋值:C
A1赋值:10日前的TY=2*10+1日内TY最高值
B1赋值:A1的10过滤
C1赋值:BACKSET(B1,10+1)
HD赋值:C1的10过滤
A2赋值:10日前的TY=2*10+1日内TY最低值
B2赋值:A2的10过滤
C2赋值:BACKSET(B2,10+1)
LD赋值:C2的10过滤
A赋值:REF(C,上次HD距今天数)
B赋值:REF(C,上次LD距今天数)
T1赋值:上次HD距今天数
T2赋值:上次HD距今天数>BARSLAST(LD) AND NOT(LD)
如果T1返回A否则返回A
当满足条件T1时,在A和A之间画柱状线
如果T2返回B否则返回B
当满足条件T2时,在B和B之间画柱状线
VAR3:=240日内最高价最低值
VAR4:=100*(CLOSE-VAR3)/VAR3
VAR5:=(CLOSE-528日内最低价最低值)/(528日内最高价最高值-528日内最低价最低值)*100
VAR6:=(CLOSE-530日内CLOSE最低值)/(530日内CLOSE最高值-530日内CLOSE最低值)*100
VAR7:=0
VAR8:=SMA(CLOSE-1日前的CLOSE和0较大值,34,1)/SMA(CLOSE-1日前的CLOSE的绝对值,7,1)*100
VAR9:=SMA(CLOSE-1日前的CLOSE和0较大值,13,1)/SMA(CLOSE-1日前的CLOSE的绝对值,13,1)*100
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND 最高价>最低价+0.04,4,0)
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3)
VAR12:=ZIG(3,6)[=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3)]
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3)
VAR14:=ZIG(3,22)[=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3)]
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3)
VAR16:=ZIG(3,51)[=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3)]
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3)
VAR18:=ZIG(3,72)[=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3)]
VAR19:=CLOSE的2日指数移动平均-CLOSE的150日指数移动平均
买1赋值:VAR10
买2赋值:(VAR11+VAR13+VAR15+VAR17)
卖1赋值:(VAR12+VAR14+VAR16+VAR18)
当满足条件买1>0 OR 买2>0时,在最低价*0.99和'买'位置书写文字
如果卖1>0返回最高价*1.01否则返回DRAWNULL
当满足条件卖1>0时,在最高价*1.02和'卖'位置书写文字
{股灵吧决策}
VAR100:=(100 - ((90 * (20日内最高价最高值 - CLOSE)) / (20日内最高价最高值 - 20日内最低价最低值)))
VAR200:=(100 - ((90 * (20日内最高价最高值 - CLOSE)) / (20日内最高价最高值 - 20日内最低价最低值)))
VAR300:=(100 - MA(((100 * (5日内最高价最高值 - CLOSE)) / (5日内最高价最高值 - 5日内最低价最低值)),34))
X1赋值:(C+L+H)/3
X2赋值:X1的6日指数移动平均
X3赋值:X2的5日指数移动平均
GR1赋值:上次BETWEEN("BIAS.BIAS2"(6,13,24距今天数,0,5))
GR3赋值:COUNT("BIAS.BIAS2"(6,13,24)>10 AND H=GR1日内H最高值,GR1)
GR4赋值:H=GR1日内H最高值
GR5赋值:"MACD.MACD"(9,17,8)[
STICKLINE(CLOSE> 1日前的CLOSE ,最高价,最低价,0,1 ),画红色]
STICKLINE(CLOSE> 1日前的CLOSE ,开盘价,CLOSE,3,0 ),COLOR000055
STICKLINE(CLOSE> 1日前的CLOSE ,开盘价,CLOSE,2.7,0 ),COLOR000077
STICKLINE(CLOSE> 1日前的CLOSE ,开盘价,CLOSE,2.1,0 ),COLOR000099
STICKLINE(CLOSE> 1日前的CLOSE ,开盘价,CLOSE,1.5,0 ),COLOR0000BB
STICKLINE(CLOSE> 1日前的CLOSE ,开盘价,CLOSE,0.9,0 ),COLOR0000DD
STICKLINE(CLOSE> 1日前的CLOSE ,开盘价,CLOSE,0.3,0 ),COLOR0000FF
STICKLINE(CLOSE= 1日前的CLOSE ,最高价,最低价,0,1 ),画白色
STICKLINE(CLOSE= 1日前的CLOSE ,开盘价,CLOSE,3,0 ),COLOR555555
STICKLINE(CLOSE= 1日前的CLOSE ,开盘价,CLOSE,2.7,0 ),COLOR777777
STICKLINE(CLOSE= 1日前的CLOSE ,开盘价,CLOSE,2.1,0 ),COLOR999999
STICKLINE(CLOSE= 1日前的CLOSE ,开盘价,CLOSE,1.5,0 ),COLORBBBBBB
STICKLINE(CLOSE= 1日前的CLOSE ,开盘价,CLOSE,0.9,0 ),COLORDDDDDD
STICKLINE(CLOSE= 1日前的CLOSE ,开盘价,CLOSE,0.3,0 ),COLORFFFFFF
STICKLINE(CLOSE< 1日前的CLOSE ,最高价,最低价,0,1 ),COLORCYAN
STICKLINE(CLOSE< 1日前的CLOSE ,开盘价,CLOSE,3,0 ),COLOR990000
STICKLINE(CLOSE< 1日前的CLOSE ,开盘价,CLOSE,2.7,0 ),COLORCC0000
STICKLINE(CLOSE< 1日前的CLOSE ,开盘价,CLOSE,2.1,0 ),COLORFF4400
STICKLINE(CLOSE< 1日前的CLOSE ,开盘价,CLOSE,1.5,0 ),COLORFF8800
STICKLINE(CLOSE< 1日前的CLOSE ,开盘价,CLOSE,0.9,0 ),COLORFFCC00
STICKLINE(CLOSE< 1日前的CLOSE ,开盘价,CLOSE,0.3,0 ),COLORCYAN
输出生命线:CLOSE的43日简单移动平均, 线宽为3,画白色
AA1赋值:C的5日简单移动平均
BB1赋值:C的15日简单移动平均
AF:=AA1上穿BB1
STICKLINE(AF,4日内L最低值,4日内L最低值,50,1),画红色, 线宽为3
DRAWTEXT(AF,4日内L最低值,'止损线'),画黄色
VAR01:=SUM(MAX(MAX(最高价-最低价,最高价-1日前的CLOSE的绝对值),ABS(最低价-1日前的CLOSE)),25)
VAR02:=最高价-1日前的最高价
VAR03:=1日前的最低价-最低价
如果VAR02>0 AND VAR02>VAR03返回VAR02否则返回0
如果VAR03>0 AND VAR03>VAR02返回VAR03否则返回0
VAR06:=VAR04*100/VAR01
VAR07:=VAR05*100/VAR01
VAR08:=MA(VAR07-VAR06的绝对值/(VAR07+VAR06)*100,15)
VAR09:=(VAR08+15日前的VAR08)/2
LC赋值:1日前的CLOSE
RSI:=SMA(CLOSE-LC和0较大值,4.1,1)/SMA(CLOSE-LC的绝对值,4.1,1)*100
DRAWICON(84上穿RSI ,H*1.03,5)
DRAWICON(RSI上穿11 ,L*0.99,4)
VAR27:=1日前的CLOSE
VAR28:=SMA(CLOSE-VAR27和0较大值,5.5,1)/SMA(CLOSE-VAR27的绝对值,6,1)*100
DRAWICON(IF(76上穿VAR28,1,0),H*1.03,5)
DRAWTEXT(FILTER(CLOSE的60日指数移动平均-CLOSE的12日指数移动平均>0 AND CLOSE的12日指数移动平均/最低价>1.15,5),
最低价,'☆'),LINETHICK7 , COLORFF00FF
VARA赋值:((AMOUNT)/(成交量))/(100)
VARB赋值:((3)*(最高价)+最低价+开盘价+(2)*(CLOSE))/(7)
VARC:=((7的AMOUNT日累和)/(VARA))/(100)
VARD:=DMA(VARB,(成交量)/(VARC))
VARE:=((CLOSE-VARD)/(VARD))*(100)
VARF:=((CLOSE-34日内最低价最低值)/(34日内最高价最高值-34日内最低价最低值))*(100)
VARJ:=VARE的20日简单移动平均+VARE的20估算标准差
BIAS18:=((CLOSE-CLOSE的18日简单移动平均)/(CLOSE的18日简单移动平均))*(100)
VARF的3日[1日权重]移动平均
SS赋值:(1日前的BIAS18>=5) AND VARJ上穿VARE AND (AA>79)
DRAWTEXT((1日前的BIAS18>=5) AND VARJ上穿VARE AND
(AA>SS),H*1.02,'☆卖'),LINETHICK7,画绿色
VAR31:=ZIG(3,10)[REF(ZIG(3,10),2)]
{ZIG 有未来}
VAR32:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)[当满足条件VAR31时,在C和O之间画柱状线]
当满足条件VAR31时,在C和O之间画柱状线
当满足条件VAR31时,在H和L之间画柱状线
当满足条件VAR32时,在C和O之间画柱状线
当满足条件VAR32时,在C和O之间画柱状线
当满足条件VAR32时,在H和L之间画柱状线
{底位红色}