变色线编写 [文华财经]
-
咨询内容:
老师好 从竹线垂直变色带向右侧画同色粗直色线 , 至下一个不同色竹线垂直色带止,依次循环,见截图。//NK5:=5;K1:=55;K2:=50;N4:=3;LC :=REF(CLOSE,1);RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;RSI3:=SMA(MAX(CLOSE-LC,0),18,1)/SMA(ABS(CLOSE-LC),18,1)*100;MMS:=MA(3*RSI2-2*SMA(MAX(CLOSE-LC,0),16,1)/SMA(ABS(CLOSE-LC),16,1)*100,3);FF:=FORCAST(REF(CLOSE,1),N4);JCS:=FF;SMA10:=SMA(C,4,2);//求的10周期的柱线实体扩展指数加权移动平均。权重为3。T1:=MMS>REF(MMS,1)&&JCS>REF(JCS,1)&&SMA10>REF(SMA10,1);T2:=MMS<REF(MMS,1)&&JCS<REF(JCS,1)&&SMA10<REF(SMA10,1);N1:=BARSLAST(T1)+1;N2:=BARSLAST(T2)+1;HH:=BACKSET(H>HV(H,NK5)||ISLASTBAR,BARSLAST(L<LV(L,NK5))+1),NODRAW;LL:=BACKSET(L<LV(L,NK5)||ISLASTBAR,BARSLAST(H>HV(H,NK5))+1),NODRAW;//DRAWTEXT(LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000>10000,H,'●'),FONTSIZE30,COLORGREEN;//DRAWTEXT(L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000>10000,L,'●'),FONTSIZE30,COLORRED,VALIGN0;//DRAWTEXT(LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000<10000,H,'●'),FONTSIZE30,COLORGREEN;//DRAWTEXT(L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000<10000,L,'●'),FONTSIZE30,COLORRED,VALIGN0;X1:=BARSLAST(LL&&H>HV(H,NK5)&&REFX1(N1<N2||REFX(N1<N2,1),1));X2:=BARSLAST(L<LV(L,NK5)&&HH&&REFX1(N1>=N2||REFX(N1>=N2,1),1));//FILLRGN(X2<X1||LL&&H>HV(H,NK5),K1,K2,COLORRED);//FILLRGN(X2>X1||L<LV(L,NK5)&&HH,K1,K2,COLORGREEN);//DRAWTEXT(REFX(ISLASTBAR,10),(K1+K2)/2,'千位高低点延伸并列JCSMMSSMAMMS带'),COLORBLACK,FONTSIZE15,COLORBLACK,ALIGN0,VALIGN1;//REFLINE:0,100; COND1:=LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000>10000 || LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000<10000;COND2:=L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000>10000 || L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000<10000;VERTLINE(COND1,COLORGREEN),LINETHICK7;DRAWSL(COND1,O,0,-0.35,0,COLORGREEN),LINETHICK2;DRAWSL(COND1,C,0,0.35,0,COLORGREEN),LINETHICK2;DRAWLINE(COND1,L,COND1,H,COLORGREEN),LINETHICK2;DRAWSL(COND2,O,0,-0.35,0,COLORRED),LINETHICK2;DRAWSL(COND2,C,0,0.35,0,COLORRED),LINETHICK2;DRAWLINE(COND2,L,COND2,H,COLORRED),LINETHICK2;VERTLINE(COND2,COLORRED),LINETHICK7;
来源:程序化99
-
文华技术人员:
划线高度,在红色位置调整,参考:
NK5:=5;K1:=55;K2:=50;N4:=3;LC :=REF(CLOSE,1);RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;RSI3:=SMA(MAX(CLOSE-LC,0),18,1)/SMA(ABS(CLOSE-LC),18,1)*100;MMS:=MA(3*RSI2-2*SMA(MAX(CLOSE-LC,0),16,1)/SMA(ABS(CLOSE-LC),16,1)*100,3);FF:=FORCAST(REF(CLOSE,1),N4);JCS:=FF;SMA10:=SMA(C,4,2);//求的10周期的柱线实体扩展指数加权移动平均。权重为3。T1:=MMS>REF(MMS,1)&&JCS>REF(JCS,1)&&SMA10>REF(SMA10,1);T2:=MMS<REF(MMS,1)&&JCS<REF(JCS,1)&&SMA10<REF(SMA10,1);N1:=BARSLAST(T1)+1;N2:=BARSLAST(T2)+1;HH:=BACKSET(H>HV(H,NK5)||ISLASTBAR,BARSLAST(L<LV(L,NK5))+1),NODRAW;LL:=BACKSET(L<LV(L,NK5)||ISLASTBAR,BARSLAST(H>HV(H,NK5))+1),NODRAW;//DRAWTEXT(LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000>10000,H,'●'),FONTSIZE30,COLORGREEN;//DRAWTEXT(L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000>10000,L,'●'),FONTSIZE30,COLORRED,VALIGN0;//DRAWTEXT(LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000<10000,H,'●'),FONTSIZE30,COLORGREEN;//DRAWTEXT(L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000<10000,L,'●'),FONTSIZE30,COLORRED,VALIGN0;X1:=BARSLAST(LL&&H>HV(H,NK5)&&REFX1(N1<N2||REFX(N1<N2,1),1));X2:=BARSLAST(L<LV(L,NK5)&&HH&&REFX1(N1>=N2||REFX(N1>=N2,1),1));//FILLRGN(X2<X1||LL&&H>HV(H,NK5),K1,K2,COLORRED);//FILLRGN(X2>X1||L<LV(L,NK5)&&HH,K1,K2,COLORGREEN);//DRAWTEXT(REFX(ISLASTBAR,10),(K1+K2)/2,'千位高低点延伸并列JCSMMSSMAMMS带'),COLORBLACK,FONTSIZE15,COLORBLACK,ALIGN0,VALIGN1;//REFLINE:0,100; COND1:=LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000>10000 || LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000<10000;COND2:=L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000>10000 || L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000<10000;VERTLINE(COND1,COLORGREEN),LINETHICK7;DRAWSL(COND1,O,0,-0.35,0,COLORGREEN),LINETHICK2;DRAWSL(COND1,C,0,0.35,0,COLORGREEN),LINETHICK2;DRAWLINE(COND1,L,COND1,H,COLORGREEN),LINETHICK2;DRAWSL(COND2,O,0,-0.35,0,COLORRED),LINETHICK2;DRAWSL(COND2,C,0,0.35,0,COLORRED),LINETHICK2;DRAWLINE(COND2,L,COND2,H,COLORRED),LINETHICK2;VERTLINE(COND2,COLORRED),LINETHICK7;MM:=100;DRAWSL(VALUEWHEN(COND1||COND2,COND1)&&NOT(COND2),MM,0,0.9,0,COLORGREEN),LINETHICK5;DRAWSL(VALUEWHEN(COND1||COND2,COND2)&&NOT(COND1),MM,0,0.9,0,COLORRED),LINETHICK5;
来源: WWW.CXH99.COM
-
文华客服:
请老师修正 见截图说明,延伸直线颜色开始位置 结束位置不对,
文件名:睿期大户室截图20220122192453.jpg -
网友回复:
参考:
NK5:=5; K1:=55; K2:=50; N4:=3; LC :=REF(CLOSE,1); RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100; RSI3:=SMA(MAX(CLOSE-LC,0),18,1)/SMA(ABS(CLOSE-LC),18,1)*100; MMS:=MA(3*RSI2-2*SMA(MAX(CLOSE-LC,0),16,1)/SMA(ABS(CLOSE-LC),16,1)*100,3); FF:=FORCAST(REF(CLOSE,1),N4); JCS:=FF; SMA10:=SMA(C,4,2);//求的10周期的柱线实体扩展指数加权移动平均。权重为3。 T1:=MMS>REF(MMS,1)&&JCS>REF(JCS,1)&&SMA10>REF(SMA10,1); T2:=MMS<REF(MMS,1)&&JCS<REF(JCS,1)&&SMA10<REF(SMA10,1); N1:=BARSLAST(T1)+1; N2:=BARSLAST(T2)+1; HH:=BACKSET(H>HV(H,NK5)||ISLASTBAR,BARSLAST(L<LV(L,NK5))+1),NODRAW; LL:=BACKSET(L<LV(L,NK5)||ISLASTBAR,BARSLAST(H>HV(H,NK5))+1),NODRAW; //DRAWTEXT(LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000>10000,H,'',FONTSIZE30,COLORGREEN; //DRAWTEXT(L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000>10000,L,'',FONTSIZE30,COLORRED,VALIGN0; //DRAWTEXT(LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000<10000,H,'',FONTSIZE30,COLORGREEN; //DRAWTEXT(L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000<10000,L,'',FONTSIZE30,COLORRED,VALIGN0; X1:=BARSLAST(LL&&H>HV(H,NK5)&&REFX1(N1<N2||REFX(N1<N2,1),1)); X2:=BARSLAST(L<LV(L,NK5)&&HH&&REFX1(N1>=N2||REFX(N1>=N2,1),1)); //FILLRGN(X2<X1||LL&&H>HV(H,NK5),K1,K2,COLORRED); //FILLRGN(X2>X1||L<LV(L,NK5)&&HH,K1,K2,COLORGREEN); //DRAWTEXT(REFX(ISLASTBAR,10),(K1+K2)/2,'位高低点延伸并列JCSMMSSMAMMS带',COLORBLACK,FONTSIZE15,COLORBLACK,ALIGN0,VALIGN1; //REFLINE:0,100; COND1:=LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000>10000 || LL&&H>HV(H,NK5)&&H-INTPART(H/100000)*100000<10000; COND2:=L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000>10000 || L<LV(L,NK5)&&HH&&L-INTPART(L/100000)*100000<10000; VERTLINE(COND1,COLORGREEN),LINETHICK7; DRAWSL(COND1,O,0,-0.35,0,COLORGREEN),LINETHICK2; DRAWSL(COND1,C,0,0.35,0,COLORGREEN),LINETHICK2; DRAWLINE(COND1,L,COND1,H,COLORGREEN),LINETHICK2; DRAWSL(COND2,O,0,-0.35,0,COLORRED),LINETHICK2; DRAWSL(COND2,C,0,0.35,0,COLORRED),LINETHICK2; DRAWLINE(COND2,L,COND2,H,COLORRED),LINETHICK2; VERTLINE(COND2,COLORRED),LINETHICK7; MM:=100; DRAWSL(VALUEWHEN(COND1||COND2,COND1)&&NOT(COND2),MM,0,0.9,0,COLORGREEN),LINETHICK5; DRAWSL(VALUEWHEN(COND1||COND2,COND2)&&NOT(COND1),MM,0,0.9,0,COLORRED),LINETHICK5; DRAWSL(VALUEWHEN(COND1||COND2,COND1)&&NOT(COND2),MM,0,-0.45,0,COLORGREEN),LINETHICK5; DRAWSL(VALUEWHEN(COND1||COND2,COND2)&&NOT(COND1),MM,0,-0.45,0,COLORRED),LINETHICK5;
- 网友回复: 请老师把竹线改为K线。谢谢老师!
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容