马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 静静的远山 于 2016-3-20 13:49 编辑
备注: 1. 因为分时图无法直接使用日线数据,建立日线数据公式SS,就是为了分时主图的引用。 2. 该公式在开盘30分钟9:30-10:00,植入前三日K线,大大方便那些喜欢开盘抓涨停板的投资者们的盯盘。比如上图000829,在开盘30分钟内,分时线突破前日大阴线时,可以及时介入,而无需频繁切换K线。
第一步:建立一个引用公式(位置放在主、副图都可),名称为:SS O1:REF(O,1);
C1:REF(C,1);
H1:REF(H,1);
L1:REF(L,1);
O2:REF(O,2);
C2:REF(C,2);
H2:REF(H,2);
L2:REF(L,2);
O3:REF(O,3);
C3:REF(C,3);
H3:REF(H,3);
L3:REF(L,3);
第二步:建立分时主图公式,名称:3日K线植入分时主图 O1:="SS.O1#DAY";
C1:="SS.C1#DAY";
H1:="SS.H1#DAY";
L1:="SS.L1#DAY"; O2:="SS.O2#DAY";
C2:="SS.C2#DAY";
H2:="SS.H2#DAY";
L2:="SS.L2#DAY"; O3:="SS.O3#DAY";
C3:="SS.C3#DAY";
H3:="SS.H3#DAY";
L3:="SS.L3#DAY";
GGJ:=CONST(IF(BARSLAST(TIME=93100),HHV(H,0),REF(HHV(H,0),BARSLAST(TIME=93100))));
DDJ:=CONST(IF(BARSLAST(TIME=93100),LLV(H,0),REF(LLV(H,0),BARSLAST(TIME=93100)))); E1:=IF(BETWEEN(TIME,94900,95700),O1,DRAWNULL);
E2:=IF(BETWEEN(TIME,94900,95700),C1,DRAWNULL); E12:=IF(BETWEEN(TIME,94000,94800),O2,DRAWNULL);
E22:=IF(BETWEEN(TIME,94000,94800),C2,DRAWNULL); E13:=IF(BETWEEN(TIME,93100,93900),O3,DRAWNULL);
E23:=IF(BETWEEN(TIME,93100,93900),C3,DRAWNULL); 时间:=TIME=100000;
N:=BARSLAST(时间);
CS1:=CONST(IF(N,HHV(H,0),REF(HHV(H,0),N)));
CS2:=CONST(IF(N,LLV(L,0),REF(LLV(L,0),N))); 三高:=IF(BETWEEN(TIME,93100,100000),MAX(H1,MAX(H2,H3)),DRAWNULL);
三低:=IF(BETWEEN(TIME,93100,100000),MIN(L1,MIN(L2,L3)),DRAWNULL);
三日高:=IF(BETWEEN(TIME,95700,100000),MAX(H1,MAX(H2,H3)),DRAWNULL);
三日低:=IF(BETWEEN(TIME,95700,100000),MIN(L1,MIN(L2,L3)),DRAWNULL);
三日高1:=IF(BETWEEN(TIME,94900,93100),MAX(H1,MAX(H2,H3)),DRAWNULL);
三日低1:=IF(BETWEEN(TIME,954900,93100),MIN(L1,MIN(L2,L3)),DRAWNULL);
三日高2:=IF(BETWEEN(TIME,94000,93100),MAX(H1,MAX(H2,H3)),DRAWNULL);
三日低2:=IF(BETWEEN(TIME,94000,93100),MIN(L1,MIN(L2,L3)),DRAWNULL); DRAWBAND(三日高,RGB(0,0,0),三日低,RGB(0,0,0));
STICKLINE(TIME=95300 AND C1>O1,H1,L1,1,0),COLOR0000CC;
STICKLINE(TIME=95300 AND C1
STICKLINE(TIME=95300 AND C1=O1,H1,L1,1,0),COLORWHITE; DRAWBAND(IF(C1>O1,E2,DRAWNULL),RGB(204,0,0),E1,RGB(204,0,0));
DRAWBAND(IF(C1
DRAWBAND(IF(C1=O1,E2,DRAWNULL),RGB(255,255,255),E1,RGB(255,255,255));
DRAWBAND(三日高1,RGB(0,0,0),三日低1,RGB(0,0,0)); STICKLINE(TIME=94400 AND C2>O2,H2,L2,1,0),COLOR0000CC;
STICKLINE(TIME=94400 AND C2
STICKLINE(TIME=94400 AND C2=O2,H2,L2,1,0),COLORWHITE;
DRAWBAND(IF(C2>O2,E22,DRAWNULL),RGB(204,0,0),E12,RGB(204,0,0));
DRAWBAND(IF(C2
DRAWBAND(IF(C2=O2,E22,DRAWNULL),RGB(255,255,255),E12,RGB(255,255,255)); DRAWBAND(三日高2,RGB(0,0,0),三日低2,RGB(0,0,0)); STICKLINE(TIME=93500 AND C3>O3,H3,L3,1,0),COLOR0000CC;
STICKLINE(TIME=93500 AND C3
STICKLINE(TIME=93500 AND C3=O3,H3,L3,1,0),COLORWHITE; DRAWBAND(IF(C3>O3,E23,DRAWNULL),RGB(204,0,0),E13,RGB(204,0,0));
DRAWBAND(IF(C3
DRAWBAND(IF(C3=O3,E23,DRAWNULL),RGB(255,255,255),E13,RGB(255,255,255));
STICKLINE(时间=1,三日高,三日低,-1,-1),COLOR0000CC;
IF(BETWEEN(TIME,93100,94000) AND BETWEEN(C,C1,O1),C,DRAWNULL),COLORWHITE;
STICKLINE(时间=1,CS1,CS2,-1,-1),COLORGREEN;
均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;
CONST(IF(N,LLV(L,0),REF(LLV(L,0),N))),COLOR888888;
CONST(IF(N,HHV(H,0),REF(HHV(H,0),N))),COLOR888888;
CONST(IF(时间,HHV(H,0),REF(HHV(H,0),N))),COLORRED,DOTLINE;
CONST(IF(时间,LLV(L,0),REF(LLV(L,0),N))),COLORLIBLUE,DOTLINE;
常数:CONST(IF(N=0,C,REF(C,N))),COLORGREEN,DOTLINE;
DRAWNUMBER(TIME=93500,常数,常数),COLORMAGENTA;
DRAWNUMBER(时间,GGJ*0.999,GGJ),COLORMAGENTA;
DRAWNUMBER(时间,DDJ*1.001,DDJ),COLORMAGENTA;
IF(BETWEEN(C,三高,三低),C,DRAWNULL),COLORWHITE;
IF(C=GGJ,C,DRAWNULL),COLORWHITE;
补充内容 (2016-3-20 19:56):
3日K线植入分时主图指标公式-解压导入可用 - 股票公式 - 股海明灯论坛 - 178448.COM
http://www.178448.com/thread-1180597-1-1.html |