wenhua8 [文华财经]
-
咨询内容:
DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26);DEA := EMA(DIFF,9);MACD:=2*(DIFF-DEA),COLORSTICK; UPCOND:=CROSS(DIFF,DEA);DOWNCOND:=CROSSDOWN(DIFF,DEA);END_N1:=SUMBARS(DOWNCOND,1);RANGE_N1:=REF(SUMBARS(UPCOND,1),END_N1);END_N2:=SUMBARS(DOWNCOND,2);
HH1:=REF(HV(H,RANGE_N1),END_N1-1);HH2:=REF(HV(H,RANGE_N1),END_N2-1);MACD1:=REF(REF(MACD,HHVBARS(H,RANGE_N1)),END_N1-1);MACD2:=REF(REF(MACD,HHVBARS(H,RANGE_N1)),END_N2-1);
顶背离:=CROSS(0,MACD) && HH1>HH2 && MACD1<MACD2;DRAWICON(顶背离,H,'CO5';
END_M1:=SUMBARS(UPCOND,1);RANGE_M1:=REF(SUMBARS(DOWNCOND,1),END_M1);END_M2:=SUMBARS(UPCOND,2);LL1:=REF(LV(L,RANGE_M1),END_M1-1);LL2:=REF(LV(L,RANGE_M1),END_M2-1);MACD3:=REF(REF(MACD,LLVBARS(L,RANGE_M1)),END_M1-1);MACD4:=REF(REF(MACD,LLVBARS(L,RANGE_M1)),END_M2-1);
底背离:=CROSS(MACD,0) && LL1<LL2 && MACD3>MACD4;DRAWICON(底背离,L,'CO4';顶背离 && CROSSDOWN(DIFF,DEA) &&SKVOL=0,SK(1);底背离 && CROSS(DIFF,DEA)&&BKVOL=0,BK(1);MA60:MA(C,60);
SKVOL=1 && CROSSDOWN(C,MA60),SK(1);BKVOL=1 && CROSS(C,MA60),BK(1);
CROSSDOWN(DIFF,DEA),SP(BKVOL);CROSS(DIFF,DEA),BP(SKVOL);
TRADE_OTHER('UTO';来源:程序化99
-
文华技术人员:
该指标可以正常加载,详细说明一下问题;
来源: WWW.CXH99.COM
-
文华客服:
请修改一下, 日线macd金叉红柱,15分钟底背离金叉做多,死叉平仓
日线macd死叉绿柱,15分钟顶背离死叉做空,金叉平仓
以上条件不分零轴上下
另外还需添加下面思路
日线macd零轴上方,金叉死叉也可以,股价在60日均线上方,15分钟底背离做多,死叉平仓 日线macd零轴下方,金叉死叉也可以,股价在60日均线下方,15分钟顶背离做空,金叉平仓 -
网友回复:
参考:
1:
建立指标A:
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。DEA : EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均MACD:2*(DIFF-DEA),COLORSTICK;//DIFF减DEA的2倍画柱状线MA60:MA(C,60);A1:MACD>0;B1:MACD<0;
建立新指标:
#IMPORT[DAY,1,A] AS VARA:VAR.A1;B:VAR.B1;DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26);DEA := EMA(DIFF,9);MACD:=2*(DIFF-DEA),COLORSTICK; UPCOND:=CROSS(DIFF,DEA);DOWNCOND:=CROSSDOWN(DIFF,DEA);END_N1:=SUMBARS(DOWNCOND,1);RANGE_N1:=REF(SUMBARS(UPCOND,1),END_N1);END_N2:=SUMBARS(DOWNCOND,2);HH1:=REF(HV(H,RANGE_N1),END_N1-1);HH2:=REF(HV(H,RANGE_N1),END_N2-1);MACD1:=REF(REF(MACD,HHVBARS(H,RANGE_N1)),END_N1-1);MACD2:=REF(REF(MACD,HHVBARS(H,RANGE_N1)),END_N2-1);顶背离:=CROSS(0,MACD) && HH1>HH2 && MACD1<MACD2;END_M1:=SUMBARS(UPCOND,1);RANGE_M1:=REF(SUMBARS(DOWNCOND,1),END_M1);END_M2:=SUMBARS(UPCOND,2);LL1:=REF(LV(L,RANGE_M1),END_M1-1);LL2:=REF(LV(L,RANGE_M1),END_M2-1);MACD3:=REF(REF(MACD,LLVBARS(L,RANGE_M1)),END_M1-1);MACD4:=REF(REF(MACD,LLVBARS(L,RANGE_M1)),END_M2-1);底背离:=CROSS(MACD,0) && LL1<LL2 && MACD3>MACD4;
A&&底背离&&CROSS(DIFF,DEA),BK;CROSSDOWN(DIFF,DEA),SP;B&&顶背离&&CROSSDOWN(DIFF,DEA),SK;CROSS(DIFF,DEA),BP;AUTOFILTER;
2:
建立指标A:
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。DEA : EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均MACD:2*(DIFF-DEA),COLORSTICK;//DIFF减DEA的2倍画柱状线MA60:MA(C,60);A1:MACD>0;B1:MACD<0;A:C>MA60;B:C<MA60;
建立新指标:
#IMPORT[DAY,1,A] AS VARA1:VAR.A1;B1:VAR.B1;A:VAR.A;B:VAR.B;DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26);DEA := EMA(DIFF,9);MACD:=2*(DIFF-DEA),COLORSTICK; UPCOND:=CROSS(DIFF,DEA);DOWNCOND:=CROSSDOWN(DIFF,DEA);END_N1:=SUMBARS(DOWNCOND,1);RANGE_N1:=REF(SUMBARS(UPCOND,1),END_N1);END_N2:=SUMBARS(DOWNCOND,2);HH1:=REF(HV(H,RANGE_N1),END_N1-1);HH2:=REF(HV(H,RANGE_N1),END_N2-1);MACD1:=REF(REF(MACD,HHVBARS(H,RANGE_N1)),END_N1-1);MACD2:=REF(REF(MACD,HHVBARS(H,RANGE_N1)),END_N2-1);顶背离:=CROSS(0,MACD) && HH1>HH2 && MACD1<MACD2;END_M1:=SUMBARS(UPCOND,1);RANGE_M1:=REF(SUMBARS(DOWNCOND,1),END_M1);END_M2:=SUMBARS(UPCOND,2);LL1:=REF(LV(L,RANGE_M1),END_M1-1);LL2:=REF(LV(L,RANGE_M1),END_M2-1);MACD3:=REF(REF(MACD,LLVBARS(L,RANGE_M1)),END_M1-1);MACD4:=REF(REF(MACD,LLVBARS(L,RANGE_M1)),END_M2-1);底背离:=CROSS(MACD,0) && LL1<LL2 && MACD3>MACD4;
A&&A1&&底背离&&CROSS(DIFF,DEA),BK;CROSSDOWN(DIFF,DEA),SP;B&&B1&&顶背离&&CROSSDOWN(DIFF,DEA),SK;CROSS(DIFF,DEA),BP;AUTOFILTER; - 网友回复: 不能合并一个模组运行吗
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容