请老老师帮助修改下,不知道是哪里出了问题,小周期上压缩很严重。多谢! [博易POBO]
咨询内容:
DDEA: EMA(DDIF,9),COLORWHITE,LINETHICK2,NODRAW;
DMACD: (DDIF-DDEA)*2,COLORGRAY,LINETHICK1,NODRAW;
AA1:=DMACD<REF(DMACD,1);
AA2:=DMACD>=REF(DMACD,1) ;
STICKLINE(DMACD>0,0,DMACD,1.5,0),COLOR0000CC;
STICKLINE(DMACD>0,0,DMACD,1,0),COLOR0000FF;
STICKLINE(DMACD>0,0,DMACD,0.5,0),COLORCC66FF;
STICKLINE(AA1,0,DMACD,1.3,1),COLORRED;
STICKLINE(DMACD<0,0,DMACD,1.5,0),COLOR006400;
STICKLINE(DMACD<0,0,DMACD,1,0),COLOR009600;
STICKLINE(DMACD<0,0,DMACD,0.5,0),COLOR00C800;
STICKLINE(AA2 AND DMACD<0,0,DMACD,1.3,1),COLORGREEN;
快线DIF: DDIF,COLORGRAY,LINETHICK2;
IF(DDIF>=REF(DDIF,1),DDIF,DRAWNULL),COLORRED,LINETHICK3;
IF(DDIF<REF(DDIF,1),DDIF,DRAWNULL),COLORCYAN,LINETHICK3;
FILLRGN(DDEA>REF(DDEA,1),DDEA,REF(DDEA,1)),COLORFF64FF;
FILLRGN(DDEA<REF(DDEA,1),DDEA,REF(DDEA,1)),COLORFF4000;
JC:=CROSS(DDIF,DDEA);
SC:=CROSS(DDIF,DDEA);
N1:=BARSLAST(JC)+1;
N2:=BARSLAST(SC)+1;
HH:=REF(HHV(H,N1),N2);//上次MACD红柱期间合约最大值
HH2:=REF(REF(HH,1),N2);//上上次MACD红柱期间合约最大值
MHD:=VALUEWHEN(SC,HHV(DDIF,N1));//上次MACD红柱期间DIFF最大值
MHD2:=VALUEWHEN(SC,REF(MHD,1));//上上次MACD红柱期间DIFF最大值
LL:=REF(LLV(L,N2),N1);
LL2:=REF(REF(LL,1),N1);
MLD:=VALUEWHEN(JC,LLV(DDIF,N2));
MLD2:=VALUEWHEN(JC,REF(MLD,1));
A:DMACD<0&&HH>HH2&&MHD<MHD2;//顶背离
B6:DMACD>0&&LL<LL2&&MLD>MLD2;
A01:=BACKSET(CROSS(A,0.5),REF(HHVBARS(DDIF,N1),1)+1+1);
A2:=BACKSET(CROSS(A,0.5),REF(HHVBARS(DDIF,N1),SUMBARS(SC,2))+SUMBARS(SC,2)+1);
B1:=BACKSET(CROSS(B6,0.5),REF(LLVBARS(DDIF,N2),1)+1+1);
B2:=BACKSET(CROSS(B6,0.5),REF(LLVBARS(DDIF,N2),SUMBARS(JC,2))+SUMBARS(JC,2)+1);
DRAWLINE(CROSS(A2,0.5),DDIF,CROSS(A01,0.5),DDIF,0),COLORRED,LINETHICK2;
请老老师帮助修改下,不知道是哪里出了问题,小周期上压缩很严重。多谢!
DDIF: (EMA(CLOSE,12)-EMA(CLOSE,26)),COLORYELLOW,LINETHICK2,NODRAW;DDEA: EMA(DDIF,9),COLORWHITE,LINETHICK2,NODRAW;
DMACD: (DDIF-DDEA)*2,COLORGRAY,LINETHICK1,NODRAW;
AA1:=DMACD<REF(DMACD,1);
AA2:=DMACD>=REF(DMACD,1) ;
STICKLINE(DMACD>0,0,DMACD,1.5,0),COLOR0000CC;
STICKLINE(DMACD>0,0,DMACD,1,0),COLOR0000FF;
STICKLINE(DMACD>0,0,DMACD,0.5,0),COLORCC66FF;
STICKLINE(AA1,0,DMACD,1.3,1),COLORRED;
STICKLINE(DMACD<0,0,DMACD,1.5,0),COLOR006400;
STICKLINE(DMACD<0,0,DMACD,1,0),COLOR009600;
STICKLINE(DMACD<0,0,DMACD,0.5,0),COLOR00C800;
STICKLINE(AA2 AND DMACD<0,0,DMACD,1.3,1),COLORGREEN;
快线DIF: DDIF,COLORGRAY,LINETHICK2;
IF(DDIF>=REF(DDIF,1),DDIF,DRAWNULL),COLORRED,LINETHICK3;
IF(DDIF<REF(DDIF,1),DDIF,DRAWNULL),COLORCYAN,LINETHICK3;
FILLRGN(DDEA>REF(DDEA,1),DDEA,REF(DDEA,1)),COLORFF64FF;
FILLRGN(DDEA<REF(DDEA,1),DDEA,REF(DDEA,1)),COLORFF4000;
JC:=CROSS(DDIF,DDEA);
SC:=CROSS(DDIF,DDEA);
N1:=BARSLAST(JC)+1;
N2:=BARSLAST(SC)+1;
HH:=REF(HHV(H,N1),N2);//上次MACD红柱期间合约最大值
HH2:=REF(REF(HH,1),N2);//上上次MACD红柱期间合约最大值
MHD:=VALUEWHEN(SC,HHV(DDIF,N1));//上次MACD红柱期间DIFF最大值
MHD2:=VALUEWHEN(SC,REF(MHD,1));//上上次MACD红柱期间DIFF最大值
LL:=REF(LLV(L,N2),N1);
LL2:=REF(REF(LL,1),N1);
MLD:=VALUEWHEN(JC,LLV(DDIF,N2));
MLD2:=VALUEWHEN(JC,REF(MLD,1));
A:DMACD<0&&HH>HH2&&MHD<MHD2;//顶背离
B6:DMACD>0&&LL<LL2&&MLD>MLD2;
A01:=BACKSET(CROSS(A,0.5),REF(HHVBARS(DDIF,N1),1)+1+1);
A2:=BACKSET(CROSS(A,0.5),REF(HHVBARS(DDIF,N1),SUMBARS(SC,2))+SUMBARS(SC,2)+1);
B1:=BACKSET(CROSS(B6,0.5),REF(LLVBARS(DDIF,N2),1)+1+1);
B2:=BACKSET(CROSS(B6,0.5),REF(LLVBARS(DDIF,N2),SUMBARS(JC,2))+SUMBARS(JC,2)+1);
DRAWLINE(CROSS(A2,0.5),DDIF,CROSS(A01,0.5),DDIF,0),COLORRED,LINETHICK2;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 您好,这个公式需要以副图或者主图相对叠加方式保存。 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容