您现在的位置:好股网 >> 股票公式 >> 大智慧L2公式 >> 一键转帖:买卖指标 源码 说明

买卖指标 源码 说明


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2012-10-03 09:00:00
公式简介:

(先设置参数:N 缺省45最小5最大100步长1)
公式源码如下:
EMA250:=MA(C,250);
EMA6:=MA(C,6);
EMA18:=MA(C,18);
EMA55:=MA(C,55);
EMA144:=MA(C,144);
EMA288:=MA(C,288);
中线【买入】:=COUNT(CLOSE<EMA18,5)=4 AND
CLOSE/EMA18>1.004 AND CROSS(CLOSE,EMA18) AND EMA18>=REF(EMA18,1);
VL:=REF(LOW,1);
VAR12:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100;
VAR14:=MA(VAR12,13);
VAR15:=LLV(LOW,34);
VAR18:=EMA(IF(LOW<=VAR15,VAR14,0),3);
VAR110:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1);
VAR111:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR110*10.9;
VAR21:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR22:=SMA(VAR21,3,1);
VAR23:=SMA(VAR22,3,1);
VAR24:=SMA(VAR23,3,1);
VAR25:=CROSS(VAR23,VAR24) AND VAR23<20;
买:IF(FILTER(VAR25,10)=1 ,45,11),COLOR5454FF,LINETHICK1;
DRAWTEXT(FILTER(VAR25,10)=1,46,'买'),COLORred,ALIGN2;
VAR29:=CROSS(VAR24,VAR23) AND VAR23>80;
卖:IF(FILTER(VAR29,5)=1,50,89),COLOR008360,LINETHICK1;
DRAWTEXT(FILTER(VAR29,5)=1,50,'卖'),COLORgreen,ALIGN2;

N:=10;
VarA6:=(2*CLOSE+HIGH+LOW)/4;
VarA8:=LLV(LOW,34);
VarAB:=HHV(HIGH,34);
VarAC:=EMA((VarA6-VarA8)/(VarAB-VarA8)*100,13);
VarAD:=EMA(0.667*REF(VarAC,1)+0.333*VarAC,2);
VarA11:=EMA(VarAD,N);
DRAWTEXTABS(880,-12,ifs(VarAd>VarA11 AND VarAC>VarAD,'[建议持有]',' ')),COLORred,LINETHICK2;
DRAWTEXTABS(880,-12,ifs(VarAd>VarA11 AND VarAC>VarAD,' ','[建议观望]')),COLORGREEN,LINETHICK2;

