老师帮我把这个公式修改,其他去掉只留损空多损四条线 [博易POBO]
咨询内容:
多止盈:(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1+EMA(EMA(H,25),25),NODRAW,COLORWHITE;
空止损:(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*3.5+EMA(EMA(H,25),25),NODRAW,COLORYELLOW;
空止盈:EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1,NODRAW,COLORWHITE;
短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6) +13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12) +7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+ REF(H,20))/210,COLORBLUE,LINETHICK1; 短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6) +13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12) +7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+ REF(L,20))/210,COLORBLUE,LINETHICK1; D90H:=EMA(短高H,90),COLORRED,LINETHICK1; D90L:=EMA(短低L,90),COLORRED,LINETHICK1; D90差:=D90H-D90L; D90顶:=D90H+D90差*2,COLORRED,LINETHICK1; D90底:=D90L-D90差*2,COLORRED,LINETHICK1;
高0:=(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1+EMA(EMA(H,25),25),LINETHICK1,COLORWHITE;
低0:=EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1,LINETHICK1,COLORWHITE; 多头定位:=低0>=D90底 AND 高0>=D90顶; 空头定位:=高0<=D90顶 AND 低0<=D90底; 震荡定位:=低0>=D90底 AND 高0<=D90顶;
短顶:=(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*2+EMA(EMA(H,25),25),LINETHICK2,COLORGREEN;
短底:=EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*2,LINETHICK2,COLORGREEN; 短线收盘:=(C-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED; 短线开盘:=(O-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED; 短线高盘:=(H-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED; 短线低盘:=(L-短底)/(短顶-短底)*100000,LINETHICK0,COLORRED; 顶1:=120000,COLORYELLOW,LINETHICK3; 底1:=-20000,COLORYELLOW,LINETHICK3;
STICKLINE(多头定位=1,顶1,底1,11,0),COLOR000066; STICKLINE(空头定位=1,顶1,底1,11,0),COLOR003300; STICKLINE(震荡定位=1,顶1,底1,11,0),COLOR555555;
震荡顶:=(EMA(EMA(短线高盘,25),25)-EMA(EMA(短线低盘,25),25))*1+EMA(EMA(短线高盘,25),25),POINTDOT,COLORWHITE;
震荡底:=EMA(EMA(短线低盘,25),25)-(EMA(EMA(短线高盘,25),25)-EMA(EMA(短线低盘,25),25))*1,POINTDOT,COLORWHITE;
做空:=80000,COLORWHITE,LINETHICK1; 做多:=20000,COLORWHITE,LINETHICK1; 空损:=120000,COLORMAGENTA,LINETHICK2; 多损:=-20000,COLORMAGENTA,LINETHICK2; 多减仓:=65000,POINTDOT,COLORRED; 空减仓:=35000,POINTDOT,COLORGREEN; DRAWTEXT(ISLASTBAR,120000,'损'),COLORMAGENTA; DRAWTEXT(ISLASTBAR,80000,'空'),COLORWHITE; DRAWTEXT(ISLASTBAR,65000,'减'),COLORRED; DRAWTEXT(ISLASTBAR,35000,'减'),COLORGREEN; DRAWTEXT(ISLASTBAR,20000,'多'),COLORWHITE; DRAWTEXT(ISLASTBAR,-20000,'损'),COLORMAGENTA; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; 今D:=EMA(D,3); 昨D:=REF(今D,1); STICKLINE(今D>=昨D,短线低盘,短线高盘,0,0),COLORRED; STICKLINE(今D>=昨D,短线收盘,短线开盘,8,0),COLORRED; STICKLINE(今D<=昨D,短线低盘,短线高盘,0,0),COLORGREEN; STICKLINE(今D<=昨D,短线收盘,短线开盘,8,0),COLORGREEN; 白色点多定位1:=短线低盘<做多 AND 短线高盘>做多; 白色点空定位1:=短线高盘>做空 AND 短线低盘<做空;
STICKLINE(白色点多定位1=1,短线低盘,做多,8,0),COLORWHITE;
STICKLINE(白色点空定位1=1,短线高盘,做空,8,0),COLORWHITE;
白色点多定位2:=短线高盘<做多; 白色点空定位2:=短线低盘>做空;
STICKLINE(白色点多定位2=1,短线低盘,短线高盘,0,0),COLORWHITE;
STICKLINE(白色点多定位2=1,短线收盘,短线开盘,8,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线低盘,短线高盘,0,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线收盘,短线开盘,8,0),COLORWHITE;
多头红色点:=今D>昨D;
空头红色点:=今D<昨D; 多头红色点定位1:=白色点多定位1=1 AND 多头红色点=1;
空头红色点定位1:=白色点空定位1=1 AND 空头红色点=1;
STICKLINE(多头红色点定位1=1,短线低盘,做多,8,0),COLORMAGENTA;
STICKLINE(空头红色点定位1=1,短线高盘,做空,8,0),COLORMAGENTA;
多头红色点定位2:=白色点多定位2=1 AND 多头红色点=1;
空头红色点定位2:=白色点空定位2=1 AND 空头红色点=1;
STICKLINE(多头红色点定位2=1,短线低盘,短线高盘,0,0),COLORMAGENTA;
STICKLINE(多头红色点定位2=1,短线收盘,短线开盘,8,0),COLORMAGENTA;
STICKLINE(空头红色点定位2=1,短线低盘,短线高盘,0,0),COLORMAGENTA;
STICKLINE(空头红色点定位2=1,短线收盘,短线开盘,8,0),COLORMAGENTA;
多头多定位:=CROSS(做多,短线低盘) AND 多头定位=1;
多头平定位:=CROSS(短线高盘,做空) AND 多头定位=1 AND 震荡定位=0;
空头空定位:=CROSS(短线高盘,做空) AND 空头定位=1;
空头平定位:=CROSS(做多,短线低盘) AND 空头定位=1 AND 震荡定位=0;
震荡多定位:=CROSS(做多,短线低盘) AND 震荡定位=1; 震荡空定位:=CROSS(短线高盘,做空) AND 震荡定位=1;
DRAWICON(空头平定位=1,短线低盘,78); DRAWICON(多头平定位=1,短线高盘,67);
DRAWICON(多头多定位=1 OR 震荡多定位=1,短线低盘,48);
DRAWICON(空头空定位=1 OR 震荡空定位=1,短线高盘,49);
STICKLINE(1,80000,80000,15,0),COLORWHITE;
STICKLINE(1,20000,20000,15,0),COLORWHITE;
STICKLINE(1,120000,120000,15,0),COLORMAGENTA;
STICKLINE(1,-20000,-20000,15,0),COLORMAGENTA;
STICKLINE(1,65000,65000,2,0),COLORRED;
STICKLINE(1,35000,35000,2,0),COLORGREEN;
多止盈:(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1+EMA(EMA(H,25),25),NODRAW,COLORWHITE;
空止损:(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*3.5+EMA(EMA(H,25),25),NODRAW,COLORYELLOW;
空止盈:EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1,NODRAW,COLORWHITE;
短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6) +13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12) +7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+ REF(H,20))/210,COLORBLUE,LINETHICK1; 短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6) +13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12) +7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+ REF(L,20))/210,COLORBLUE,LINETHICK1; D90H:=EMA(短高H,90),COLORRED,LINETHICK1; D90L:=EMA(短低L,90),COLORRED,LINETHICK1; D90差:=D90H-D90L; D90顶:=D90H+D90差*2,COLORRED,LINETHICK1; D90底:=D90L-D90差*2,COLORRED,LINETHICK1;
高0:=(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1+EMA(EMA(H,25),25),LINETHICK1,COLORWHITE;
低0:=EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1,LINETHICK1,COLORWHITE; 多头定位:=低0>=D90底 AND 高0>=D90顶; 空头定位:=高0<=D90顶 AND 低0<=D90底; 震荡定位:=低0>=D90底 AND 高0<=D90顶;
短顶:=(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*2+EMA(EMA(H,25),25),LINETHICK2,COLORGREEN;
短底:=EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*2,LINETHICK2,COLORGREEN;
短线收盘:=(C-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线开盘:=(O-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线高盘:=(H-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线低盘:=(L-短底)/(短顶-短底)*100000,LINETHICK0,COLORRED;
顶1:=120000,COLORYELLOW,LINETHICK3;
底1:=-20000,COLORYELLOW,LINETHICK3;
STICKLINE(多头定位=1,顶1,底1,11,0),COLOR000066;
STICKLINE(空头定位=1,顶1,底1,11,0),COLOR003300;
STICKLINE(震荡定位=1,顶1,底1,11,0),COLOR555555;
震荡顶:=(EMA(EMA(短线高盘,25),25)-EMA(EMA(短线低盘,25),25))*1+EMA(EMA(短线高盘,25),25),POINTDOT,COLORWHITE;
震荡底:=EMA(EMA(短线低盘,25),25)-(EMA(EMA(短线高盘,25),25)-EMA(EMA(短线低盘,25),25))*1,POINTDOT,COLORWHITE;
做空:=80000,COLORWHITE,LINETHICK1;
做多:=20000,COLORWHITE,LINETHICK1;
空损:=120000,COLORMAGENTA,LINETHICK2;
多损:=-20000,COLORMAGENTA,LINETHICK2;
多减仓:=65000,POINTDOT,COLORRED;
空减仓:=35000,POINTDOT,COLORGREEN; DRAWTEXT(ISLASTBAR,120000,'损'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,80000,'空'),COLORWHITE; DRAWTEXT(ISLASTBAR,65000,'减'),COLORRED;
DRAWTEXT(ISLASTBAR,35000,'减'),COLORGREEN; DRAWTEXT(ISLASTBAR,20000,'多'),COLORWHITE;
DRAWTEXT(ISLASTBAR,-20000,'损'),COLORMAGENTA; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; 今D:=EMA(D,3);
昨D:=REF(今D,1); STICKLINE(今D>=昨D,短线低盘,短线高盘,0,0),COLORRED;
STICKLINE(今D>=昨D,短线收盘,短线开盘,8,0),COLORRED;
STICKLINE(今D<=昨D,短线低盘,短线高盘,0,0),COLORGREEN;
STICKLINE(今D<=昨D,短线收盘,短线开盘,8,0),COLORGREEN;
白色点多定位1:=短线低盘<做多 AND 短线高盘>做多;
白色点空定位1:=短线高盘>做空 AND 短线低盘<做空;
STICKLINE(白色点多定位1=1,短线低盘,做多,8,0),COLORWHITE;
STICKLINE(白色点空定位1=1,短线高盘,做空,8,0),COLORWHITE;
白色点多定位2:=短线高盘<做多; 白色点空定位2:=短线低盘>做空;
STICKLINE(白色点多定位2=1,短线低盘,短线高盘,0,0),COLORWHITE;
STICKLINE(白色点多定位2=1,短线收盘,短线开盘,8,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线低盘,短线高盘,0,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线收盘,短线开盘,8,0),COLORWHITE;
多头红色点:=今D>昨D;
空头红色点:=今D<昨D; 多头红色点定位1:=白色点多定位1=1 AND 多头红色点=1;
空头红色点定位1:=白色点空定位1=1 AND 空头红色点=1;
STICKLINE(多头红色点定位1=1,短线低盘,做多,8,0),COLORMAGENTA;
STICKLINE(空头红色点定位1=1,短线高盘,做空,8,0),COLORMAGENTA;
多头红色点定位2:=白色点多定位2=1 AND 多头红色点=1;
空头红色点定位2:=白色点空定位2=1 AND 空头红色点=1;
STICKLINE(多头红色点定位2=1,短线低盘,短线高盘,0,0),COLORMAGENTA;
STICKLINE(多头红色点定位2=1,短线收盘,短线开盘,8,0),COLORMAGENTA;
STICKLINE(空头红色点定位2=1,短线低盘,短线高盘,0,0),COLORMAGENTA;
STICKLINE(空头红色点定位2=1,短线收盘,短线开盘,8,0),COLORMAGENTA;
多头多定位:=CROSS(做多,短线低盘) AND 多头定位=1;
多头平定位:=CROSS(短线高盘,做空) AND 多头定位=1 AND 震荡定位=0;
空头空定位:=CROSS(短线高盘,做空) AND 空头定位=1;
空头平定位:=CROSS(做多,短线低盘) AND 空头定位=1 AND 震荡定位=0;
震荡多定位:=CROSS(做多,短线低盘) AND 震荡定位=1; 震荡空定位:=CROSS(短线高盘,做空) AND 震荡定位=1;
DRAWICON(空头平定位=1,短线低盘,78); DRAWICON(多头平定位=1,短线高盘,67);
DRAWICON(多头多定位=1 OR 震荡多定位=1,短线低盘,48);
DRAWICON(空头空定位=1 OR 震荡空定位=1,短线高盘,49);
STICKLINE(1,80000,80000,15,0),COLORWHITE;
STICKLINE(1,20000,20000,15,0),COLORWHITE;
STICKLINE(1,120000,120000,15,0),COLORMAGENTA;
STICKLINE(1,-20000,-20000,15,0),COLORMAGENTA;
{STICKLINE(1,65000,65000,2,0),COLORRED;}
{STICKLINE(1,35000,35000,2,0),COLORGREEN;} {DRAWTEXT(ISLASTBAR,65000,'减'),COLORRED;
DRAWTEXT(ISLASTBAR,35000,'减'),COLORGREEN;} 来源 程序化久久网
老师帮我把这个公式修改,其他去掉只留损空多损四条线
多止损:EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*3.5,NODRAW,COLORYELLOW;多止盈:(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1+EMA(EMA(H,25),25),NODRAW,COLORWHITE;
空止损:(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*3.5+EMA(EMA(H,25),25),NODRAW,COLORYELLOW;
空止盈:EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1,NODRAW,COLORWHITE;
短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6) +13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12) +7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+ REF(H,20))/210,COLORBLUE,LINETHICK1; 短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6) +13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12) +7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+ REF(L,20))/210,COLORBLUE,LINETHICK1; D90H:=EMA(短高H,90),COLORRED,LINETHICK1; D90L:=EMA(短低L,90),COLORRED,LINETHICK1; D90差:=D90H-D90L; D90顶:=D90H+D90差*2,COLORRED,LINETHICK1; D90底:=D90L-D90差*2,COLORRED,LINETHICK1;
高0:=(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1+EMA(EMA(H,25),25),LINETHICK1,COLORWHITE;
低0:=EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1,LINETHICK1,COLORWHITE; 多头定位:=低0>=D90底 AND 高0>=D90顶; 空头定位:=高0<=D90顶 AND 低0<=D90底; 震荡定位:=低0>=D90底 AND 高0<=D90顶;
短顶:=(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*2+EMA(EMA(H,25),25),LINETHICK2,COLORGREEN;
短底:=EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*2,LINETHICK2,COLORGREEN; 短线收盘:=(C-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED; 短线开盘:=(O-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED; 短线高盘:=(H-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED; 短线低盘:=(L-短底)/(短顶-短底)*100000,LINETHICK0,COLORRED; 顶1:=120000,COLORYELLOW,LINETHICK3; 底1:=-20000,COLORYELLOW,LINETHICK3;
STICKLINE(多头定位=1,顶1,底1,11,0),COLOR000066; STICKLINE(空头定位=1,顶1,底1,11,0),COLOR003300; STICKLINE(震荡定位=1,顶1,底1,11,0),COLOR555555;
震荡顶:=(EMA(EMA(短线高盘,25),25)-EMA(EMA(短线低盘,25),25))*1+EMA(EMA(短线高盘,25),25),POINTDOT,COLORWHITE;
震荡底:=EMA(EMA(短线低盘,25),25)-(EMA(EMA(短线高盘,25),25)-EMA(EMA(短线低盘,25),25))*1,POINTDOT,COLORWHITE;
做空:=80000,COLORWHITE,LINETHICK1; 做多:=20000,COLORWHITE,LINETHICK1; 空损:=120000,COLORMAGENTA,LINETHICK2; 多损:=-20000,COLORMAGENTA,LINETHICK2; 多减仓:=65000,POINTDOT,COLORRED; 空减仓:=35000,POINTDOT,COLORGREEN; DRAWTEXT(ISLASTBAR,120000,'损'),COLORMAGENTA; DRAWTEXT(ISLASTBAR,80000,'空'),COLORWHITE; DRAWTEXT(ISLASTBAR,65000,'减'),COLORRED; DRAWTEXT(ISLASTBAR,35000,'减'),COLORGREEN; DRAWTEXT(ISLASTBAR,20000,'多'),COLORWHITE; DRAWTEXT(ISLASTBAR,-20000,'损'),COLORMAGENTA; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; 今D:=EMA(D,3); 昨D:=REF(今D,1); STICKLINE(今D>=昨D,短线低盘,短线高盘,0,0),COLORRED; STICKLINE(今D>=昨D,短线收盘,短线开盘,8,0),COLORRED; STICKLINE(今D<=昨D,短线低盘,短线高盘,0,0),COLORGREEN; STICKLINE(今D<=昨D,短线收盘,短线开盘,8,0),COLORGREEN; 白色点多定位1:=短线低盘<做多 AND 短线高盘>做多; 白色点空定位1:=短线高盘>做空 AND 短线低盘<做空;
STICKLINE(白色点多定位1=1,短线低盘,做多,8,0),COLORWHITE;
STICKLINE(白色点空定位1=1,短线高盘,做空,8,0),COLORWHITE;
白色点多定位2:=短线高盘<做多; 白色点空定位2:=短线低盘>做空;
STICKLINE(白色点多定位2=1,短线低盘,短线高盘,0,0),COLORWHITE;
STICKLINE(白色点多定位2=1,短线收盘,短线开盘,8,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线低盘,短线高盘,0,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线收盘,短线开盘,8,0),COLORWHITE;
多头红色点:=今D>昨D;
空头红色点:=今D<昨D; 多头红色点定位1:=白色点多定位1=1 AND 多头红色点=1;
空头红色点定位1:=白色点空定位1=1 AND 空头红色点=1;
STICKLINE(多头红色点定位1=1,短线低盘,做多,8,0),COLORMAGENTA;
STICKLINE(空头红色点定位1=1,短线高盘,做空,8,0),COLORMAGENTA;
多头红色点定位2:=白色点多定位2=1 AND 多头红色点=1;
空头红色点定位2:=白色点空定位2=1 AND 空头红色点=1;
STICKLINE(多头红色点定位2=1,短线低盘,短线高盘,0,0),COLORMAGENTA;
STICKLINE(多头红色点定位2=1,短线收盘,短线开盘,8,0),COLORMAGENTA;
STICKLINE(空头红色点定位2=1,短线低盘,短线高盘,0,0),COLORMAGENTA;
STICKLINE(空头红色点定位2=1,短线收盘,短线开盘,8,0),COLORMAGENTA;
多头多定位:=CROSS(做多,短线低盘) AND 多头定位=1;
多头平定位:=CROSS(短线高盘,做空) AND 多头定位=1 AND 震荡定位=0;
空头空定位:=CROSS(短线高盘,做空) AND 空头定位=1;
空头平定位:=CROSS(做多,短线低盘) AND 空头定位=1 AND 震荡定位=0;
震荡多定位:=CROSS(做多,短线低盘) AND 震荡定位=1; 震荡空定位:=CROSS(短线高盘,做空) AND 震荡定位=1;
DRAWICON(空头平定位=1,短线低盘,78); DRAWICON(多头平定位=1,短线高盘,67);
DRAWICON(多头多定位=1 OR 震荡多定位=1,短线低盘,48);
DRAWICON(空头空定位=1 OR 震荡空定位=1,短线高盘,49);
STICKLINE(1,80000,80000,15,0),COLORWHITE;
STICKLINE(1,20000,20000,15,0),COLORWHITE;
STICKLINE(1,120000,120000,15,0),COLORMAGENTA;
STICKLINE(1,-20000,-20000,15,0),COLORMAGENTA;
STICKLINE(1,65000,65000,2,0),COLORRED;
STICKLINE(1,35000,35000,2,0),COLORGREEN;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 多止损:EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*3.5,NODRAW,COLORYELLOW;多止盈:(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1+EMA(EMA(H,25),25),NODRAW,COLORWHITE;
空止损:(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*3.5+EMA(EMA(H,25),25),NODRAW,COLORYELLOW;
空止盈:EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1,NODRAW,COLORWHITE;
短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6) +13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12) +7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+ REF(H,20))/210,COLORBLUE,LINETHICK1; 短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6) +13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12) +7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+ REF(L,20))/210,COLORBLUE,LINETHICK1; D90H:=EMA(短高H,90),COLORRED,LINETHICK1; D90L:=EMA(短低L,90),COLORRED,LINETHICK1; D90差:=D90H-D90L; D90顶:=D90H+D90差*2,COLORRED,LINETHICK1; D90底:=D90L-D90差*2,COLORRED,LINETHICK1;
高0:=(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1+EMA(EMA(H,25),25),LINETHICK1,COLORWHITE;
低0:=EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*1,LINETHICK1,COLORWHITE; 多头定位:=低0>=D90底 AND 高0>=D90顶; 空头定位:=高0<=D90顶 AND 低0<=D90底; 震荡定位:=低0>=D90底 AND 高0<=D90顶;
短顶:=(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*2+EMA(EMA(H,25),25),LINETHICK2,COLORGREEN;
短底:=EMA(EMA(L,25),25)-(EMA(EMA(H,25),25)-EMA(EMA(L,25),25))*2,LINETHICK2,COLORGREEN;
短线收盘:=(C-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线开盘:=(O-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线高盘:=(H-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线低盘:=(L-短底)/(短顶-短底)*100000,LINETHICK0,COLORRED;
顶1:=120000,COLORYELLOW,LINETHICK3;
底1:=-20000,COLORYELLOW,LINETHICK3;
STICKLINE(多头定位=1,顶1,底1,11,0),COLOR000066;
STICKLINE(空头定位=1,顶1,底1,11,0),COLOR003300;
STICKLINE(震荡定位=1,顶1,底1,11,0),COLOR555555;
震荡顶:=(EMA(EMA(短线高盘,25),25)-EMA(EMA(短线低盘,25),25))*1+EMA(EMA(短线高盘,25),25),POINTDOT,COLORWHITE;
震荡底:=EMA(EMA(短线低盘,25),25)-(EMA(EMA(短线高盘,25),25)-EMA(EMA(短线低盘,25),25))*1,POINTDOT,COLORWHITE;
做空:=80000,COLORWHITE,LINETHICK1;
做多:=20000,COLORWHITE,LINETHICK1;
空损:=120000,COLORMAGENTA,LINETHICK2;
多损:=-20000,COLORMAGENTA,LINETHICK2;
多减仓:=65000,POINTDOT,COLORRED;
空减仓:=35000,POINTDOT,COLORGREEN; DRAWTEXT(ISLASTBAR,120000,'损'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,80000,'空'),COLORWHITE; DRAWTEXT(ISLASTBAR,65000,'减'),COLORRED;
DRAWTEXT(ISLASTBAR,35000,'减'),COLORGREEN; DRAWTEXT(ISLASTBAR,20000,'多'),COLORWHITE;
DRAWTEXT(ISLASTBAR,-20000,'损'),COLORMAGENTA; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; 今D:=EMA(D,3);
昨D:=REF(今D,1); STICKLINE(今D>=昨D,短线低盘,短线高盘,0,0),COLORRED;
STICKLINE(今D>=昨D,短线收盘,短线开盘,8,0),COLORRED;
STICKLINE(今D<=昨D,短线低盘,短线高盘,0,0),COLORGREEN;
STICKLINE(今D<=昨D,短线收盘,短线开盘,8,0),COLORGREEN;
白色点多定位1:=短线低盘<做多 AND 短线高盘>做多;
白色点空定位1:=短线高盘>做空 AND 短线低盘<做空;
STICKLINE(白色点多定位1=1,短线低盘,做多,8,0),COLORWHITE;
STICKLINE(白色点空定位1=1,短线高盘,做空,8,0),COLORWHITE;
白色点多定位2:=短线高盘<做多; 白色点空定位2:=短线低盘>做空;
STICKLINE(白色点多定位2=1,短线低盘,短线高盘,0,0),COLORWHITE;
STICKLINE(白色点多定位2=1,短线收盘,短线开盘,8,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线低盘,短线高盘,0,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线收盘,短线开盘,8,0),COLORWHITE;
多头红色点:=今D>昨D;
空头红色点:=今D<昨D; 多头红色点定位1:=白色点多定位1=1 AND 多头红色点=1;
空头红色点定位1:=白色点空定位1=1 AND 空头红色点=1;
STICKLINE(多头红色点定位1=1,短线低盘,做多,8,0),COLORMAGENTA;
STICKLINE(空头红色点定位1=1,短线高盘,做空,8,0),COLORMAGENTA;
多头红色点定位2:=白色点多定位2=1 AND 多头红色点=1;
空头红色点定位2:=白色点空定位2=1 AND 空头红色点=1;
STICKLINE(多头红色点定位2=1,短线低盘,短线高盘,0,0),COLORMAGENTA;
STICKLINE(多头红色点定位2=1,短线收盘,短线开盘,8,0),COLORMAGENTA;
STICKLINE(空头红色点定位2=1,短线低盘,短线高盘,0,0),COLORMAGENTA;
STICKLINE(空头红色点定位2=1,短线收盘,短线开盘,8,0),COLORMAGENTA;
多头多定位:=CROSS(做多,短线低盘) AND 多头定位=1;
多头平定位:=CROSS(短线高盘,做空) AND 多头定位=1 AND 震荡定位=0;
空头空定位:=CROSS(短线高盘,做空) AND 空头定位=1;
空头平定位:=CROSS(做多,短线低盘) AND 空头定位=1 AND 震荡定位=0;
震荡多定位:=CROSS(做多,短线低盘) AND 震荡定位=1; 震荡空定位:=CROSS(短线高盘,做空) AND 震荡定位=1;
DRAWICON(空头平定位=1,短线低盘,78); DRAWICON(多头平定位=1,短线高盘,67);
DRAWICON(多头多定位=1 OR 震荡多定位=1,短线低盘,48);
DRAWICON(空头空定位=1 OR 震荡空定位=1,短线高盘,49);
STICKLINE(1,80000,80000,15,0),COLORWHITE;
STICKLINE(1,20000,20000,15,0),COLORWHITE;
STICKLINE(1,120000,120000,15,0),COLORMAGENTA;
STICKLINE(1,-20000,-20000,15,0),COLORMAGENTA;
{STICKLINE(1,65000,65000,2,0),COLORRED;}
{STICKLINE(1,35000,35000,2,0),COLORGREEN;} {DRAWTEXT(ISLASTBAR,65000,'减'),COLORRED;
DRAWTEXT(ISLASTBAR,35000,'减'),COLORGREEN;} 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容