通达信分时突破后择机买入增加卖出提示(源码)
{优化后冲高做T卖出信号}
年:=YEAR,NODRAW;
月:=MONTH,NODRAW;
星期:=WEEKDAY,NODRAW;
日1:=DATETODAY(DATE);
上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);
自然日:=日1-DATETODAY(上市日)+1;
ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0;
本周第几天:BARSLAST(ZB)+1,NODRAW;
本月第几天:=BARSLAST(年*100+月!=REF(年*100+月,1))+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,本周第几天);
十周价:=(C+MA1+MA2+MA3+MA4+MA5+MA6+MA7+MA8+MA9)/10;
决策:REFDATE(十周价,DATE),COLORFF0080,LINETHICK2;
DRAWTEXT(ISLASTBAR,决策,' 决策线'),COLORFF0080;
{现价:DYNAINFO(7);}
均价线:SUM(AMOUNT,0)/SUM(VOL,0)/100 ,LINETHICK1,COLORYELLOW;
DRAWICON(CROSS(C,决策),C,1);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
TJ1:=LLV(MACD,4)>0 AND MACD<REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND REF(MACD,2)>REF(MACD,3);
现价偏离均价:=(C/均价线-1)*100;
DRAWICON(现价偏离均价>2.5 AND TJ1,C,2);