老张实用小公式(5):新仓位管控
2015-9-9 14:50:51点击:
一、源码
{新仓位管控}
M5:=MA(C,5),COLORWHITE;
M10:MA(C,10),COLORGREEN;
M30:MA(C,30),COLORYELLOW;
M60:=MA(C,60),COLORLIBLUE;
SZC:="999999$C",COLORCYAN,NODRAW;
SZ10:=MA("999999$C",10),COLORCYAN,NODRAW;
SZ30:=MA("999999$C",30),COLORCYAN,NODRAW;
XT1:=CURRBARSCOUNT=1 AND C>M10 AND C>M30 AND M10>M30;
XT2:=CURRBARSCOUNT=1 AND C<M10 AND C>M30 AND M10>M30;
XT3:=CURRBARSCOUNT=1 AND C<M10 AND C<M30 AND M10>M30;
XT4:=CURRBARSCOUNT=1 AND C>M10 AND C>M30 AND M10<M30;
XT5:=CURRBARSCOUNT=1 AND C>M10 AND C<M30 AND M10<M30;
XT6:=CURRBARSCOUNT=1 AND C<M10 AND C<M30 AND M10<M30;
DRAWTEXT_FIX(XT1,0.0,0.01,0,'个股:强势、上涨、仓位80%'),COLORYELLOW;
DRAWTEXT_FIX(XT2,0.0,0.01,0,'个股:强势、整理、仓位50%'),COLORYELLOW;
DRAWTEXT_FIX(XT3,0.0,0.01,0,'个股:强势、破位、仓位20%'),COLORYELLOW;
DRAWTEXT_FIX(XT4,0.0,0.01,0,'个股:弱势、反弹、仓位35%'),COLORGREEN;
DRAWTEXT_FIX(XT5,0.0,0.01,0,'个股:弱势、整理、仓位15%'),COLORGREEN;
DRAWTEXT_FIX(XT6,0.0,0.01,0,'个股:弱势、破位、空仓观望'),COLORGREEN;
QS1:=CURRBARSCOUNT=1 AND SZC>SZ10 AND SZC>SZ30 AND SZ10>SZ30;
QS2:=CURRBARSCOUNT=1 AND SZC<SZ10 AND SZC>SZ30 AND SZ10>SZ30;
QS3:=CURRBARSCOUNT=1 AND SZC<SZ10 AND SZC<SZ30 AND SZ10>SZ30;
QS4:=CURRBARSCOUNT=1 AND SZC>SZ10 AND SZC>SZ30 AND SZ10<SZ30;
QS5:=CURRBARSCOUNT=1 AND SZC>SZ10 AND SZC<SZ30 AND SZ10<SZ30;
QS6:=CURRBARSCOUNT=1 AND SZC<SZ10 AND SZC<SZ30 AND SZ10<SZ30;
QW1:DRAWTEXT_FIX(QS1,0.0,0.08,0,'大盘:强势、上涨、仓位80%'),COLORWHITE;
QW2:DRAWTEXT_FIX(QS2,0.0,0.08,0,'大盘:弱势、整理、仓位50%'),COLORWHITE;
QW3:DRAWTEXT_FIX(QS3,0.0,0.08,0,'大盘:强势、破位、仓位20%'),COLORWHITE;
QW4:DRAWTEXT_FIX(QS4,0.0,0.08,0,'大盘:弱势、反弹、仓位35%'),COLORGREEN;
QW5:DRAWTEXT_FIX(QS5,0.0,0.08,0,'大盘:强势、整理、仓位15%'),COLORGREEN;
QW6:DRAWTEXT_FIX(QS6,0.0,0.08,0,'大盘:弱势、破位、空仓观望'),COLORGREEN;
QQQ:DRAWTEXT_FIX(1,0.0,0.15,0,'今天仓位=(个股仓位+大盘仓位)/2;'),COLORFFFFFF;
XA:=DRAWTEXT_FIX(1,0,0.80,0,'1、每天收盘前2分钟的信号为操作依据;'),COLORWHITE,LINETHICK1;
XB:=DRAWTEXT_FIX(1,0,0.88,0,'2、活下来最重要、能吃到鱼身已很好了;'),COLORYELLOW,LINETHICK1;
XC:=DRAWTEXT_FIX(1,0,1,0,'3、实际仓位高于80%、说明头脑发热;'),COLORWHITE,LINETHICK1;
ZT:=C>=ZTPRICE(REF(CLOSE#DAY,1),0.1) AND C=H;
DT:=C<=DTPRICE(REF(CLOSE#DAY,1),0.1) AND C=L;
{分析家公式网www.88gs.com}
BA:STICKLINE(ZT,(H+L)/2,CLOSE,0,0),COLORYELLOW;
BC:STICKLINE(DT,(H+L)/2,CLOSE,0,0),COLORBLUE;
DA:=YEAR AND MONTH AND DAY;
AXA:=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,'六','日')))))));
AA1:=STRCAT(STRCAT(STRCAT(AXA,AAB),STRCAT(AA33,AA4)),'】');
S1:DRAWTEXT_FIX(DA,0.0,1,0,AA1),COLORWHITE;
二、说明
1、用法与前面发布的《仓位管控》指标基本一致;
2、评分:
指标数值其实也是对股票强弱的评分、应重点研究高分值的个股、放弃低分值的品种
3、新增加:
(1)、上证指数的数值提示
需要下载上证指数日线数据(代码:999999)后方能显示。
(2)、总仓位计算指标
总仓位=(个股数值*个股权重+上证数值*上证权重)/(个股数量+1)
这里是按最基础的1:1的设置权重值。
具体运用中可根据个人能力强弱将权重比例做相应调整
例如技术能力强的、可按7:3等设置个股与大盘的权重值;
3、总仓位计算指标是本指标一大亮点、它将大盘的影响力进行量化了处理、
让大家每天不需要花太多精力和时间去研究大盘、只要专注研究个股走势即可。
三、图例
假设持有这一只股、那么根据提示可知:
今天的总仓位=(80+15)/2=47.5%
这是较合理的持仓状态
- 上一篇:顺势而为{KDJ+MACD+CCI+RSI}改成了通达信 2015/9/9
- 下一篇:突击穿刺 源码无未来(源码 副图/选股 通达信 贴图) 2015/9/9