跑赢大盘(源码)
2011-03-07 10:32:00来源:本站整理浏览:172
跑赢大盘(源码)
参数设置:
n 1900 2500 2010
y 1 12 11
r 1 31 11
------------------------------------------
指定日期:=YEAR=N AND MONTH=Y AND DAY=R,NODRAW;
当日收盘:REF(CLOSE,BARSLAST(指定日期)),NODRAW;
当日大盘:REF(INDEXC,BARSLAST(指定日期)),NODRAW;
BL:=当日收盘/当日大盘;
相应价:INDEXC*BL,COLORRED,NODRAW;
强弱度:(CLOSE-相应价)/相应价*100,NODRAW;
STICKLINE(INDEXC>INDEXO,INDEXH*BL,INDEXL*BL,0,1),COLORLIMAGENTA;
STICKLINE(INDEXC>INDEXO,INDEXC*BL,INDEXO*BL,3,1),COLORLIMAGENTA;
STICKLINE(INDEXC<INDEXO,INDEXH*BL,INDEXL*BL,0,1),COLORLIGREEN;
STICKLINE(INDEXC<=INDEXO,INDEXC*BL,INDEXO*BL,3,1),COLORLIGREEN;