通达信预警买卖 分时主图
时间:=TIME=100000;
N:=BARSLAST(时间),COLOR808080;
常数:CONST(IF(N=0,C,REF(C,N))),COLOR004848,DOTLINE;
CS1:=CONST(IF(N,HHV(H,0),REF(HHV(H,0),N))),COLOR808080;
CS2:=CONST(IF(N,LLV(L,0),REF(LLV(L,0),N))),COLOR808080;
STICKLINE(时间=1,CS1,CS2,-1,0),COLOR808080;
MA30:=EMA(CLOSE,30);
强弱:EMA(CLOSE,900);
STICKLINE((MA30>强弱),MA30,强弱,0.01,0),COLOR0000FF;
STICKLINE((MA30<强弱),MA30,强弱,0.01,0),COLOR00FF00;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLORFFFFFF,DOTLINE;
支撑:L1+P1*0.5/8,COLORFFFFFF,DOTLINE;
现价:CLOSE,COLORWHITE,LINETHICK1;
STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,阻力,' 阻力'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=1,支撑,' 支撑'),COLORFFFFFF;
均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=4,均价,' 均价变色'),COLORFFFFFF,LINETHICK2;
DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'★B短买'),COLORRED;{吸}
DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★S卖出'),COLORRED;{抛};
DRAWICON(CROSS(MA30,强弱),H,9);
DRAWTEXT(ISLASTBAR,(支撑+阻力)/2,' - - - - - - - - -中间线'),COLORRED;
{分时均线}
W:=BARSLAST(DAY-REF(DAY,1))+1;
FSJX:SUM(CLOSE*VOL,W)/SUM(VOL,W),LINETHICK2,COLOR00FFFF;
IF(FSJX<REF(FSJX,1),FSJX,DRAWNULL),LINETHICK2,COLOR00A100;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,1,0,'1、诱多不买入;出货不买入;高位放量不买入。'),COLOR00BFBF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.58,0.99,0,'★ ★预警分时B预警买卖 ★ ★ '),COLORWHITE;
年:=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;
本月第几天:=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;
DRAWICON(CROSS(C,决策),C,1);
DA:=YEAR AND MONTH AND DAY;
AAA:=STRCAT(CON2STR(YEAR,0),'年');
AAB:=STRCAT(CON2STR(MONTH,0),'月');
AA33:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【 ',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日')))))));
AA:=STRCAT(STRCAT(STRCAT(AAA,AAB),STRCAT(AA33,AA4)),' 】');
SA:DRAWTEXT_FIX(DA,0.78,0.99,0,AA),COLORYELLOW;
- 上一篇公式:通达信兔子寻宝 精准提示介入 追涨 出局 主图 贴图
- 下一篇公式:通达信金桔副图源码