按图要求添加黄金分割代码 [文华财经]
-
咨询内容:
文件名:微信图片_20210419232736.png
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。DEA:= EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均MACD:=2*(DIFF-DEA),COLORSTICK;//DIFF减DEA的2倍画柱状线J:=CROSS(DIFF,DEA);S:=CROSSDOWN(DIFF,DEA);LL:=CROSS( BACKSET(REFX(J,1)||ISLASTBAR&&DIFF<DEA,LLVBARS(L,BARSLAST(S)+1)+1),0.5),NODRAW;HH:=CROSS( BACKSET(REFX(S,1)||ISLASTBAR&&DIFF>DEA,HHVBARS(H,BARSLAST(J)+1)+1),0.5),NODRAW;DRAWLINE1(HH,H,LL,L,0),COLORGREEN,LINETHICK1;DRAWLINE1(LL,L,HH,H,0),COLORRED,LINETHICK1;来源:程序化99
-
文华技术人员:
参考:
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。
DEA:= EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均
MACD:=2*(DIFF-DEA),COLORSTICK;//DIFF减DEA的2倍画柱状线
J:=CROSS(DIFF,DEA);
S:=CROSSDOWN(DIFF,DEA);
LL:=CROSS( BACKSET(REFX(J,1)||ISLASTBAR&&DIFF<DEA,LLVBARS(L,BARSLAST(S)+1)+1),0.5),NODRAW;
HH:=CROSS( BACKSET(REFX(S,1)||ISLASTBAR&&DIFF>DEA,HHVBARS(H,BARSLAST(J)+1)+1),0.5),NODRAW;
DRAWLINE1(HH,H,LL,L,0),COLORGREEN,LINETHICK1;
DRAWLINE1(LL,L,HH,H,0),COLORRED,LINETHICK1;
A:=BACKSET(ISLASTBAR,SUMBARS(HH||LL,2));
HHH:=REFX1(VALUEWHEN(HH,H),9999);
LLL:=REFX1(VALUEWHEN(LL,L),9999);
DRAWSL(A,HHH-0.382*(HHH-LLL),0,1,0,COLORRED);
DRAWSL(A,HHH-0.500*(HHH-LLL),0,1,0,COLORWHITE);
DRAWSL(A,HHH-0.618*(HHH-LLL),0,1,0,COLORGREEN);
DRAWNUMBER(CROSS(A,0.5),HHH-0.382*(HHH-LLL),HHH-0.382*(HHH-LLL),2,COLORRED),VALIGN2;
DRAWTEXT(CROSS(A,0.5),HHH-0.382*(HHH-LLL),'0.382'),COLORRED,VALIGN0;
DRAWNUMBER(CROSS(A,0.5),HHH-0.500*(HHH-LLL),HHH-0.382*(HHH-LLL),2,COLORWHITE),VALIGN2;
DRAWTEXT(CROSS(A,0.5),HHH-0.500*(HHH-LLL),'0.382'),COLORWHITE,VALIGN0;
DRAWNUMBER(CROSS(A,0.5),HHH-0.618*(HHH-LLL),HHH-0.382*(HHH-LLL),2,COLORGREEN),VALIGN2;
DRAWTEXT(CROSS(A,0.5),HHH-0.618*(HHH-LLL),'0.382'),COLORGREEN,VALIGN0;来源: WWW.CXH99.COM
-
文华客服:
数字显示不对 都是0.382 重新帮我修改一下 谢谢
-
网友回复:
参考:
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。
DEA:= EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均
MACD:=2*(DIFF-DEA),COLORSTICK;//DIFF减DEA的2倍画柱状线
J:=CROSS(DIFF,DEA);
S:=CROSSDOWN(DIFF,DEA);
LL:=CROSS( BACKSET(REFX(J,1)||ISLASTBAR&&DIFF<DEA,LLVBARS(L,BARSLAST(S)+1)+1),0.5),NODRAW;
HH:=CROSS( BACKSET(REFX(S,1)||ISLASTBAR&&DIFF>DEA,HHVBARS(H,BARSLAST(J)+1)+1),0.5),NODRAW;
DRAWLINE1(HH,H,LL,L,0),COLORGREEN,LINETHICK1;
DRAWLINE1(LL,L,HH,H,0),COLORRED,LINETHICK1;
A:=BACKSET(ISLASTBAR,SUMBARS(HH||LL,2));
HHH:=REFX1(VALUEWHEN(HH,H),9999);
LLL:=REFX1(VALUEWHEN(LL,L),9999);
DRAWSL(A,HHH-0.382*(HHH-LLL),0,1,0,COLORRED);
DRAWSL(A,HHH-0.500*(HHH-LLL),0,1,0,COLORWHITE);
DRAWSL(A,HHH-0.618*(HHH-LLL),0,1,0,COLORGREEN);
DRAWNUMBER(CROSS(A,0.5),HHH-0.382*(HHH-LLL),HHH-0.382*(HHH-LLL),2,COLORRED),VALIGN2;
DRAWTEXT(CROSS(A,0.5),HHH-0.382*(HHH-LLL),'0.382'),COLORRED,VALIGN0;
DRAWNUMBER(CROSS(A,0.5),HHH-0.500*(HHH-LLL),HHH-0.382*(HHH-LLL),2,COLORWHITE),VALIGN2;
DRAWTEXT(CROSS(A,0.5),HHH-0.500*(HHH-LLL),'0.500),COLORWHITE,VALIGN0;
DRAWNUMBER(CROSS(A,0.5),HHH-0.618*(HHH-LLL),HHH-0.382*(HHH-LLL),2,COLORGREEN),VALIGN2;
DRAWTEXT(CROSS(A,0.5),HHH-0.618*(HHH-LLL),'0.618),COLORGREEN,VALIGN0; -
网友回复:
第17行无法识别
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容