{分时乾坤决策线}
星期:=WEEKDAY;
日1:=DATETODAY(DATE);
上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);
自然日:=日1-DATETODAY(上市日)+1;
ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1)OR TOTALBARSCOUNT-CURRBARSCOUNT=0;
本周第几天:=BARSLAST(ZB)+1;
MA1:=REF(C,本周第几天);
MA2:=REF(MA1,本周第几天);
MA3:=REF(MA2,本周第几天);
MA4:=REF(MA3,本周第几天);
MA5:=REF(MA4,本周第几天);
MA6:=REF(MA5,本周第几天);
MA7:=REF(MA6,本周第几天);
MA8:=REF(MA7,本周第几天);
MA9:=REF(MA8,本周第几天);
MA10:=REF(MA9,本周第几天);
MA11:=REF(MA10,本周第几天);
MA12:=REF(MA11,本周第几天);
十三周价:=(C+MA1+MA2+MA3+MA4+MA5+MA6+MA7+MA8+MA9+MA10+MA11+MA12)/13;
决策:REFDATE(十三周价,DATE),POINTDOT,COLORMAGENTA;
DRAWICON(CROSS(C,决策),C,1);