恢复正常K线 [文华财经]
-
咨询内容:
老师,新年好!麻烦把下面公式中的K线颜色恢复成正常K线,其他不变,谢谢!
//MA5:MA(C,5),COLORWHITE;
STEP1:=2/100;
MVALUE1:=120/100;//20
SARLINE:SAR(4,STEP1,MVALUE1),NODRAW;
IF(SARLINE<0,ABS(SARLINE),NULL),CIRCLEDOT,COLORCYAN;
IF(SARLINE>0,SARLINE,NULL),CIRCLEDOT,COLORRED;
MA60:MA(C,60),LINETHICK1,COLORMAGENTA;
XCLOSE2:=EMA((OPEN+HIGH+LOW+CLOSE)/4,3);
//PARTLINE1((MA60>=XCLOSE2),MA60),LINETHICK3,COLORBLUE;
//PARTLINE1((MA60<XCLOSE2),MA60),LINETHICK3,COLORMAGENTA;
//DRAWCOLORLINE(MA60>REF(MA60,1),MA60,COLORRED,COLORGREEN),LINETHICK3;
//--飘带变色
DIFF1:=(EMA(CLOSE,12) - EMA(CLOSE,26))*4.1;
DEA1:=EMA(DIFF1,9);
DKB:MA60+DIFF1;
DKA:MA60+DEA1;
FILLRGN(DKB>DKA,DKB,DKA,RGB(81,18,2));
FILLRGN(DKB<DKA,DKB,DKA, COLOR007300);
DRAWCOLORKLINE(DKB>DKA&&ISDOWN,COLORMAGENTA,0);
DRAWCOLORKLINE(DKB>DKA&&ISDOWN=0,COLORMAGENTA,1);
CROSS(DKB>DKA,0.5),SOUND('';
DRAWCOLORKLINE(DKB<DKA&&ISDOWN,COLORCYAN,0);
DRAWCOLORKLINE(DKB<DKA&&ISDOWN=0,COLORCYAN,1);
CROSS(DKB<DKA,0.5),SOUND('';
DRAWCOLORLINE(DKB>DKA,DKB,COLORRED,COLORGREEN);DRAWCOLORLINE(DKB>DKA,DKA,COLORRED,COLORGREEN);
X:=PERIOD=1||PERIOD=3||PERIOD=5||PERIOD=7||PERIOD=8;
Q:=BACKSET(ISLASTBAR,SUMBARS(DAYBARPOS=1,5));
DRAWSL(CROSS(C,MA60)&&DKB>DKA&&X&&Q,C,0,10,0,COLORYELLOW);
DRAWSL(CROSSDOWN(C,MA60)&&DKB<DKA&&X&&Q,C,0,10,0,COLORYELLOW);
DRAWTEXT(CROSS(SARLINE>0&&DKB>DKA,0.5),L,'#39),VALIGN0;
DRAWTEXT(CROSS(SARLINE<0&&DKB<DKA,0.5),H,'#39);
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA),COLORSTICK;
MA21:MA(C,21),COLORYELLOW,LINETHICK2;
DRAWCOLORKLINE(CROSS(DIFF>0&&MACD>0&&MA21>REF(MA21,1),0.5),COLORYELLOW,0);
DRAWCOLORKLINE(CROSS(DIFF<0&&MACD<0&&MA21<REF(MA21,1),0.5),COLORGREEN,0);
DRAWCOLORKLINE(CROSSDOWN(DIFF,DEA)&&DIFF>0,RGB(0,128,255),0);
DRAWCOLORKLINE(CROSS(DIFF,DEA)&&DIFF<0,COLORWHITE,0);
//DRAWTEXT(CROSS(DIFF>0&&MACD>0&&MA21>REF(MA21,1),0.5),H,'',COLORYELLOW,FONTSIZE25;
//DRAWTEXT(CROSS(DIFF<0&&MACD<0&&MA21<REF(MA21,1),0.5),H,'',COLORGREEN,FONTSIZE25;
DRAWTEXT(CROSSDOWN(DIFF,DEA)&&DIFF>0,H,'',RGB(128,128,255),FONTSIZE25;
DRAWTEXT(CROSS(DIFF,DEA)&&DIFF<0,H,'',COLORWHITE,FONTSIZE25;
//MA20:MA(C,20),COLORRED,NODRAW;
//DRAWCOLORLINE(MA20>REF(MA20,1),MA21,COLORYELLOW,COLORCYAN),LINETHICK2;来源:程序化99
-
文华技术人员:
参考:
//MA5:MA(C,5),COLORWHITE;STEP1:=2/100;MVALUE1:=120/100;//20SARLINE:SAR(4,STEP1,MVALUE1),NODRAW;IF(SARLINE<0,ABS(SARLINE),NULL),CIRCLEDOT,COLORCYAN;IF(SARLINE>0,SARLINE,NULL),CIRCLEDOT,COLORRED;
MA60:MA(C,60),LINETHICK1,COLORMAGENTA;XCLOSE2:=EMA((OPEN+HIGH+LOW+CLOSE)/4,3);//PARTLINE1((MA60>=XCLOSE2),MA60),LINETHICK3,COLORBLUE;//PARTLINE1((MA60<XCLOSE2),MA60),LINETHICK3,COLORMAGENTA;//DRAWCOLORLINE(MA60>REF(MA60,1),MA60,COLORRED,COLORGREEN),LINETHICK3;//--飘带变色DIFF1:=(EMA(CLOSE,12) - EMA(CLOSE,26))*4.1;DEA1:=EMA(DIFF1,9); DKB:MA60+DIFF1;DKA:MA60+DEA1;FILLRGN(DKB>DKA,DKB,DKA,RGB(81,18,2)); FILLRGN(DKB<DKA,DKB,DKA, COLOR007300);
//DRAWCOLORKLINE(DKB>DKA&&ISDOWN,COLORMAGENTA,0);//DRAWCOLORKLINE(DKB>DKA&&ISDOWN=0,COLORMAGENTA,1);CROSS(DKB>DKA,0.5),SOUND('A');//DRAWCOLORKLINE(DKB<DKA&&ISDOWN,COLORCYAN,0);//DRAWCOLORKLINE(DKB<DKA&&ISDOWN=0,COLORCYAN,1);CROSS(DKB<DKA,0.5),SOUND('A');DRAWCOLORLINE(DKB>DKA,DKB,COLORRED,COLORGREEN);DRAWCOLORLINE(DKB>DKA,DKA,COLORRED,COLORGREEN);X:=PERIOD=1||PERIOD=3||PERIOD=5||PERIOD=7||PERIOD=8;Q:=BACKSET(ISLASTBAR,SUMBARS(DAYBARPOS=1,5));DRAWSL(CROSS(C,MA60)&&DKB>DKA&&X&&Q,C,0,10,0,COLORYELLOW);DRAWSL(CROSSDOWN(C,MA60)&&DKB<DKA&&X&&Q,C,0,10,0,COLORYELLOW);DRAWTEXT(CROSS(SARLINE>0&&DKB>DKA,0.5),L, ' '),VALIGN0;DRAWTEXT(CROSS(SARLINE<0&&DKB<DKA,0.5),H, ' ');DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA),COLORSTICK;MA21:MA(C,21),COLORYELLOW,LINETHICK2;/*DRAWCOLORKLINE(CROSS(DIFF>0&&MACD>0&&MA21>REF(MA21,1),0.5),COLORYELLOW,0);DRAWCOLORKLINE(CROSS(DIFF<0&&MACD<0&&MA21<REF(MA21,1),0.5),COLORGREEN,0);DRAWCOLORKLINE(CROSSDOWN(DIFF,DEA)&&DIFF>0,RGB(0,128,255),0);DRAWCOLORKLINE(CROSS(DIFF,DEA)&&DIFF<0,COLORWHITE,0);*/DRAWKLINE1(H,O,L,C);//DRAWTEXT(CROSS(DIFF>0&&MACD>0&&MA21>REF(MA21,1),0.5),H,'B'),COLORYELLOW,FONTSIZE25;//DRAWTEXT(CROSS(DIFF<0&&MACD<0&&MA21<REF(MA21,1),0.5),H,'S'),COLORGREEN,FONTSIZE25;DRAWTEXT(CROSSDOWN(DIFF,DEA)&&DIFF>0,H,'H'),RGB(128,128,255),FONTSIZE25;DRAWTEXT(CROSS(DIFF,DEA)&&DIFF<0,H,'F'),COLORWHITE,FONTSIZE25;//MA20:MA(C,20),COLORRED,NODRAW;//DRAWCOLORLINE(MA20>REF(MA20,1),MA21,COLORYELLOW,COLORCYAN),LINETHICK2;来源: WWW.CXH99.COM
- 文华客服: 31行: 来源: WWW.CXH99.COM
- 文华客服:DRAWTEXT(CROSS(SARLINE>0&&DKB>DKA,0.5),L,',VALIGN0; 来源: WWW.CXH99.COM
-
文华客服:
来源: WWW.CXH99.COM -
文华客服:老师,2楼公式中的31行加载时显示“是个无法识别的类型”,在修改一下,谢谢!
- 网友回复: 2楼重新编辑了,您重新复制看下。
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容