用你自己成本的止盈止损的无需屏蔽的副图 源码
指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2012-07-01 08:25:00
公式简介:
再发一个用你自己成本的止盈止损的公式无需屏蔽的副图:经过大家再三要求.第一个自己成本的止盈止损虽然好用就是用起来很不方便.我进一步研究,可以用副图就不用屏蔽.大大的提高实用价值
我自己也十分高兴连忙发给大家.怕耽误大家使用:-------------------------------公式中---------------sh600745【可变】-----------------------------
CD:=STKINDI('sh600745','05引.CL');
OD:=STKINDI('sh600745','05引.OL');
HD:=STKINDI('sh600745','05引.HL');
LD:=STKINDI('sh600745','05引.LL');
只要输入你的自选股代码就可以了.其他不必再解释.和前一个一样.那个【A.B.C盘后须知】不变. 这个【D盘后须知】专门为你按你的买入价进行止盈止损控制一定会帮助你把好买卖关.你还可以一式;两用.三用因为你可能同时买入一个以上的股票当然公式名字要用排号区别开.
------------------------引用公式不变.现在还只能用于大智慧.-----------------------------------------------------
{D盘后须知}
INPUT:MR(11.21,0,300),N(5,0,20);
DRAWGBKlast(c>0,strip(RGB(0,0,100),RGB(0,40,0),0));
CD:=STKINDI('sh600745','05引.CL');
OD:=STKINDI('sh600745','05引.OL');
HD:=STKINDI('sh600745','05引.HL');
LD:=STKINDI('sh600745','05引.LL');
{K线}
STICKLINE(cd>=od,cd,HD,0,1 ),colorred;
STICKLINE(cd>=od,od,LD,0,1),colorred;
STICKLINE(od>cd,cd,LD,0,0),colorgreen;
STICKLINE(od>cd,od,Hd,0,0),colorgreen;
STICKLINE(od>=cd ,cd ,od,8,0 ),COLOR006600;
STICKLINE(od>=cd ,cd ,od,7,0 ),COLOR008800;
STICKLINE(od>=cd ,cd ,od,6,0 ),COLOR00AA00;
STICKLINE(od>=cd ,cd ,od,5,0 ),COLOR00BB00;
STICKLINE(od>=cd ,cd ,od,4,0 ),COLOR00CC00;
STICKLINE(od>=cd ,cd ,od,3,0 ),COLOR00DD00;
STICKLINE(od>=cd ,cd ,od,2,0 ),COLOR00EE00;
STICKLINE(od>=cd ,cd ,od,1,0 ),COLOR00FF00;
STICKLINE(od>=cd ,cd ,od,0,0 ),COLOR00FF00;
STICKLINE(cd>od,cd,od,8,0) ,COLOR000066;
STICKLINE(cd>od,cd,od,7,0) ,COLOR000088;
STICKLINE(cd>od,cd,od,6,0) ,COLOR0000AA;
STICKLINE(cd>od,cd,od,5,0) ,COLOR0000BB;
STICKLINE(cd>od,cd,od,4,0) ,COLOR0000CC;
STICKLINE(cd>od,cd,od,3,0) ,COLOR0000DD;
STICKLINE(cd>od,cd,od,2,0) ,COLOR0000EE;
STICKLINE(cd>od,cd,od,1,0) ,COLOR0000FF;
STICKLINE(cd>od,cd,od,0,0) ,COLOR0000FF;
MA5:MA(CD,5);
MA13:MA(CD,13);
MA21:MA(CD,21);
MA34:MA(CD,34);
MA55:MA(CD,55),POINTDOT,COLORFF9900,LINETHICK3;;
止盈5:=MR*1.05;
止损5:=MR*0.95;
W:=BARSLAST(DISPSTATUS=1);
P:=BACKSET(DISPSTATUS=2,W/2+1);
K:=BARSLAST(CROSS(P,0.5));
FILLRGN(止盈5 ,MR ,W>K ,RGB(150,150,150)),LAYER7;
FILLRGN(止损5 ,MR ,W>K ,RGB(100,0,80)),LAYER7;
DRAWTEXT(BARSTATUS=2,MR*1.02,'买入'+NUMTOSTRN(MR,2)+''),ALIGN1,COLOR00FFFF,LINETHICK2,LAYER0;
{压力支撑}
AG1:=ref(HD,N)=hhv(HD,2*N+1);
BB1:=filter(AG1,N);
CB1:=backset(BB1,N+1);
DB1:=filter(CB1,n);{高点}
AG2:=ref(LD,N)=llv(LD,2*N+1);
BB2:=filter(AG2,N);
CB2:=backset(BB2,N+1);
DB2:=filter(CB2,N);{低点}
E1:=(ref(llv(LD,2*N),1)+ref(hhv(HD,2*N),1))/2; E2:=(HD+l)/2;{高低点出现在同一K线上时可作取舍}
H1:=(DB1 AND not(DB2 AND E1>=E2)) OR barstatus=2 OR barscount(CD)=1;
L1:=(DB2 AND not(DB1 AND E1<E2)); H2:=DB1 AND not(DB2 AND E1>=E2);
X1:=ref(barslast(H1),1)+1; F1:=backset(H1 AND count(L1,X1)>0,llvbars
(if(L1,LD,10000),X1));
G1:=F1>ref(F1,1); I1:=backset(G1,2); LDB:=I1>ref(I1,1);{过滤后低点}
L2:=LDB OR barstatus=2 OR barscount(CD)=1;
X2:=ref(barslast(L2),1)+1; F2:=backset(L2 AND count(H2,X2)>0,hhvbars
(if(H2,HD,0),X2));
G2:=F2>ref(F2,1); I2:=backset(G2,2); HDB:=I2>ref(I2,1);{过滤后高点}
R1:=backset(barstatus=2,barslast(HDB)+1);
S1:=R1>ref(R1,1); {前一高}
T1:=backset(barstatus=2,barslast(LDB)+1);
U1:=T1>ref(T1,1); {前一低}
R2:=backset(S1,ref(barslast(HDB),1)+2);
S2:=R2>ref(R2,1); {前二高}
T2:=backset(U1,ref(barslast(LDB),1)+2);
U2:=T2>ref(T2,1); {前二低}
短期压力:drawline(S2,HD,S1,HD,1),Color0000ff;
短期支撑:drawline(U2,LD,U1,LD,1),Colorgreen;
[url=http://www.goodgupiao.com/gupiaogongshi/21324.html][B]用你自己成本的止盈止损的无需屏蔽的副图 源码[/B][/url]