新年指标 主要是给老指标的一次聚合

把老指标聚合一下,方便使用,可以用于选股和直接查看指标线

/* 布林极限宽 */

N:=20;P:=2;

MID := MA(CLOSE,N);

UPPER:= MID + P*STD(C,n);

LOWER:= MID - P*STD(C,n);

BBW: (UPPER- LOWER) / MID, colorblue;

BBW5:= MA(BBW, 5);

BBWP:= REF(BBW, 1);

BBWP2:= REF(BBW, 2);

BBCHA:= BBWP > BBW5 AND BBW <= BBWP AND HHV(BBW, 10) = BBWP;

BBWUP:= BBWP > BBW5 AND BBW > BBWP;

BBWDOWN:= BBWP < BBW5 AND BBW < BBWP;

变化: IF(BBCHA, 0.01, 0), colorwhite;

VERLINE(BBCHA, 0);

BBSPE:= BBWP < BBW5 AND BBW >= BBWP AND LLV(BBW, 10) = BBWP;

加速: IF(BBSPE, BBW, 0), coloryellow;

BBWRATE:= (BBW - BBWP) / BBWP;

BBWRATEP: = REF(BBWRATE, 1);

/* 均线 */

MA60:= MA(CLOSE, 60);

MA30= MA(CLOSE, 30);

MA20:= MA(CLOSE, 20);

MA5:= MA(CLOSE, 5);

MAIn:= MA20 >= REF(MA20, 1) AND BBWUP AND BBWRATE > 0.1;

买入: IF(MAIn, 0.01, 0), colorred;

DRAWTEXT(MAIn, BBW, '买');

MAOut:= CROSS(MA30, CLOSE) AND MA5 < REF(MA5, 1) AND MA20 < REF(MA20, 1);

卖出: IF(MAOut, 0.01, 0), colorgray;

DRAWTEXT(MAout, BBW, '卖');

EasyDown:= CLOSE * 0.97;

MAAdd:= CLOSE < REF(CLOSE, 1) AND MA5 < REF(MA5, 1) AND CLOSE > MA60 AND ((CLOSE > MA20 AND EasyDown < MA20) OR (CLOSE > MA30 AND EasyDown < MA30));

补仓: IF(MAAdd, 0.01, 0), colorcyan;

DRAWTEXT(MAAdd, BBW, '补');

/* 成交量 */

VOLIn:= VOL / MA(VOL, 5) > 1.8 AND CLOSE < MA60 AND MA5 < MA20 AND MA20 < MA30 AND MA30 < MA60 AND MA5 <= REF(MA5, 1);

进场: IF(VOLIn, 0.01, 0), colorligray;

DRAWTEXT(VOLIn, BBW, '进');

VOLOut:= VOL / MA(VOL, 5) > 1.8 AND MA20 > MA30 AND MA30 > MA60;

出场: IF(VOLOut, 0.01, 0), colormagenta;

DRAWTEXT(VOLOut, BBW, '出');

 




来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图