合则思变 飞狐公式
//合则思变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期,前N期,120,0),colorwhite,LINETHICK2;
DRAWTEXT(BARPOS=SYSPARAM(1)-11,前N期-XS,'前N期成本'+NUMTOSTR(前N期,2)),colorwhite;
IF M>N THEN STICKLINE(BARPOS=SYSPARAM(1)-5,后N期,后N期,120,0),color00FFFF,LINETHICK2;
IF M>N THEN DRAWTEXT(BARPOS=SYSPARAM(1)-11 AND M>N,后N期-XS,'后N期成本'+NUMTOSTR(后N期,2)),COLOR00FFFF;
看完这帖子以后,我立即动手回复,写的实在不错。谢谢楼主
谢谢楼主的精彩讲解,大受启发了,希望能常看到你的推荐。 学习了,,,,,,,,,,,,,,,, 是主图还是副图的,也没有实图! 谢谢分享学习了 :)学习一下啦:) 很受启发,谢谢了 适用大智慧 还是通达信
页:
[1]