老师,我这里有二条横的线帮我标红好吗? [文华财经]
-
咨询内容:
N:=33;UR:=6;LR:=2;TC1:=IF(H=HHV(H,8*UR),H,NULL);TC2:=REFX1(BARSLAST(TC1=H),9999)+1;UPPER:=REFX1(IF(TC2=1,H,REF(H,TC2-1)),9999);BC1:=IF(L=LLV(L,8*LR),L,NULL);BC2:=REFX1(BARSLAST(BC1=L),9999)+1;LOWER:=REFX1(IF(BC2=1,L,REF(L,BC2-1)),9999);CURRBARSCOUNT:=REFX1(BARPOS,9999)-BARPOS+1;LP:=CURRBARSCOUNT<=BC2 AND L=LOWER; HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2)); LR1:=FORCAST(C,NOD+1);NP:IF(CURRBARSCOUNT<=MAX(BC2,TC2),REFX1(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1)),9999),NULL),COLOR93BDA8,LINETHICK2; LR2:=SLOPE(C,NOD+1);LR3:=REFX1(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)),9999);FP:NP-LR3*(NOD),COLOR93BDA8,LINETHICK2; EQU:(NP+FP)/2,COLOR93BDA8,LINETHICK2;AD:=ABS(NP-FP);
DBL:=BARSLAST(NOT(ISNULL(BC1)))+1;DBH:=BARSLAST(NOT(ISNULL(TC1)))+1;BSP:=IF(BC2>TC2,DBL,DBH)-1;LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);AT2:=HHV(AT1-LRL,MAX(BC2,TC2));AT3:=REFX1(BARSLAST(AT1-LRL=AT2),9999);AT4:=REFX1(IF(AT3=0,H,REF(H,AT3)),9999);AT5:=REFX1(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)),9999);ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);UT2:=HHV(LRL-UT1,MAX(BC2,TC2));UT3:=REFX1(BARSLAST(LRL-UT1=UT2),9999);UT4:=REFX1(IF(UT3=0,H,REF(H,UT3)),9999);UT5:=REFX1(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)),9999);UTL:=LRL-UT5;RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,REFX1(REF(ATL,MIN(BC2,TC2)-11),9999)); RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,REFX1(REF(UTL,MIN(BC2,TC2)-11),9999)); //中轨:IF(NP>FP,IF(LRL<=RH,LRL,NULL),IF(LRL>=RL,LRL,NULL)),COLOR628962;//上轨:IF(NP>FP,IF(ATL<=RH,ATL,NULL),IF(ATL>=RL,ATL,NULL)),COLOR628962;//下轨:IF(NP>FP,IF(UTL<=RH,UTL,NULL),IF(UTL>=RL,UTL,NULL)),COLOR628962;
CON1:=FP>NP;CON2:=FP<NP;//竖线DRAWLINE(IF(BC2>TC2,HP,LP) && CON1,LOWER,1,UPPER,COLOR628962),DOT;DRAWLINE(IF(BC2>TC2,LP,HP) && CON1,LOWER,1,UPPER,COLOR628962),DOT;DRAWLINE(IF(BC2>TC2,HP,LP) && CON2,LOWER,1,UPPER,COLORGRAY),DOT;DRAWLINE(IF(BC2>TC2,LP,HP) && CON2,LOWER,1,UPPER,COLORGRAY),DOT;
IF(NP>FP,IF(ATL<=RH,ATL,NULL),IF(ATL>=RL,ATL,NULL)),COLORYELLOW;{上轨画线}IF(NP>FP,IF(UTL<=RH,UTL,NULL),IF(UTL>=RL,UTL,NULL)),COLORFFFFFF;//{下轨画线}
DRAWKLINE1(H,O,L,C);
老师,我这里有二条横的线帮我标红好吗? 我想改一下色不知道是哪几个代码,致谢来源:程序化99
-
文华技术人员:
参考:
N:=33; UR:=6; LR:=2; TC1:=IF(H=HHV(H,8*UR),H,NULL); TC2:=REFX1(BARSLAST(TC1=H),9999)+1; UPPER:=REFX1(IF(TC2=1,H,REF(H,TC2-1)),9999); BC1:=IF(L=LLV(L,8*LR),L,NULL); BC2:=REFX1(BARSLAST(BC1=L),9999)+1; LOWER:=REFX1(IF(BC2=1,L,REF(L,BC2-1)),9999); CURRBARSCOUNT:=REFX1(BARPOS,9999)-BARPOS+1; LP:=CURRBARSCOUNT<=BC2 AND L=LOWER; HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2)); LR1:=FORCAST(C,NOD+1); NP:IF(CURRBARSCOUNT<=MAX(BC2,TC2),REFX1(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1)),9999),NULL),COLOR93BDA8,LINETHICK2; LR2:=SLOPE(C,NOD+1); LR3:=REFX1(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)),9999); FP:NP-LR3*(NOD),COLOR93BDA8,LINETHICK2; EQU:(NP+FP)/2,COLOR93BDA8,LINETHICK2; AD:=ABS(NP-FP);
DBL:=BARSLAST(NOT(ISNULL(BC1)))+1; DBH:=BARSLAST(NOT(ISNULL(TC1)))+1; BSP:=IF(BC2>TC2,DBL,DBH)-1; LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP); AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL); AT2:=HHV(AT1-LRL,MAX(BC2,TC2)); AT3:=REFX1(BARSLAST(AT1-LRL=AT2),9999); AT4:=REFX1(IF(AT3=0,H,REF(H,AT3)),9999); AT5:=REFX1(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)),9999); ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL); UT2:=HHV(LRL-UT1,MAX(BC2,TC2)); UT3:=REFX1(BARSLAST(LRL-UT1=UT2),9999); UT4:=REFX1(IF(UT3=0,H,REF(H,UT3)),9999); UT5:=REFX1(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)),9999); UTL:=LRL-UT5; RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,REFX1(REF(ATL,MIN(BC2,TC2)-11),9999)); RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,REFX1(REF(UTL,MIN(BC2,TC2)-11),9999)); //中轨:IF(NP>FP,IF(LRL<=RH,LRL,NULL),IF(LRL>=RL,LRL,NULL)),COLOR628962; //上轨:IF(NP>FP,IF(ATL<=RH,ATL,NULL),IF(ATL>=RL,ATL,NULL)),COLOR628962; //下轨:IF(NP>FP,IF(UTL<=RH,UTL,NULL),IF(UTL>=RL,UTL,NULL)),COLOR628962;
CON1:=FP>NP; CON2:=FP<NP; //竖线 DRAWLINE(IF(BC2>TC2,HP,LP) && CON1,LOWER,1,UPPER,COLOR628962),DOT; DRAWLINE(IF(BC2>TC2,LP,HP) && CON1,LOWER,1,UPPER,COLOR628962),DOT; DRAWLINE(IF(BC2>TC2,HP,LP) && CON2,LOWER,1,UPPER,COLORGRAY),DOT; DRAWLINE(IF(BC2>TC2,LP,HP) && CON2,LOWER,1,UPPER,COLORGRAY),DOT;
IF(NP>FP,IF(ATL<=RH,ATL,NULL),IF(ATL>=RL,ATL,NULL)),COLORRED; {上轨画线} IF(NP>FP,IF(UTL<=RH,UTL,NULL),IF(UTL>=RL,UTL,NULL)),COLORRED; //{下轨画线}
DRAWKLINE1(H,O,L,C);来源: WWW.CXH99.COM
-
文华客服:
老师不对哦,不是斜的二条,是横的二条目前是青绿色的那二条我想换色,致谢
-
网友回复:
加载查看,青绿色的有三条,您可以自行调整下哪两条需要变色
参考:
N:=33; UR:=6; LR:=2; TC1:=IF(H=HHV(H,8*UR),H,NULL); TC2:=REFX1(BARSLAST(TC1=H),9999)+1; UPPER:=REFX1(IF(TC2=1,H,REF(H,TC2-1)),9999); BC1:=IF(L=LLV(L,8*LR),L,NULL); BC2:=REFX1(BARSLAST(BC1=L),9999)+1; LOWER:=REFX1(IF(BC2=1,L,REF(L,BC2-1)),9999); CURRBARSCOUNT:=REFX1(BARPOS,9999)-BARPOS+1; LP:=CURRBARSCOUNT<=BC2 AND L=LOWER; HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2)); LR1:=FORCAST(C,NOD+1); NP:IF(CURRBARSCOUNT<=MAX(BC2,TC2),REFX1(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1)),9999),NULL),COLORRED,LINETHICK2; LR2:=SLOPE(C,NOD+1); LR3:=REFX1(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)),9999); FP:NP-LR3*(NOD),COLORRED,LINETHICK2; EQU:(NP+FP)/2,COLORRED,LINETHICK2; AD:=ABS(NP-FP);
DBL:=BARSLAST(NOT(ISNULL(BC1)))+1; DBH:=BARSLAST(NOT(ISNULL(TC1)))+1; BSP:=IF(BC2>TC2,DBL,DBH)-1; LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP); AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL); AT2:=HHV(AT1-LRL,MAX(BC2,TC2)); AT3:=REFX1(BARSLAST(AT1-LRL=AT2),9999); AT4:=REFX1(IF(AT3=0,H,REF(H,AT3)),9999); AT5:=REFX1(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)),9999); ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL); UT2:=HHV(LRL-UT1,MAX(BC2,TC2)); UT3:=REFX1(BARSLAST(LRL-UT1=UT2),9999); UT4:=REFX1(IF(UT3=0,H,REF(H,UT3)),9999); UT5:=REFX1(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)),9999); UTL:=LRL-UT5; RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,REFX1(REF(ATL,MIN(BC2,TC2)-11),9999)); RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,REFX1(REF(UTL,MIN(BC2,TC2)-11),9999)); //中轨:IF(NP>FP,IF(LRL<=RH,LRL,NULL),IF(LRL>=RL,LRL,NULL)),COLOR628962; //上轨:IF(NP>FP,IF(ATL<=RH,ATL,NULL),IF(ATL>=RL,ATL,NULL)),COLOR628962; //下轨:IF(NP>FP,IF(UTL<=RH,UTL,NULL),IF(UTL>=RL,UTL,NULL)),COLOR628962;
CON1:=FP>NP; CON2:=FP<NP; //竖线 DRAWLINE(IF(BC2>TC2,HP,LP) && CON1,LOWER,1,UPPER,COLOR628962),DOT; DRAWLINE(IF(BC2>TC2,LP,HP) && CON1,LOWER,1,UPPER,COLOR628962),DOT; DRAWLINE(IF(BC2>TC2,HP,LP) && CON2,LOWER,1,UPPER,COLORGRAY),DOT; DRAWLINE(IF(BC2>TC2,LP,HP) && CON2,LOWER,1,UPPER,COLORGRAY),DOT;
IF(NP>FP,IF(ATL<=RH,ATL,NULL),IF(ATL>=RL,ATL,NULL)),COLORYELLOW; {上轨画线} IF(NP>FP,IF(UTL<=RH,UTL,NULL),IF(UTL>=RL,UTL,NULL)),COLORFFFFFF; //{下轨画线}
DRAWKLINE1(H,O,L,C);
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容