您现在的位置:程序化交易>> 期货公式>> 文华财经>> 文华财经知识>>正文内容

修改指标,麻烦 [文华财经]

  • 咨询内容:  
    DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));DEA:=EMA(DIFF,9);MACD2:=(2 * (DIFF - DEA));VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);OBV:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);MAOBV:=MA(OBV,20);MACG:=(C>MA(C,5));TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84));RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);KDJ:=3*K-2*D;预操作:((CLOSE>SAR(4,2,20)),0,2,8,0),COLORYELLOW;操作区:((MACD2>0)AND(MACG)AND((CLOSE>SAR(4,2,20)))),COLORGREEN;休息区:(MACD2<0)OR(CLOSE<SAR(4,2,20))OR(-MACG),COLORRED;主行情:(CCI>100),COLORMAGENTA;{拉升行情:((MACD2>0)AND(DIFF>0)),COLORYELLOW;}{小心回调:((KDJ>=100)AND(CCI>=220)),COLORYELLOW;}STICKLINE((MACD2<0),0,2,8,0),COLORRED,LINETHICK2;STICKLINE((CLOSE<SAR(4,2,20))OR(-MACG),0,2,8,0),COLORRED,LINETHICK2;STICKLINE(((CLOSE>SAR(4,2,20))),0,2,8,0),COLORYELLOW,LINETHICK2;STICKLINE(((MACD2>0)AND(MACG)AND((CLOSE>SAR(4,2,20)))),0,2,8,0),COLORGREEN,LINETHICK2;STICKLINE((CCI>100)AND((CLOSE>SAR(4,2,20))),0,2,8,0),COLORMAGENTA,LINETHICK2;{STICKLINE((OBV<REF(OBV,1))AND(MACD2<0),0,2,8,0),COLORRED,LINETHICK2;}{STICKLINE(((MACD2>0) AND (DIFF>0)),0,2,8,0),COLORGREEN,LINETHICK2;}{STICKLINE(((MACD2>0) ),0,2,8,0),COLORGREEN,LINETHICK2;}{STICKLINE(MACD2<0,0,2,8,0),COLORRED,LINETHICK2;STICKLINE(CLOSE>SAR(4,2,20),0,2,8,0),COLORGREEN,LINETHICK2;}{持仓:IF(CLOSE>SAR(4,2,20),SAR(4,2,20),CLOSE),CIRCLEDOT,COLOR9955FF;空仓:IF(CLOSE<SAR(4,2,20),SAR(4,2,20),CLOSE),CIRCLEDOT,COLORDDFF00;CLOSE,CIRCLEDOT,COLOR8877FF;}{IF(CLOSE>SAR(4,2,20),SAR(4,2,20),DRAWNULL),CIRCLEDOT,COLORRED;IF(CLOSE<SAR(4,2,20),SAR(4,2,20),DRAWNULL),CIRCLEDOT,COLORGREEN;}{STICKLINE(CLOSE>OPEN,LOW,HIGH,0,1),COLORRED;STICKLINE(CLOSE<=OPEN,LOW,HIGH ,0,1),COLORCYAN;};
    这是副图的吗

     

  • 文华技术人员:  可以参考如下编写:注意指标差值较大 可能产生压缩 请试着以副图指标的属性 叠加到主图上
    DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));DEA:=EMA(DIFF,9);MACD2:=(2 * (DIFF - DEA));VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);OBV:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);MAOBV:=MA(OBV,20);MACG:=(C>MA(C,5));TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84));RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);KDJ:=3*K-2*D;STICKLINE1((CLOSE>SAR(4,2,20)),0,2,8,0),COLORYELLOW;操作区:((MACD2>0) AND (MACG) AND ((CLOSE>SAR(4,2,20)))),COLORGREEN;休息区:(MACD2<0) OR (CLOSE<SAR(4,2,20)) OR (MACG=0),COLORRED;主行情:(CCI>100),COLORMAGENTA;拉升行情:((MACD2>0) AND (DIFF>0)),COLORYELLOW;小心回调:((KDJ>=100) AND (CCI>=220)),COLORYELLOW;STICKLINE1((MACD2<0),0,2,8,0),COLORRED,LINETHICK2;STICKLINE1((CLOSE<SAR(4,2,20)) OR (MACG=0),0,2,8,0),COLORRED,LINETHICK2;STICKLINE1(((CLOSE>SAR(4,2,20))),0,2,8,0),COLORYELLOW,LINETHICK2;STICKLINE1(((MACD2>0) AND (MACG) AND ((CLOSE>SAR(4,2,20)))),0,2,8,0),COLORGREEN,LINETHICK2;STICKLINE1((CCI>100) AND ((CLOSE>SAR(4,2,20))),0,2,8,0),COLORMAGENTA,LINETHICK2;STICKLINE1((OBV<REF(OBV,1)) AND (MACD2<0),0,2,8,0),COLORRED,LINETHICK2;STICKLINE1(((MACD2>0) AND (DIFF>0)),0,2,8,0),COLORGREEN,LINETHICK2;STICKLINE1(((MACD2>0) ),0,2,8,0),COLORGREEN,LINETHICK2;STICKLINE1(MACD2<0,0,2,8,0),COLORRED,LINETHICK2;STICKLINE1(CLOSE>SAR(4,2,20),0,2,8,0),COLORGREEN,LINETHICK2;持仓:IF(CLOSE>SAR(4,2,20),SAR(4,2,20),CLOSE),CIRCLEDOT,COLOR9955FF;空仓:IF(CLOSE<SAR(4,2,20),SAR(4,2,20),CLOSE),CIRCLEDOT,COLORDDFF00;CLOSE,CIRCLEDOT,COLOR8877FF;IF(CLOSE>SAR(4,2,20),SAR(4,2,20),NULL),CIRCLEDOT,COLORRED,NODRAW;IF(CLOSE<SAR(4,2,20),SAR(4,2,20),NULL),CIRCLEDOT,COLORGREEN,NODRAW;STICKLINE1(CLOSE>OPEN,LOW,HIGH,0,1),COLORRED;STICKLINE1(CLOSE<=OPEN,LOW,HIGH ,0,1),COLORCYAN;

    此主题相关图片如下:image .png


 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  点击这里给我发消息进行 有偿 编写!不贵!点击查看价格!


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容