有时间整理一下发出来。未必L2模糊逻辑未来一起上抓到耗子就是好猫。
交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
日期差:=DATEDIFF(DATE,CURRENTDATE);
预测量:IF(BARSTATUS=2 and 日期差=0,VOL/交易分钟数*240,VOL),COLOR00FFFF,LINETHICK0;
{预测量2:IF(BARSTATUS=2,VOL*240/OPENMINUTES(CURRENTTIME),VOL),COLOR00FF00,LINETHICK0;}
{STICKLINE(BARSTATUS=2,vol,预测量,8,0),COLOR00FFFF,LINEDOT;}
STICKLINE(VOL>0 AND C>O,VOL,0,8,1),COLOR1472FF;
STICKLINE(VOL>0 AND C<O,VOL,0,8,1),COLOR147214;
STICKLINE(VOL>0 AND C=O,VOL,0,8,1),colorwhite;
总盘:FINANCE( 1)/10000,LINETHICK0;
发行价:FINANCE(51)LINETHICK0;
动态市盈率:DYNAINFO(39),colorgreen,LINETHICK0;
每股收益:FINANCE(33),COLORCYAN,LINETHICK0;
YE:=(HIGH+LOW+CLOSE)/3;
YE1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
YE2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-YE);
YE3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
YE4:=IF(HIGH=LOW,1,YE-MIN(CLOSE,OPEN));
YE5:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
YE6:=SUM((YE1*YE5),1);//散户卖出//
YE7:=SUM((YE2*YE5),1);//主力卖出//
YE8:=SUM((YE3*YE5),1);//散户买入//
YE9:=SUM((YE4*YE5),1);//主力买入//
YEC6:=SUM((YE1*YE5),1);//散户卖出//
YEC7:=SUM((YE2*YE5),1);//主力卖出//
YEC8:=SUM((YE3*YE5),1);//散户买入//
YEC9:=SUM((YE4*YE5),1);//主力买入//
STICKLINE(YEC9+YEC8,YEC9+YEC8,(YEC9+YEC8),8,0),colormagenta,LINETHICK1;
STICKLINE(YEC7+YEC6,YEC7+YEC6,(YEC7+YEC6),8,0),colorgreen,LINETHICK1;
STICKLINE((YEC9+YEC8)>(YEC7+YEC6),(YEC7+YEC6),(YEC9+YEC8),8,0),colormagenta,LINETHICK1;
STICKLINE((YEC9+YEC8)<(YEC7+YEC6),(YEC7+YEC6),(YEC9+YEC8),8,0),colorgreen,LINETHICK1;
STICKLINE((YE9-ye7)>0,0,(YE9-ye7),5,0),colorred;
STICKLINE((YE9-YE7)<0,0,-(YE9-YE7),5,0),color5900;
STICKLINE((YE8-YE6)<0,0,-(YE8-YE6),2.5,0),COLORFFA800;
STICKLINE((YE8-YE6)>0,0,(YE8-YE6),2,0),colorbrown;
{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
总卖比:=(YEc7+YEc6)/(YEc9+YEc8+YEc7+YEc6);
STICKLINE((yec9+yec8)>0,yec9+yec8,yec9+yec8,7.3,0),COLORred,linethick1;{画日总买标志}
STICKLINE(yec7+yec6,yec7+yec6,yec7+yec6,7.3,0),COLORgreen,linethick1;{画日总卖标志}
STICKLINE(ISLASTBAR and (YEc9+YEc8),0,YEc9+YEc8,8,0),SHIFT2,color1472ff;{画单日单独总买}
STICKLINE(ISLASTBAR and YEc9>0,0,YEc9,5,0),SHIFT2,colorred;{画日主力买}
STICKLINE(ISLASTBAR and YEc8>0,0,YEc8,3,0),SHIFT2,COLORbrown;{画日散户买}
STICKLINE(ISLASTBAR and YEc7+YEc6,0,(YEc7+YEc6),8,0),SHIFT3,color8900;{画日单独总卖}
STICKLINE(ISLASTBAR and YEc7>0,0,YEc7,5,0),SHIFT3,colorgreen;{画日主力卖出}
STICKLINE(ISLASTBAR and YEc6,0,YEc6,3,0),SHIFT3,colorffa800;{画日散户卖出}
总买比:=(YEc9+YEc8)/(YEc9+YEc8+YEc7+YEc6);
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and 总买比>0.5,YEc9+YEc8,总买比,2),Colorred,SHIFT1,linethick1,ALIGN4;
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and 总买比<0.5,YEc9+YEc8,总买比,2),Colorgreen,SHIFT1,linethick1,ALIGN4;
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and 总卖比>0.5,YEc7+YEc6,总卖比,2),Colorgreen,SHIFT2,linethick1,ALIGN4;
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and 总卖比<0.5,YEc7+YEc6,总卖比,2),Color8900,SHIFT2,linethick1,ALIGN4;
{3日}
YEe6:=SUM((ye1*ye5),3);{散户卖出}
YEe7:=SUM((ye2*ye5),3);{主力卖出}
YEe8:=SUM((ye3*ye5),3);{散户买入}
YEe9:=SUM((ye4*ye5),3);{主力买入}
STICKLINE(ISLASTBAR and (YEe9+YeE8)>0,0,(YEe9+YeE8)*0.23,8,0),SHIFT4,colorred;{3日总买}
STICKLINE(ISLASTBAR and (YEe7+YEe6)>0,0,(YEe7+YeE6)*0.23,6,0),SHIFT4,color8900;{3日总卖}
STICKLINE(ISLASTBAR and YEe9>0,0,YEe9*0.23,4,0),SHIFT4,colorbrown;{3日总买}
STICKLINE(ISLASTBAR and YEe7>0,0,YEe7*0.23,2,0),SHIFT4,colorffa800;{3日总卖}
DRAWTEXT(ISLASTBAR and YEe7>0,YEe7*2,'3'),SHIFT4,COLORwhite,ALIGN5;
买卖比3:=(yEe9+yee8)/(yEe7+yee6);
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and (买卖比3)>1,买卖比3,买卖比3,2),Colorred,SHIFT4,linethick1,ALIGN4;
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and (买卖比3)<1,买卖比3,买卖比3,2),ColorGREEN,SHIFT4,linethick1,ALIGN4;
主力买卖比3:=(yee9)/(yee7);
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and 主力买卖比3>1,主力买卖比3,主力买卖比3,2),Colorred,SHIFT4,linethick1,ALIGN3;
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and 主力买卖比3<1,主力买卖比3,主力买卖比3,2),ColorGREEN,SHIFT4,linethick1,ALIGN3;
{5日}
yEc6:=SUM((ye1*ye5),5);{散户卖出}
YEc7:=SUM((ye2*ye5),5);{主力卖出}
YEc8:=SUM((ye3*ye5),5);{散户买入}
YEc9:=SUM((ye4*ye5),5);{主力买入}
总成2:=SUM(vol,5);{主力买入}
STICKLINE(ISLASTBAR and (YEc9+YEc8)>0,0,(YEc9+YEc8)*0.28,8,0),SHIFT5,colorred;{5日总买}
STICKLINE(ISLASTBAR and (YEc7+YEc6)>0,0,(YEc7+YEc6)*0.28,6,0),SHIFT5,color8900;{5日总卖}
STICKLINE(ISLASTBAR and YEc9>0,0,YEc9*0.28,4,0),SHIFT5,colorbrown;{5日主买}
STICKLINE(ISLASTBAR and YEc7>0,0,YEc7*0.28,2,0),SHIFT5,colorffa800;{5日主卖}
DRAWTEXT(ISLASTBAR and YEe7>0,YEe7*2,'5'),SHIFT5,COLORwhite,ALIGN5;
买卖比5:=(yec9+yec8)/(yec7+yec6);
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and (买卖比5)>1,买卖比5,买卖比5,2),Colorred,SHIFT5,linethick1,ALIGN4;
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and (买卖比5)<1,买卖比5,买卖比5,2),ColorGREEN,SHIFT5,linethick1,ALIGN4;
主力买卖比5:=(yec9)/(yec7);
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and 主力买卖比5>1,主力买卖比5,主力买卖比5,2),Colorred,SHIFT5,linethick1,ALIGN3;
DRAWNUMBER(BARSCOUNT(c)=SYSPARAM(1) and 主力买卖比5<1,主力买卖比5,主力买卖比5,2),ColorGREEN,SHIFT5,linethick1,ALIGN3; |