大智慧公式源码概况:
指标类别:大智慧公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 主图
公式解读:
一、大智慧百分比主图指标公式
CV:=CLOSE;
BBIBOLL:(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4;
UPR1:BBIBOLL+STD(BBIBOLL,11);
UPR2:BBIBOLL+2*STD(BBIBOLL,11);
UPR3:BBIBOLL+3*STD(BBIBOLL,11);
UPR4:BBIBOLL+4*STD(BBIBOLL,11);
UPR5:BBIBOLL+5*STD(BBIBOLL,11);
UPR6:BBIBOLL+6*STD(BBIBOLL,11);
UPR7:BBIBOLL+7*STD(BBIBOLL,11);
UPR8:BBIBOLL+8*STD(BBIBOLL,11);
UPR9:BBIBOLL+9*STD(BBIBOLL,11);
DWN1:BBIBOLL-1*STD(BBIBOLL,11);
DWN2:BBIBOLL-2*STD(BBIBOLL,11);
DWN3:BBIBOLL-3*STD(BBIBOLL,11);
DWN4:BBIBOLL-4*STD(BBIBOLL,11);
DWN5:BBIBOLL-5*STD(BBIBOLL,11);
DWN6:BBIBOLL-6*STD(BBIBOLL,11);
DWN7:BBIBOLL-7*STD(BBIBOLL,11);
DWN8:BBIBOLL-8*STD(BBIBOLL,11);
DWN9:BBIBOLL-9*STD(BBIBOLL,11);
N:=20;
BOLL:MA(C,N);
UB:BOLL+2*STD(C,N);
LB:BOLL-2*STD(C,N);
日:=100;昨前:=3;
约1:=REF(LLV(L,日),昨前);
云:REFDATE(约1,DATE),COLORRED,LINETHICK2;
DRAWKLINE(云+(云-L),云+(云-O),云+(云-H),云+(云-C));
VARC:=云+(云-O);
BOLL1:MA(VARC,N);
UB1:(MA(VARC,N)+2*STD(VARC,N)),COLOR00FF00;
LB1:(MA(VARC,N)-2*STD(VARC,N)),COLOR00FFFF;
N:=5;
BD8:=(C-REF(C,7))/8;
BD20:=(C-REF(C,19))/20;
BD60:=(C-REF(C,59))/60;
BD168:=(C-REF(C,167))/168;
MA8:MA(CLOSE,8)COLORLICYAN;
明8:MA8+BD8,POINTDOT,COLORLICYAN,NODRAW;
MA20:MA(CLOSE,20)COLORBLUE,LINETHICK2;
明20:MA20+BD20,POINTDOT,COLORBLUE,NODRAW;
MA60:MA(CLOSE,60)COLORLIGREEN,LINETHICK2;
明60:MA60+BD60,POINTDOT,COLORLIGREEN,NODRAW;
MA168:MA(CLOSE,168)COLORRED,LINETHICK2;
明168:MA168+BD168,POINTDOT,COLORRED,LINETHICK2,NODRAW;
STICKLINE(C REF(C,1)*1.097,C,O,1.5,0)COLORYELLOW,LINETHICK2;
{F10数据}
DRAWTEXT_FIX(1,0.00,0,0, 行业: )COLORRED;
DRAWTEXT_FIX(1,0.03,0,0,HYBLOCK)COLORRED;
DRAWTEXT_FIX(1,0.00,0.04,0, 概念: )COLORRED;
DRAWTEXT_FIX(1,0.03,0.04,0,GNBLOCK)COLORRED;
DRAWTEXT_FIX(1,0.00,0.08,0, 地区: )COLORRED;
DRAWTEXT_FIX(1,0.03,0.08,0,DYBLOCK)COLORRED;
DRAWTEXT_FIX(1,0.00,0.12,0, 风格: )COLORRED;
DRAWTEXT_FIX(1,0.03,0.12,0,FGBLOCK)COLORRED;
DRAWTEXT_FIX(1,0.00,0.16,0, 自定: )COLORRED;
DRAWTEXT_FIX(1,0.03,0.16,0,ZDBLOCK)COLORRED;
DRAWTEXT_FIX(1,0.0.02.0,0.20,0, 解禁: )COLORRED;{未来三个月内有解禁}
DRAWTEXT_FIX(1,0.03,0.20,0,EXTERNSTR(0,901))COLORRED;
高:=REFDATE(HHV(H,N),DATE);
低:=REFDATE(LLV(L,N),DATE);
H1:高-(高-低)*0.25,NODRAW;
H2:高-(高-低)*0.3333,NODRAW;
H3:高-(高-低)*0.500,NODRAW;
H4:高-(高-低)*0.6666,NODRAW;
H5:高-(高-低)*0.75,NODRAW;
DRAWTEXT(CURRBARSCOUNT=1,高*0.99, 前高 ),COLORLIGREEN;
DRAWTEXT(CURRBARSCOUNT=1,H5, 四分之三 ),COLORLIBLUE;
DRAWTEXT(CURRBARSCOUNT=1,H4, 三分之二 ),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=1,H3, 二分之一 ),COLORRED;
DRAWTEXT(CURRBARSCOUNT=1,H2, 三分之一 ),COLORLIMAGENTA;
DRAWTEXT(CURRBARSCOUNT=1,H1, 四分之一 ),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=1,低*1.01, 前低 ),COLORRED;
STICKLINE(CURRBARSCOUNT=13,高,高,100,-1),COLORLIGREEN;
STICKLINE(CURRBARSCOUNT=13,H1,H1,100,-1),COLORMAGENTA;
N:=5;
M:=3;
CV:=CLOSE;
BBIBOLL:(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4;
UPR:BBIBOLL+M*STD(BBIBOLL,N);
DWN:BBIBOLL-M*STD(BBIBOLL,N);
公式解读:
公式编写要求:
请老师编写一个K线上往右引出的线,如果涨停K线是高开的以前一天收盘计算,往右引出20天
公式编写方法:
ZT:=C/REF(C,1) 1.09465 AND C=H AND O =REF(C,1);
GKZT:=C/REF(C,1) 1.09465 AND C=H AND O REF(C,1);
GKX:=DRAWLINE(GKZT,REF(C,1),REF(GKZT,1),REF(C,2),1);
ZTX:=DRAWLINE(ZT,C,REF(ZT,1),REF(C,1),1);
涨停:IF(BARSLAST(ZT) =20,ZTX,DRAWNULL);
高开涨停:IF(BARSLAST(GKZT) =20,GKX,DRAWNULL);