Bar1:=REF(LOW,1);
Bar2:=SMA(ABS(LOW-Bar1),13,1)/SMA(MAX(LOW-Bar1,0),13,1)*4;
Bar3:=EMA(Bar2,13);
Bar4:=LLV(LOW,34);
Bar5:=EMA(IF(LOW<=Bar4,Bar3,0),3);
Bar6:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
Bar7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
Bar8:=Bar6<REF(Bar7,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
STICKLINE(Bar8 AND COUNT(Bar8,30)=1,10,66,3,0),COLORff00ff;
DRAWTEXT(Bar8 AND COUNT(Bar8,30)=1,65,'主力进场'),linethick1,COLORff00ff,ALIGN2;

rE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
r12:=(HIGH+LOW+CLOSE)/3;
r13:=(r12-MA(r12,14))/(0.015*AVEDEV(r12,14));
r14:=(r12-MA(r12,70))/(0.015*AVEDEV(r12,70));
r15:=IF(r13>=150 AND r13<200 AND r14>=150 AND r14<200,10,0);
r16:=IF(r13<=-150 AND r13>-200 AND r14<=-150 AND r14>-200,-10,r15);
r17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
r18:=100-ABS(r17);
r19:=IF(r18<90,r18,100);
r1A:=IF(rE>0,rE,0);
r1B:=IF(r14>=200 AND r13>=150,15,IF(r14<=-200 AND r13<=-150,-15,r16))+60;
r1C:=r1A>48 AND r1B>60 AND r19<100;
DRAWTEXT(r1C AND COUNT(r1C,25)=1,38,'主力出货'),COLORffcc66,ALIGN2;
STICKLINE(r1C AND COUNT(r1C,25)=1,90,39,3,0),linethick1,colorffcc66;

Var1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
Var2:=SMA(Var1,3,1);
Var3:=SMA(Var2,3,1);
Var4:=SMA(Var3,3,1);
波: Var3,colorwhite,LINETHICK0;
段: Var4,COLORYELLOW,LINETHICK0;
Var6:=CROSS(Var3,Var4) AND Var3<20;
Var7:=CROSS(Var4,Var3) AND Var3>80;
趋势:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK0,colorwhite;
Var8:=CROSS(Var2,Var3) AND Var3>80 AND Var3>Var4;
Var9:=CROSS(趋势,Var2) AND 趋势<20 AND 趋势<段;
STICKLINE(Var8,68,90,10,0),COLOR008360,LINETHICK1;
DRAWTEXT(FILTER(Var8,52)=1,68,'准备'),LINETHICK1,color00aaff,ALIGN2;
STICKLINE(Var9,28,10,10,0),Color000080,LINETHICK1;
DRAWTEXT(FILTER(Var9,48)=1,28,'准备'),LINETHICK1,color00aaff,ALIGN2;

P:=EMA(-100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)),3);
生命线:P+100,PRECIS0,LINETHICK0;
PARTLINE(生命线,(生命线>REF(生命线,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),LINETHICK1,LAYER1;
FILLRGN(生命线,90,生命线>90,RGB(200,0,80)),LAYER4;
FILLRGN(生命线,10,生命线<10,RGB(100,200,0)),LAYER4;

{比例}
主单买:=bigorder(1,2);
主单卖:=bigorder(2,2);
HS:=vol/capital;
DD:= 主单买-主单卖;
DT:=HS*DD*100;
主力持仓:"WDCDCC.超大持仓"+"WDDHCC.大户持仓",LINETHICK0,COLORFFFFFF;
流入:=主单买*AMOUNT/10000;
流出:=主单卖*AMOUNT/10000;
净额:流入-流出,linethick0,COLORFFB3FF;
买量:=主单买*VOL*50;
卖量:=主单卖*VOL*50;
净买比:(主单买-主单卖)*100,LINETHICK0,PRECIS1,COLOR00FFFF;
增量:((买量-卖量)/CAPITAL)*100,LINETHICK0,PRECIS3,COLOR1199FF;

STICKLINE(增量>0,主力持仓,主力持仓+增量,7,0),Color000033;
STICKLINE(增量>0,主力持仓,主力持仓+增量,6,0),Color000066;
STICKLINE(增量>0,主力持仓,主力持仓+增量,5,0),Color000088;
STICKLINE(增量>0,主力持仓,主力持仓+增量,4,0),Color0000BB;
STICKLINE(增量>0,主力持仓,主力持仓+增量,2.5,0),Color0000EE;
STICKLINE(增量>0,主力持仓,主力持仓+增量,1,0),Color0033FF;

STICKLINE(增量<0,主力持仓+增量,主力持仓,7,0),Color003300;
STICKLINE(增量<0,主力持仓+增量,主力持仓,6,0),Color006600;
STICKLINE(增量<0,主力持仓+增量,主力持仓,5,0),Color008800;
STICKLINE(增量<0,主力持仓+增量,主力持仓,4,0),Color00BB00;
STICKLINE(增量<0,主力持仓+增量,主力持仓,2.5,0),Color00EE00;
STICKLINE(增量<0,主力持仓+增量,主力持仓,1,0),Color00FF00;

P1:=-6;
BIAS1W :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2W :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3W :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
MM:=(BIAS1W+2*BIAS2W+3*BIAS3W)/6;
DRAWTEXT(CROSS((MA(MM,3)),(EMA((MA(MM,3)),2))) AND COUNT((EMA((MA(MM,3)),2))<P1,2)>1,10,'·'),COLORRED,LINETHICK3;
STICKLINE(((MA(MM,3))<-9),0,11,2,0 ),COLORCC0033;
 


 



[url=http://www.goodgupiao.com/gupiaogongshi/22905.html][B]买卖指标 源码 说明[/B][/url]