大智慧45度角异动+明日支撑+明日压力线指标源码[大智慧公式]
[code]{45度异动}
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>1 and eMA(x1,13)>ref(eMA(x1,8),1),10),
eMA8,'∠45上升'),coloryelLOW;
ah:HHVall(h);al:llvall(l);
ahl:=ah-al;
a23:al+ahl*0.236,COLORYELLOW,POINTDOT;
a38:al+ahl*0.382,COLOREE00EE,POINTDOT;
a50:al+ahl*0.50,COLORYELLOW,POINTDOT;
a61:al+ahl*0.618,COLOREE00EE,POINTDOT;
a76:al+ahl*0.764,COLORYELLOW,POINTDOT;
{标注数字}y:=999;
DRAWTEXTREL(500,0,'100%'+ah),COLOREE00EE;
DRAWTEXTREL(500,y*0.236,'76.4%'+a76),COLORYELLOW;
DRAWTEXTREL(500,y*0.382,'61.8%'+a61),COLOREE00EE;
DRAWTEXTREL(500,y*0.50,'50%'+a50),COLORYELLOW;
DRAWTEXTREL(500,y*0.618,'38.2%'+a38),COLOREE00EE;
DRAWTEXTREL(500,y*0.764,'23.6%'+a23),COLORYELLOW; {内容来至程序化交易网 CXH99.COM}
DRAWTEXTREL(500,y-30,'最低'+al),COLOREE00EE;
DRAWGBK((CLOSE > 0),STRIP(RGB(4,1,28),RGB(4,1,35),0));
varl13:=("MAcd.diff#WEEK"(26,12,9));
varl14:=("MAcd.dea#WEEK"(26,12,9));
VL:=ref(LOW,1); VH:=ref(H,1);
CXH:=STRTONUM(STRRIGHT(DATESTR(CURRENTDATE),1));
WARNING('http://www.cxh99.com',CURRENTTIME>180000 and (CXH=1 OR CXH=6));
Var1:=SMA(ABS(H-Vh),13,1)/SMA(MAX(H-Vh,0),13,1)*100;
Var2:=SMA(ABS(L-VL),13,1)/SMA(MAX(L-VL,0),13,1)*100;
Var3:=MA(Var1,13);
Var4:=MA(Var2,13);
Var5:=LLV(L,34);
Var6:=HHV(H,34);
Var7:=EMA(IF(H>=Var6,Var3,0),3);
Var8:=EMA(IF(L<=Var5,Var4,0),3);
var9:=(SMA(SMA((((CLOSE - LLV(LOW,54)) / (HHV(HIGH,54) - LLV(LOW,54))) * 100),7,1),5,1));
var10:=((SMA(((CLOSE - LLV(LOW,54)) / (HHV(HIGH,54) - LLV(LOW,54)) * 100),7,1)) * 16.18) - (var9* 10.9);
Var11:=FILTER(IF(var10<=var9 AND Var8>ref(Var8,1),Var8*8,0),55);
Var21:=LLV(LOW,60);
Var31:=HHV(HIGH,60);
Var41:=EMA((CLOSE-Var21)/(Var31-Var21)*100,13);
Var51:=EMA(0.667*ref(Var41,1)+0.333*Var41,21);
varl2:=FILTER(CROSS(Var51,Var41) AND Var41>84,13);
持股线:MA(C,26),LINETHICK3,coloryelLOW;
趋势线:MA(CLOSE,13),LINETHICK5,colorred;
qjj:FILTER((CROSS(varl13,varl14) and varl14<0 and CROSS(c,持股线)),90),LINETHICK0;
DD:=FINANCE2(35);
SS:=FINANCE2(37);
GG:=FINANCE2(3);
TH:=DYNAINFO(39);
DRAWTEXTREL(10,720,'总股本:'+NUMTOSTRn(DD,0)+'万股' +' 流通A股:'+NUMTOSTRn(SS,0)+'万股'+'市盈率:'+NUMTOSTRn(TH,2)+' 倍'+'每股收益:'+NUMTOSTRn(GG,3)+' 元'),ColorFFFF00;
DRAWTEXT(var11,C*0.98,'㊣'),LINETHICK4,ColorFFFF00;
DRAWICON(qjj,C*1.09,1);
DRAWTEXT(qjj,l*0.78,'霸占大牛股'),COLOR00FFFF;
DRAWTEXT(varl2,C*1.04,'逃跑'),Colorgreen;
获利比例:=(WINNER(C)*1000)/10;
平均成本:=(COST(50)*100)/100;
穿透力:=(WINNER(C)-WINNER(ref(C,1)))/v*capital;
90%成本:=FLOOR(COST(50-90/2)*100)/100;
~:=CEILING(COST(50+90/2)*100)/100;
90集中度:=INTPART((~-90%成本)/(~+90%成本)*1000)/10;
70%成本:=FLOOR(COST(50-70/2)*100)/100;
~~:=CEILING(COST(50+70/2)*100)/100;
70集中度:=INTPART((~~-70%成本)/(~~+70%成本)*1000)/10;
DRAWTEXTABS(0,12,'获利比例:'+STR(获利比例)),COLOR44bbff;
DRAWTEXTABS(0,24,'平均成本:'+STR(平均成本)),COLOR44bbff;
DRAWTEXTABS(0,36,' 穿透力:'+STR(穿透力)),COLOR44bbff;
DRAWTEXTABS(0,48,'90%成本:'+STR(90%成本)+'-'+STR(~)),COLOR44bbff;
DRAWTEXTABS(0,60,'90集中度:'+STR(90集中度)),COLOR44bbff;
DRAWTEXTABS(0,72,'70%成本:'+STR(70%成本)+'-'+STR(~~)),COLOR44bbff;
DRAWTEXTABS(0,84,'70集中度:'+STR(70集中度)),COLOR44bbff;
gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);
明日阻力:=l+(gj-l)+(c-l);
明日支撑:=l+(c-gj);
今日阻力:=ref(明日阻力 , 1);
今日支撑:=ref(明日支撑 , 1);
STICKLINE(DISPSTATUS=2and c>=今日阻力,今日阻力,今日阻力,20,0),Color0000FF;
STICKLINE(DISPSTATUS=2and c<今日阻力,今日阻力,今日阻力,20,0),Color00FF00;
STICKLINE(DISPSTATUS=2and c>=今日支撑,今日支撑,今日支撑,20,0),ColorFF00FF;
STICKLINE(DISPSTATUS=2and c<今日支撑,今日支撑,今日支撑,20,0),ColorFF9900; {本文来至程序化交易网 cxh99.com}
DRAWTEXTREL(770,5,'今日支撑:'+NUMTOSTRN(今日支撑 ,2 )),Colorred;
DRAWTEXTREL(630,5,'今日阻力:'+NUMTOSTRN(今日阻力 ,2 )),ColorGREEN;
DRAWTEXTREL(1,800,'所属板块:'+BKNAME),ColorAFFF00;
DRAWTEXTREL(1,850,'每股收益:'+NUMTOSTRN(FINANCE2(3),3)+'元'+' 市盈率:'+NUMTOSTRN(DYNAINFO(39),2)+'元'+' 市净率:'+NUMTOSTRN((CLOSE / FINANCE2(4)),2)+'元'+' 净资产:'+NUMTOSTRN(FINANCE2(4),2)+'元'),Color00C0FF;
[/code]
[attach]5837[/attach]
页:
[1]