在分钟图里划周线开盘线

    东方不败 发表于 2020-06-08 21:02 ・860次浏览 1条跟帖 赢顺 wh6 回复

    
    在分钟K线图上//定义:ROW为上一周开盘价,RCW为上一周收盘价
    //定义:多头开仓线周线多头
    开仓:=IF(ROW>=RCW,ROW,RCW);
    DRAWSL(C>=周线多头开仓,周线多头开仓,0,1,0,COLORRED),LINETHICK3;
    DRAWSL(C<=周线多头开仓,周线多头开仓,0,1,0,COLORGREEN),LINETHICK3;
    DRAWTEXT(ISLASTBAR=1 AND C<>周线多头开仓,周线多头开仓,'周多开'),COLORRED,ALIGN0,VALIGN1,FONTSIZE12;
    
    DRAWTEXT(ISLASTBAR=1 AND C<>周线多头开仓,周线多头开仓,'周多开'),COLORRED,ALIGN0,VALIGN1,FONTSIZE12;
    //定义:空头开仓线周线空头开仓:=IF(ROW>=RCW,RCW,ROW);
    DRAWSL(C>=周线空头开仓,周线空头开仓,0,1,0,COLORYELLOW),LINETHICK3;
    DRAWSL(C<=周线空头开仓,周线空头开仓,0,1,0,COLORBLUE),LINETHICK3;
    DRAWTEXT(ISLASTBAR=1 AND C<=周线空头开仓,周线空头开仓,'周空开'),COLORYELLOW,ALIGN0,VALIGN1,FONTSIZE12;
    
    DRAWTEXT(ISLASTBAR=1 AND C>=周线空头开仓,周线空头开仓,'周空开'),COLORYELLOW,ALIGN0,VALIGN1,FONTSIZE12;
    为了便于复盘分析,在每一根开仓线处标识文字一次,而每一根开仓线除了最后一根其他教设置为虚线,能否实现?如能,应当如何编写?
       
    

    autojiaoyi.com 沙发

    这样看下
    
    //定义:ROW为上一周开盘价,RCW为上一周收盘价
    N:BARSLAST(WEEKDAY<REF(WEEKDAY,1))+1,NODRAW;
    AA:BACKSET(ISLASTBAR,N),NODRAW;
    ROW:REF(VALUEWHEN(N=1,O),N),NODRAW;
    RCW:REF(O,N),NODRAW;
    //定义:多头开仓线周线多头开仓:=IF(ROW>=RCW,ROW,RCW);
    DRAWSL(C>=周线多头开仓,周线多头开仓,0,2,0,COLORRED),DOT;
    DRAWSL(C<=周线多头开仓,周线多头开仓,0,2,0,COLORGREEN),DOT;
    DRAWSL(AA&&C>=周线多头开仓,周线多头开仓,0,1,0,COLORRED),LINETHICK3;
    DRAWSL(AA&&C<=周线多头开仓,周线多头开仓,0,1,0,COLORGREEN),LINETHICK3;
    DRAWTEXT(N=1 AND C<>周线多头开仓,周线多头开仓,'周多开'),COLORRED,ALIGN0,VALIGN1,FONTSIZE12;
    
    DRAWTEXT(N=1 AND C<>周线多头开仓,周线多头开仓,'周多开'),COLORRED,ALIGN0,VALIGN1,FONTSIZE12;
    //定义:空头开仓线周线空头开仓:=IF(ROW>=RCW,RCW,ROW);
    DRAWSL(C>=周线空头开仓,周线空头开仓,0,2,0,COLORYELLOW),DOT;
    DRAWSL(C<=周线空头开仓,周线空头开仓,0,2,0,COLORBLUE),DOT;
    DRAWSL(AA&&C>=周线空头开仓,周线空头开仓,0,1,0,COLORYELLOW),LINETHICK3;
    DRAWSL(AA&&C<=周线空头开仓,周线空头开仓,0,1,0,COLORBLUE),LINETHICK3;
    DRAWTEXT(N=1 AND C<=周线空头开仓,周线空头开仓,'周空开'),COLORYELLOW,ALIGN0,VALIGN1,FONTSIZE12;
    
    DRAWTEXT(N=1 AND C>=周线空头开仓,周线空头开仓,'周空开'),COLORYELLOW,ALIGN0,VALIGN1,FONTSIZE12;
    
    
    回复

    本版积分规则

    发布新内容
    请关注微信公众号,获取最新指标公式
    加入收藏 我要分享
    分享到论坛或者博客

    复制
    热门指标策略
    快速回复 返回顶部 返回列表