|
马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
//合则思变
INPUT:N(30,5,240);
M:=BARSCOUNT(VOL);
VV:=IF(RANGE(STKTYPE,0,13),AMOUNT/100,CLOSE*VOL);
前N期:IF(M<=N,SUM(VV,M)/SUM(VOL,M),REF(SUM(VV,N)/SUM(VOL,N),IF(M<2*N,M-N,N-1))),LINETHICK;
后N期:SUM(VV,N)/SUM(VOL,N),LINETHICK;
XS:=(SYSPARAM(4)-SYSPARAM(5))/30;
STICKLINE(BARPOS=SYSPARAM(1)-5,前N期[SYSPARAM(1)],前N期[SYSPARAM(1)],120,0),colorwhite,LINETHICK2;
DRAWTEXT(BARPOS=SYSPARAM(1)-11,前N期[SYSPARAM(1)]-XS,'前N期成本'+NUMTOSTR(前N期[SYSPARAM(1)],2)),colorwhite;
IF M[SYSPARAM(1)]>N THEN STICKLINE(BARPOS=SYSPARAM(1)-5,后N期[SYSPARAM(1)],后N期[SYSPARAM(1)],120,0),color00FFFF,LINETHICK2;
IF M[SYSPARAM(1)]>N THEN DRAWTEXT(BARPOS=SYSPARAM(1)-11 AND M>N,后N期[SYSPARAM(1)]-XS,'后N期成本'+NUMTOSTR(后N期[SYSPARAM(1)],2)),COLOR00FFFF;
|
|