公式百宝箱精选通达信.docx
《公式百宝箱精选通达信.docx》由会员分享,可在线阅读,更多相关《公式百宝箱精选通达信.docx(12页珍藏版)》请在冰豆网上搜索。
![公式百宝箱精选通达信.docx](https://file1.bdocx.com/fileroot1/2023-7/7/b7147f89-44e7-41e5-ae4c-d61fda5c2486/b7147f89-44e7-41e5-ae4c-d61fda5c24861.gif)
公式百宝箱精选通达信
公式百宝箱精选(通达信)
1).
RSV:
=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:
=SMA(RSV,3,1);
D:
=SMA(K,3,1);
J:
=3*K-2*D;
XG:
=J<20;{KDJ的J值小于20}角度:
=atan(100*(J/ref(J,1)-1))*180/3.1416;{角度函数J>45选股}
角度j:
角度>20;{角度J>20度}角度:
atan((J/ref(J,1)-1)*100)*57.3;{公式中57.3,就是180/3.1416}J1:
=REF(J,1);
J>J1;{J值往上跑}2).
XG:
=J>REF(J,1)ANDREF(J,2)>REF(J,1);{KDJ的J值拐头向上}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3).
DIFF:
=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:
=EMA(DIFF,9);
T:
=BARSLAST(CROSS(DIFF,0));
XG:
DIFF>DEA;{DIF大于DEA}高位回调:
DIFF>=REF(DIFF,1)ANDDEA<0.1ANDDEA>=0ANDMACD<=0.05ANDMACD>=0ANDBARSLAST(MACD=HHV(MACD,10)ANDMACD>0ANDLLV(MACD,10)>=0)>10ANDLLV(MACD,BARSLAST(MACD=HHV(MACD,10)ANDMACD>0ANDLLV(MACD,10)>=0))>0,LINETHICK1;DD:
=MA(DIF,1);
DIF角度:
=ATAN((DD/REF(DD,1)-1)*100)*180/3.14159;
AA:
DIF>DEAANDDIF>0ANDDIF角度>50;{DIF角度>50}4).
XG:
=CROSS(HHV(CROSS(DIFF,DEA),T)>=1,0.5);{DIF大于DEA且DEA>0}DIF:
=(EMA(CLOSE,12)-EMA(CLOSE,26))/EMA(CLOSE,26)*100;
DEA:
=EMA(DIF,9);
DIF<0ANDDIF>-0.3
XG:
=DIF<0ANDDIF>-0.3;{30分钟和60分钟周期DIF在0和-0.3之间}5).
DIFF:
=(EMA(CLOSE,12)-EMA(CLOSE,26));
DEA:
=EMA(DIFF,9),COLORBLUE,LINETHICK0;
MACD:
=2*(DIFF-DEA);
拐点:
=ref(macd,2)>ref(macd,1)andref(macd,1)<macd;{MACD柱的拐点公式}
XG:
macd=ref(macd,1)andmacd>0{macd>0}6).
DIFF:
=(EMA(CLOSE,12)-EMA(CLOSE,26));
DEA:
=EMA(DIFF,9),COLORBLUE,LINETHICK0;
拐点:
=REF(DEA,2)>REF(DEA,1)ANDREF(DEA,1)<DEA;{DEA拐点公式}7).
MACD:
="MACD.MACD";
绿柱变短:
=MACD>REF(MACD,1)ANDMACD<0;{MACD绿柱变短公式}8).
DIF1:
=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA1:
=EMA(DIF1,9),LINETHICK1;
XG:
=CROSS(DIF1,DEA1)ANDDIF1>0.05;{DIF倾角大于5度}DIFF:
=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:
=EMA(DIFF,9);
DD:
=MA(DIFF,1);
DIFF角度:
=ATAN((DD/REF(DD,1)-1)*100)*180/3.14159;
AA:
DIFF>DEAANDDIFF>0ANDDIFF角度>25;{DIFF角度>25}
9).
XG4:
=REF("MACD.MACD",1)>0.2AND"MACD.MACD">REF("MACD.MACD",1)*1.3;{MACD红柱大于零轴0.2以上,且后量比前量大1.3倍的选股公式}另:
XG:
CROSS(MACD.DIF,MACD.DEA);{平滑异同平均的DIF上穿DEA}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10).
XG5:
=(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.1415926)>20;{5日均线倾角大于20度}11).
E:
=MA(C,20);
XG:
=ATAN((E/REF(E,1)-1)*100)*57.3>5;{20日均线角大于5度}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12).
XG:
=MA(C,10)>REF(MA(C,10),1)ANDMA(C,5)>MA(C,10);{10天均线拐头向上}13).
MA20:
=MA(C,20);
XG:
=MA20>REF(MA20,1);{20日均线拐头向上}14).
XG:
=MA(C,20)>ref(MA(C,20),1);{20天均线向上的股}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15).
MA5:
=CROSS(MA(CLOSE,5),MA(CLOSE,20));{5日均线上穿20日均线}
MA10:
=CROSS(MA(CLOSE,10),MA(CLOSE,20));{10日均线上穿20日均线}
选股:
=MA5ANDMA10;{5日均线、10日均线同时上穿20日均线,而10日均价线与20日均价线向上开口角度越陡,后势上涨潜力越大}16).
A:
=MA(C,5);
B:
=MA(C,20);
MA20:
=CROSS(A,B)ANDATAN((A/REF(A,1)-1)*100)*57.3>20;{5日均线上穿20日均线角度大于20度}17).
M5:
=MA(C,5);
M10:
=MA(C,10);
M20:
=MA(C,20);
XG:
=C>M5ANDCROSS(M10,M20){股价上穿5日均线,而10均线上穿20日均线公式}18).
A1:
=MA(CLOSE,5);
A2:
=MA(CLOSE,10);
A3:
=MA(CLOSE,30);
A4:
=MA(CLOSE,60);
A5:
=MA(CLOSE,120);
XG1:
=CAPITAL<10000000ANDC<20;
XG:
=XG1ANDCLOSE>A1ANDA1>A2ANDA2>A3ANDA3>A4ANDA4>A5ANDCLOSE>OPEN;{五线之上}多头排列:
MA(C,5)>MA(C,10)ANDMA(C,10)>MA(C,20)ANDMA(C,20)>MA(C,60)
ANDMA(C,60)>MA(C,120)ANDMA(C,120)>REF(MA(C,120),1)ANDMA(C,5)>REF(MA(C,5),1);{多头排列}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19).
XG:
=COUNT(OPEN<CLOSE,5)/5>=100/100;{5日内阳多阴,N值可调}20).
w1:
=ma(c,5);
w2:
=abs(c-w1)/w1<0.01;
XG:
=count(w1>ref(w1,1),5)=5andw2;{K线沿着5日均线往上爬}21).要求是量大、换手率达到3左右,涨幅>7个点。
xg:
v/capital*100>3and(c/ref(c,1)>1.07;22).
XG:
=cross(c,ma(c,30))andv>ref(v,1)*1.3;{放量1.3倍,股价突破30日线的选股指标}23).
a1:
cross(c,ma(c,10));
a2:
cross(ma(c,10),c);
drawtext(a1,low*0.98,↑),colorred;
drawtext(a2,h*1.02,↓),color00ffff;{股价突破10ma买入,跌破10ma卖出。
买入和卖出用箭头表示}24).
a1:
count(c<ma(c,30),2)=2;
XG:
=drawtext(a1,c,'卖出'),colorgreen;{连续2天收盘价跌破30日均线,就显示"卖出"信号}25).
卖出:
=c/ma(c,5)>1.15;{股价超过五日均价的10%以上,并给出卖出信号}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26).
CCI:
=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
XG:
=CCI<-200;{CCI指标的数值在一200附近}27).
RSV:
=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:
=SMA(RSV,3,1);
D:
=SMA(K,3,1);
J:
=3*K-2*D;
XG:
=J<0;{KDJ指标的J值在0以下,即负数}28).
BOLL:
=MA(CLOSE,20);
UPPER:
=BOLL+2*STD(CLOSE,20);
LOWER:
=BOLL-2*STD(CLOSE,20);
XG:
=CLOSE<LOWER;{股价在BOLL下轨或者以下}29).
MA1:
=MA(CLOSE,5);
XG:
=CLOSE<MA1/1.10;{股价远离5日平均线至少10%以上}30).
阳线买:
=CCI<-200ANDJ<0ANDCLOSE<LOWERANDCLOSE<MA1/1.1;{满足了上面4个条件,一般情况下股价就面临底部}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31).
XG8:
=CAPITAL<6000000ANDC<20;{股价小于20元,流通盘小于6亿}32).
去除ST:
=EXIST(C/REF(C,1)>1.055,60);
去除停牌:
=DYNAINFO(4)>0;33).
zz:
=(C-REF(C,1))/REF(C,1)*100;
涨幅:
=zz<5;34).
XG:
=XG8AND去除STAND去除停牌AND涨幅;35).
XG:
=FROMOPEN>5ANDFROMOPEN<30;{开盘后大于5分钟小于30分钟}
***************************************************************************************************************
36).
DRAWBAND(MA5,RGB(200,0,0),MA10,RGB(0,200,0));{红绿彩带}*************************************************************************************************************
37).kdj的J从上向下穿越O轴发出信号RSV:
=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:
=SMA(RSV,3,1),COLORWHITE;
D:
=SMA(K,3,1),COLORYELLOW;
J:
=3*K-2*D,COLORFF00FF;
xg:
cross(0,j);38).一阳上穿10,20,30日线,量能是前一天3倍。
xg:
cross(c,ma(c,10))andcross(c,ma(c,20))andcross(c,ma(c,30))andv>ref(v,1)*3;39).30日内到本日收盘价下跌20%的公式
xg:
hhv(c,30)/c>1.2;40).最近3天(包括昨天.前天)股价突破250日均线
XG:
=COUNT(C>MA(C,250),3)=3;41),跳空高开后,三天内没有回补缺口
ref(LOW,2)>REF(HIGH,3)andl>ref(LOW,2);42),历史高点到前一高点画线
POLYLINE(h>=hhv(c,0),h);43),60与120均线距离在n%内
XG:
ABS((MA(C,60)-MA(C,120))/MA(C,120))<N/100;44),意思是n天内出现过信号的,假设n=10,那么就是10天内出现信号(包括今天)
count(x,n)45),成交量是前5天中其他任何一天的10天均量线的3.5倍以上
w1:
=llv(ma(v,10),5);
XG:
v>w1*3.5;46).
ZT:
=CLOSE>REF(CLOSE,1)*1.095;{以涨停收盘}
XG:
EXIST(ZT,N);{N天存在以涨停收盘};47),30日线开始上翘
MA30:
MA(C,30);
(MA30>REF(MA30,1))AND(REF(MA30,1)<=REF(MA30,2));48),跳空高开后,三天内没有回补缺口
ref(LOW,2)>REF(HIGH,3)andl>ref(LOW,2);49).30日均线拐头向上
ma(c,30)>ref(ma(c,30),1);50).{3天之内曾出现过MACD金叉的公式}
COUNT(CROSS("MACD.DIF","MACD.DEA"),3)=1;{3天之内曾出现MA5金叉MA10过金叉的公式}
COUNT(CROSS(MA(C,5),MA(C,10)),3)=1;{3天之内曾出现成交量均线MA5金叉MA10过金叉的公式}
COUNT(CROSS(MA(VOL,5),MA(VOL,10)),3)=1;
51).
1){MACD上穿0,包括当天在内"三天内出现过KDJ金叉}
K:
="KDJ.K"
D:
="KDJ.D";
KD:
=COUNT(CROSS(K,D),3)>0;
ZRXG:
CROSS("MACD.MACD",0)ANDKD;
2){或改成当天DIFF上穿DEA,包括当天在内"三天内出现过KDJ金叉}
K:
="KDJ.K";
D:
="KDJ.D";
KD:
=COUNT(CROSS(K,D),3)>0;
DIFF:
=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:
=EMA(DIFF,9);
XG2:
=CROSS(DIFF,DEA);{DIFF上穿DEA}
ZRXG:
XG2ANDKD;
3){或改成:
3天之内曾出现过MACD金叉和KDJ金叉的公式}
XG8:
=COUNT(CROSS("MACD.DIF","MACD.DEA"),3)=1;{3天之内曾出现过MACD金叉}
ZRXG:
XG8ANDKD;52).市盈率:
=DYNAINFO(39)<20;{动态市盈率<20}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
一、放量、缩量(成交量函数为VOL)1、放量:
(1).今天成交量较昨天增加了1倍,表示如下:
VOL/REF(VOL,1)>2
(2).今天成交量较10个交易日平均成交量放大了1倍,表示如下:
a:
=ma(vol,10);
Vol/a>2
或者直接用如下公式表示:
vol/ma(vol,10)>2;(3).今日的5日均量较10个交易日平均成交量放大了1倍,表示如下:
a:
=ma(vol,10);
b:
=ma(vol,5);
b/a>2;(4).今日的成交量超过了整个流通盘的5%,表示如下:
vol/capital>0.05;其中capital代表流通盘。
(5).今天的成交量超过昨天成交量;在9:
35点钟开始预警,到10:
30分结束
早盘量满:
CROSS(VOL,REF(VOL,1))ANDFROMOPEN>5ANDFROMOPEN<60;(6)一阳上穿10,20,30日线,量能是前一天2倍,股价上涨:
。
xg:
cross(c,ma(c,10))andcross(c,ma(c,20))andcross(c,ma(c,30))andv>ref(v,1)*2andc>ref(c,1);(7),今天的量大于等于昨天量的2倍,股价上涨
xg:
v>ref(v,1)*2andc>ref(c,1);二.另附:
通达信指标颜色源码大全(2011-09-0523:
05:
47)转载▼标签:
杂谈
图标及常用的颜色代码如下,可根据自已的喜好,将指标公式换色:
1白色ColorFFFFFF或ColorWhite2红色ColorFF0000或COLORRED
3绿色Color00FF00或ColorGreen4蓝色Color0000FF或ColorBlue
5牡丹红ColorFF00FF6青色Color00FFFF
7黄色ColorFFFF00或ColorYellow
8黑色Color000000或ColorBlack
9海蓝Color70DB9310巧克力色Color5C3317
11蓝紫色Color9F5F9F12黄铜色ColorB5A642
13亮金色ColorD9D91914棕色ColorA67D3D
15青铜色Color8C7853162号青铜色ColorA67D3D
17士官服蓝色Color5F9F9F18冷铜色ColorD98719
19铜色ColorB8733320珊瑚红ColorFF7F00
21紫蓝色Color42426F22深棕Color5C4033
23深绿Color2F4F2F24深铜绿色Color4A766E
25深橄榄绿Color4F4F2F26深兰花色Color9932CD
27深紫色Color871F7828深石板蓝Color6B238E
29深铅灰色Color2F4F4F30深棕褐色Color97694F
32深绿松石色Color7093DB
33暗木色Color855E4234淡灰色Color545454
35土灰玫瑰红色Color54545436长石色ColorD19275
37火砖色Color8E232338森林绿Color238E23
39金色ColorCD7F3240鲜黄色ColorDBDB70
41灰色ColorC0C0C042铜绿色Color527F76
43青黄色Color93DB7044猎人绿Color215E21
45印度红Color4E2F2F46土黄色Color9F9F5F
47浅蓝色ColorC0D9D948浅灰色ColorA8A8A8
49浅钢蓝色Color8F8FBD59浅木色ColorE9C2A6
60石灰绿色Color32CD3261桔黄色ColorE47833
62褐红色Color8E236B63中海蓝色Color32CD99
64中蓝色Color3232CD65中森林绿Color6B8E23
66中鲜黄色ColorEAEAAE67中兰花色Color9370DB
68中海绿色Color426F4269中石板蓝色Color7F00FF
70中春绿色Color7FFF0071中绿松石色Color70DBDB
72中紫红色ColorDB709373中木色ColorA68064
74深藏青色Color2F2F4F75海军蓝Color23238E
76霓虹篮Color4D4DFF77霓虹粉红ColorFF6EC7
78新深藏青色Color00009C79新棕褐色ColorEBC79E
80暗金黄色ColorCFB53B81橙色ColorFF7F00
82橙红色ColorFF240083淡紫色ColorDB70DB
84浅绿色Color8FBC8F85粉红色ColorBC8F8F
86李子色ColorEAADEA87石英色ColorD9D9F3
88艳蓝色Color5959AB89鲑鱼色Color6F4242
90猩红色ColorBC171791海绿色Color238E68
92半甜巧克力色Color6B422693赭色Color8E6B23
94银色ColorE6E8FA95天蓝Color3299CC
96石板蓝Color007FFF97艳粉红色ColorFF1CAE
98春绿色Color00FF7F99钢蓝色Color236B8E
100亮天蓝色Color38B0DE101棕褐色ColorDB9370
102紫红色ColorD8BFD8103石板蓝色ColorADEAEA
104浓深棕色Color5C4033105淡浅灰色ColorCD