月周日虛擬成交量,這是通達信的,以前在論壇找的,

2011-02-20 11:20:00來源:本站整理瀏覽:132

月周日虛擬成交量,這是通達信的,以前在論壇找的,


WD:=IF(WEEKDAY<=5,WEEKDAY,1);{返回周幾}
WDM:=(WEEKDAY-1)*240+FROMOPEN;{計算本周的開盤分鐘數}
CD:=DAY;
TWD:=WEEKDAY;
CMD:=30;
YINZI:=7-(CD MOD 7)-TWD;
CMW:=((CMD+YINZI)-1)*5+TWD;
V1:=DAY;{日期}
V2:=WEEKDAY;
V3:=V2-(V1-INTPART(V1/7)*7); {取得當日和7以及周幾的關連因子}
{(V1+X) MOD 7 =V2 }
V4:=IF(V3>0,V3,7-ABS(V3));{全部換算成正數}
{算第一天是周幾}
V5:=1+V4;  {第一天周幾,已經調試正確}
V6:=IF(V5<=5,5-V5+1,0);{第一周的工作日,調試準確}
V7:=7-V5+2;{計算第二周開始的日期,調試準確,即第二周周一的日期}
V8:=IF(V1<V7,V1+V4,0);{第一周的當前日是周幾}
V9:=IF(V8<=5 AND V1<V7,V8-V5+1,0);{第一周的當前工作日數}
VA:=IF(V1>=V7,V1-V7,0);
{第二周開始截至目前的工作日+第一周的工作日,經過驗證,但是停牌無法處理};
VB:=IF(V1>=V7,INTPART(VA/7)*5 + VA-INTPART(VA/7)*7 + V6+1,V9);
VM1:=MONTH;
VM2:=IF(VM1=2,28,IF((VM1=1 OR VM1=3 OR VM1=5 OR VM1=7 OR VM1=8 OR VM1=10 OR VM1=12),31,30));
VM3:=VM2-V7;
VMB:=INTPART(VM3/7)*5 + VM3-INTPART(VM3/7)*7 + V6+1;{當月最大交易日}
MDM:=(VB-1)*240+FROMOPEN;{計算本月的開盤分鐘數}
當期:VOL/1000,VOLSTICK COLORWHITE ;
VDV:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN/1000,
IF(CURRBARSCOUNT=1 AND PERIOD=6,VOL/WDM*1200/1000,
IF(CURRBARSCOUNT=1 AND PERIOD=7,VOL/MDM*(240*VMB)/1000,VOL/1000))),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,VDV,VOL/1000,-1,-1),COLOR00C0C0;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=6,VDV,VOL/1000,-1,-1),COLOR00C0C0;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=7,VDV,VOL/1000,-1,-1),COLOR00C0C0;

環比:VDV*1000/REF(VOL,1),NODRAW;
DV:VOL/1000,VOLSTICK;


MV5: MA(VDV,5),COLORFFFFFF;
MV10:MA(VDV,10),COLORYELLOW;
MV20:MA(VDV,20),COLORGREEN;
MV30:MA(DV,30),COLORGREEN;
大主線:MA(VDV,60),COLORMAGENTA LINETHICK2;
HY大主線:MA(DV,120),COLORWHITE;
 

股票公式欄目導航

本類熱門

相關公式

初高中全集在线视频_9久9久女女热精品视频免费观看_人人澡人一摸人人添_yy6080理论亚洲一级理论人