关于支撑压力划线的问题

    无敌期货 发表于 2020-06-16 21:15 ・893次浏览 2条跟帖 赢顺 wh6 回复

    DD1:=V>REF(MA(VOL,10),1)*2.9&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&ISUP;
    DD2:=V>REF(MA(VOL,10),1)*2.9&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&ISDOWN;
    DRAWSL1((DD1)&&REFX1(LLV(L,BARSLAST(DD1)),3)<C,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;
    DRAWSL1((DD1)&&REFX(LLV(L,3),3)>=C,CLOSE,0,80,0),COLORMAGENTA,LINETHICK3;
    DRAWSL1((DD2)&&REFX1(HHV(HIGH,BARSLAST(DD2)),3)>C,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;
    DRAWSL1((DD2)&&REFX(HHV(HIGH,3),3)<=C,CLOSE,0,80,0),COLORLIGHTGREY,LINETHICK3;
    
    DD:=V>REF(MA(VOL,10),1)*2.9&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2;
    
    DRAWSL1(DD&&ISUP,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;
    DRAWSL1(DD&&ISDOWN,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;
    
    求解答!照理说,上面两段代码,影响的开盘价划线或者收盘价划线,但是为什么会出现同根K线一个划线,一个不划线?求解答


    feXq7nEL3XA9piG3.jpg
    gNB96v1aRa29m2AB.jpg
       
    AA:=ISUP&&V>REF(VOL,1)*1.9&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2,NODRAW;
    BB:=ISDOWN&&V>REF(VOL,1)*1.9&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2,NODRAW;
    CC:=VOL>=HHV(VOL,100);
    DD:=V>REF(MA(VOL,10),1)*2.9&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2;
    
    DRAWCOLORKLINE(AA,COLORMAGENTA,0);
    DRAWCOLORKLINE(BB,COLORLIGHTGREY,0);
    DRAWCOLORKLINE(CC,COLORLIGHTRED,0);
    HHHHH:=IF(AA,VOL,0)>=HHV(VALUEWHEN(AA,VOL),100);
    LLLLL:=IF(BB,VOL,0)>=HHV(VALUEWHEN(BB,VOL),100);
    DRAWSL1(HHHHH,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;(黄金柱)
    DRAWSL1(LLLLL,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;(黄金柱)
    
    DRAWSL1(CC&&ISUP&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;黄金柱
    DRAWSL1(CC&&ISDOWN&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;黄金柱
     
    DRAWSL1(CC&&AA,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;黄金柱
    DRAWSL1(CC&&BB,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;黄金柱
    
    DRAWSL1(DD&&ISUP,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;黄金柱
    DRAWSL1(DD&&ISDOWN,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;黄金柱
    
    这是一开始的画支撑压力的方式,都是在不同黄金柱开盘价划线
    现在分为两种情况,黄金柱后三根K线,只要存在任意一根K线的最低价小于黄金柱的收盘价,就在开盘价划线
    另外一个情况,黄金柱之后三根K线,就是说走了三根之后,并且他们的最低价都≥黄金柱的收盘价,在收盘价划线
    
    重点:哪怕黄金柱后面第一根K线的最低价小于黄金柱的收盘价,就在开盘价划线
    但是在收盘价划线,必须三根走完,并且他们的最低价都≥黄金柱的收盘价
    求改

    文华财经 沙发

    没问题的
    满足DD条件的K线都会画线的,您需要自行核实下指标是否正确
    DD:=V>REF(MA(VOL,10),1)*2.9&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2;
    DRAWCOLORKLINE(DD,COLORYELLOW,0);
    
    回复

    文华财经 板凳

    给您写了参考,类比编写即可
    
    DRAWSL1(HHHHH&&REFX(LLV(L,3),3)<C,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;//黄金柱)
    DRAWSL1(HHHHH&&REFX(ISLASTBAR,2)&&REFX(LLV(L,2),2)<C,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;//黄金柱)
    DRAWSL1(HHHHH&&REFX(ISLASTBAR,1)&&REFX(L,1)<C,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;//黄金柱)
    DRAWSL1(HHHHH&&REFX(LLV(L,3),3)>=C,C,0,80,0),COLORMAGENTA,LINETHICK3;//黄金柱)
    
    DRAWSL1(LLLLL&&REFX(LLV(L,3),3)<C,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;//黄金柱)
    DRAWSL1(LLLLL&&REFX(ISLASTBAR,2)&&REFX(LLV(L,2),2)<C,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;//黄金柱)
    DRAWSL1(LLLLL&&REFX(ISLASTBAR,1)&&REFX(L,1)<C,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;//黄金柱)
    DRAWSL1(LLLLL&&REFX(LLV(L,3),3)>=C,C,0,80,0),COLORLIGHTGREY,LINETHICK3;//黄金柱)
    
    DRAWSL1(CC&&ISUP&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&REFX(LLV(L,3),3)<C,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;//黄金柱)
    DRAWSL1(CC&&ISUP&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&REFX(ISLASTBAR,2)&&REFX(LLV(L,2),2)<C,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;//黄金柱)
    DRAWSL1(CC&&ISUP&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&REFX(ISLASTBAR,1)&&REFX(L,1)<C,OPEN,0,80,0),COLORMAGENTA,LINETHICK3;//黄金柱)
    DRAWSL1(CC&&ISUP&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&REFX(LLV(L,3),3)>=C,C,0,80,0),COLORMAGENTA,LINETHICK3;//黄金柱)
    
    DRAWSL1(CC&&ISDOWN&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&REFX(LLV(L,3),3)<C,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;//黄金柱)
    DRAWSL1(CC&&ISDOWN&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&REFX(ISLASTBAR,2)&&REFX(LLV(L,2),2)<C,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;//黄金柱)
    DRAWSL1(CC&&ISDOWN&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&REFX(ISLASTBAR,1)&&REFX(L,1)<C,OPEN,0,80,0),COLORLIGHTGREY,LINETHICK3;//黄金柱)
    DRAWSL1(CC&&ISDOWN&&ABS(O-C)>REF(MA(ABS(O-C),10),1)*2&&REFX(LLV(L,3),3)>=C,C,0,80,0),COLORLIGHTGREY,LINETHICK3;//黄金柱)
    回复

    本版积分规则

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

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