9qihuo.com
我们只提供有用的干货

[求助]画线主图修改文华6 (文华财经WH6赢顺V6.7)

投资者咨询:[求助]画线主图修改文华6 (文华财经WH6赢顺V6.7)
来源:文华财经  日期:2019/8/3 0:36
 {画线主图}

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
VA1:=HHVBARS(H,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
JQG:=DRAWLINE(VA2,H,REF(VA2,1),REF(H,1),1),COLORGREEN,DOTLINE;{在价格画线}
NOTEXT前高A:DRAWLINE(VA2,H,ISLASTBAR,REF(H,BARSLAST(VA2)),1),COLORWHITE,DOTLINE;
DRAWNUMBER(ISLASTBAR,NOTEXT前高A,NOTEXT前高A),COLORWHITE;

VA3:=LLVBARS(L,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),0.5);
NOTEXT前低A:DRAWLINE(VA4,L,ISLASTBAR,REF(L,BARSLAST(VA4)),1),COLORWHITE,DOTLINE;
DRAWNUMBER(ISLASTBAR,NOTEXT前低A,NOTEXT前低A),COLORWHITE;

基准:=CONST(SUM(VA2,0));
前高4:=基准-4=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高3:=基准-3=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高2:=基准-2=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高1:=基准-1=SUM(VA2,0) AND VA2,COLORYELLOW,NODRAW;
前高:=基准=SUM(VA2,0) AND VA2,COLORCYAN,NODRAW;

距离G1:=BARSLAST(前高1);
距离G2:=BARSLAST(前高2);
距离G3:=BARSLAST(前高3);
距离G4:=BARSLAST(前高4);

NOTEXTG1:DRAWLINE(前高1,H,前高 AND H>=REF(H,距离G1),H,0),COLORYELLOW;
NOTEXTG2:DRAWLINE(前高1,H,前高 AND H<REF(H,距离G1),H,0),COLORGREEN;
NOTEXTG3:DRAWLINE(前高2,H,前高1 AND H>=REF(H,距离G2),H,0),COLORYELLOW;
NOTEXTG4:DRAWLINE(前高2,H,前高1 AND H<REF(H,距离G2),H,0),COLORGREEN;
NOTEXTG5:DRAWLINE(前高3,H,前高2 AND H>=REF(H,距离G3),H,0),COLORYELLOW;
NOTEXTG6:DRAWLINE(前高3,H,前高2 AND H<REF(H,距离G3),H,0),COLORGREEN;
NOTEXTG7:DRAWLINE(前高4,H,前高3 AND H>=REF(H,距离G4),H,0),COLORYELLOW;
NOTEXTG8:DRAWLINE(前高4,H,前高3 AND H<REF(H,距离G4),H,0),COLORGREEN;

基准2:=CONST(SUM(VA4,0));
前低:=基准2=SUM(VA4,0) AND VA4;
前低1:=基准2-1=SUM(VA4,0) AND VA4;
前低2:=基准2-2=SUM(VA4,0) AND VA4;
前低3:=基准2-3=SUM(VA4,0) AND VA4;
前低4:=基准2-4=SUM(VA4,0) AND VA4;


距离D1:=BARSLAST(前低1);
距离D2:=BARSLAST(前低2);
距离D3:=BARSLAST(前低3);
距离D4:=BARSLAST(前低4);

NOTEXTD1:DRAWLINE(前低1,L,前低 AND L>=REF(L,距离D1),L,0),COLORYELLOW;
NOTEXTD2:DRAWLINE(前低1,L,前低 AND L<REF(L,距离D1),L,0),COLORGREEN;
NOTEXTD3:DRAWLINE(前低2,L,前低1 AND L>=REF(L,距离D2),L,0),COLORYELLOW;
NOTEXTD4:DRAWLINE(前低2,L,前低1 AND L<REF(L,距离D2),L,0),COLORGREEN;
NOTEXTD5:DRAWLINE(前低3,L,前低2 AND L>=REF(L,距离D3),L,0),COLORYELLOW;
NOTEXTD6:DRAWLINE(前低3,L,前低2 AND L<REF(L,距离D3),L,0),COLORGREEN;
NOTEXTD7:DRAWLINE(前低4,L,前低3 AND L>=REF(L,距离D4),L,0),COLORYELLOW;
NOTEXTD8:DRAWLINE(前低4,L,前低3 AND L<REF(L,距离D4),L,0),COLORGREEN;


ZT:=REF(C,1)*1.1-C<0.01 AND H=C;{涨停}
DT:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)) AND L=C,1,0);{跌停};
BA:STICKLINE(ZT,OPEN,CLOSE,0.1,0),COLORYELLOW;
BC:STICKLINE(DT,OPEN,CLOSE,0.1,0),COLORLIGREEN;

DA:=YEAR AND MONTH AND DAY;
AAA:=STRCAT(CON2STR(YEAR,0),'年');
AAB:=STRCAT(CON2STR(MONTH,0),'月');
AA33:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日'))))))); 
AA:=STRCAT(STRCAT(STRCAT(AAA,AAB),STRCAT(AA33,AA4)),'】');
SA:DRAWTEXT_FIX(DA,0,0,0,AA),COLORGREEN;



{画线副图}

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
SA:=INTPART(MACD*100+0.5)/100,COLORYELLOW,NODRAW;
红天数:=IF(MACD>0,BARSLAST(CROSS(MACD,0)),DRAWNULL),COLORYELLOW,NODRAW;
绿天数:=IF(MACD<0,BARSLAST(CROSS(0,MACD)),DRAWNULL),COLORCYAN,NODRAW;
W1:STICKLINE(MACD>0,MACD,0,2.5,1),COLORRED;
W2:STICKLINE(MACD<0,MACD,0,2.5,1),COLORCYAN;

VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
QG:=DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORGREEN,DOTLINE;
NOTEXT前高A:DRAWLINE(VA2,MACD,ISLASTBAR,REF(MACD,BARSLAST(VA2)),1),COLORWHITE,DOTLINE;

VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),0.5);
QD:=DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1),COLORYELLOW,DOTLINE;
NOTEXT前低A:DRAWLINE(VA4,MACD,ISLASTBAR,REF(MACD,BARSLAST(VA4)),1),COLORWHITE,DOTLINE;


W3:STICKLINE(MACD>QG,MACD,QG,1,0),COLORYELLOW;
W4:STICKLINE(MACD<0 AND MACD<QD AND QD<0,MACD,QD,1,0),COLORBLUE;

基准:=CONST(SUM(VA2,0));
前高:=基准=SUM(VA2,0) AND VA2,COLORCYAN,NODRAW;
前高1:=基准-1=SUM(VA2,0) AND VA2,COLORYELLOW,NODRAW;
前高2:=基准-2=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高3:=基准-3=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高4:=基准-4=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;


距离G1:=BARSLAST(前高1);
距离G2:=BARSLAST(前高2);
距离G3:=BARSLAST(前高3);
距离G4:=BARSLAST(前高4);

NOTEXTG2:DRAWLINE(前高1,MACD,前高 AND MACD>=REF(MACD,距离G1),MACD,0),COLORYELLOW;
NOTEXTG1:DRAWLINE(前高1,MACD,前高 AND MACD<REF(MACD,距离G1),MACD,0),COLORGREEN;
NOTEXTG3:DRAWLINE(前高2,MACD,前高1 AND MACD>=REF(MACD,距离G2),MACD,0),COLORYELLOW;
NOTEXTG4:DRAWLINE(前高2,MACD,前高1 AND MACD<REF(MACD,距离G2),MACD,0),COLORGREEN;
NOTEXTG5:DRAWLINE(前高3,MACD,前高2 AND MACD>=REF(MACD,距离G3),MACD,0),COLORYELLOW;
NOTEXTG6:DRAWLINE(前高3,MACD,前高2 AND MACD<REF(MACD,距离G3),MACD,0),COLORGREEN;
NOTEXTG7:DRAWLINE(前高4,MACD,前高3 AND MACD>=REF(MACD,距离G4),MACD,0),COLORYELLOW;
NOTEXTG8:DRAWLINE(前高4,MACD,前高3 AND MACD<REF(MACD,距离G4),MACD,0),COLORGREEN;


基准2:=CONST(SUM(VA4,0));
前低:=基准2=SUM(VA4,0) AND VA4;
前低1:=基准2-1=SUM(VA4,0) AND VA4;
前低2:=基准2-2=SUM(VA4,0) AND VA4;
前低3:=基准2-3=SUM(VA4,0) AND VA4;
前低4:=基准2-4=SUM(VA4,0) AND VA4;

距离D1:=BARSLAST(前低1);
距离D2:=BARSLAST(前低2);
距离D3:=BARSLAST(前低3);
距离D4:=BARSLAST(前低4);

NOTEXTD1:DRAWLINE(前低1,MACD,前低 AND MACD>=REF(MACD,距离D1),MACD,0),COLORYELLOW;
NOTEXTD2:DRAWLINE(前低1,MACD,前低 AND MACD<REF(MACD,距离D1),MACD,0),COLORGREEN;
NOTEXTD3:DRAWLINE(前低2,MACD,前低1 AND MACD>=REF(MACD,距离D2),MACD,0),COLORYELLOW;
NOTEXTD4:DRAWLINE(前低2,MACD,前低1 AND MACD<REF(MACD,距离D2),MACD,0),COLORGREEN;
NOTEXTD5:DRAWLINE(前低3,MACD,前低2 AND MACD>=REF(MACD,距离D3),MACD,0),COLORYELLOW;
NOTEXTD6:DRAWLINE(前低3,MACD,前低2 AND MACD<REF(MACD,距离D3),MACD,0),COLORGREEN;
NOTEXTD7:DRAWLINE(前低4,MACD,前低3 AND MACD>=REF(MACD,距离D4),MACD,0),COLORYELLOW;
NOTEXTD8:DRAWLINE(前低4,MACD,前低3 AND MACD<REF(MACD,距离D4),MACD,0),COLORGREEN;



技术人员回复
日期:2019/8/3 8:43
 不同软件函数机制不同,加载效果会有差异

不能修改部分已删除,参考:

1.DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
VA1:=HHVBARS(H,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
DRAWLINE(VA2,H,REF(VA2,1),REF(H,1),1),COLORGREEN,DOT;
//{在价格画线}
DRAWLINE1(VA2,H,ISLASTBAR,REF(H,BARSLAST(VA2)),1),COLORWHITE,DOT;
NOTEXT前高A:=TRENDLINES(VA2,H,ISLASTBAR,REF(H,BARSLAST(VA2)));
DRAWNUMBER(ISLASTBAR,NOTEXT前高A,NOTEXT前高A,0,COLORWHITE);

VA3:=LLVBARS(L,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),0.5);
DRAWLINE(VA4,L,ISLASTBAR,REF(L,BARSLAST(VA4)),1),COLORWHITE,DOT;
NOTEXT前低A:TRENDLINES(VA4,L,ISLASTBAR,REF(L,BARSLAST(VA4)));
DRAWNUMBER(ISLASTBAR,NOTEXT前低A,NOTEXT前低A,0,COLORWHITE);

基准:=REFX1(SUM(VA2,0),10000);
前高4:=基准-4=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高3:=基准-3=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高2:=基准-2=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高1:=基准-1=SUM(VA2,0) AND VA2,COLORYELLOW,NODRAW;
前高:=基准=SUM(VA2,0) AND VA2,COLORCYAN,NODRAW;

距离G1:=BARSLAST(前高1);
距离G2:=BARSLAST(前高2);
距离G3:=BARSLAST(前高3);
距离G4:=BARSLAST(前高4);

DRAWLINE1(前高1,H,前高 AND H>=REF(H,距离G1),H,0),COLORYELLOW;
DRAWLINE1(前高1,H,前高 AND H<REF(H,距离G1),H,0),COLORGREEN;
DRAWLINE1(前高2,H,前高1 AND H>=REF(H,距离G2),H,0),COLORYELLOW;
DRAWLINE1(前高2,H,前高1 AND H<REF(H,距离G2),H,0),COLORGREEN;
DRAWLINE1(前高3,H,前高2 AND H>=REF(H,距离G3),H,0),COLORYELLOW;
DRAWLINE1(前高3,H,前高2 AND H<REF(H,距离G3),H,0),COLORGREEN;
DRAWLINE1(前高4,H,前高3 AND H>=REF(H,距离G4),H,0),COLORYELLOW;
DRAWLINE1(前高4,H,前高3 AND H<REF(H,距离G4),H,0),COLORGREEN;

基准2:=REFX1(SUM(VA4,0),10000);
前低:=基准2=SUM(VA4,0) AND VA4;
前低1:=基准2-1=SUM(VA4,0) AND VA4;
前低2:=基准2-2=SUM(VA4,0) AND VA4;
前低3:=基准2-3=SUM(VA4,0) AND VA4;
前低4:=基准2-4=SUM(VA4,0) AND VA4;


距离D1:=BARSLAST(前低1);
距离D2:=BARSLAST(前低2);
距离D3:=BARSLAST(前低3);
距离D4:=BARSLAST(前低4);

DRAWLINE1(前低1,L,前低 AND L>=REF(L,距离D1),L,0),COLORYELLOW;
DRAWLINE1(前低1,L,前低 AND L<REF(L,距离D1),L,0),COLORGREEN;
DRAWLINE1(前低2,L,前低1 AND L>=REF(L,距离D2),L,0),COLORYELLOW;
DRAWLINE1(前低2,L,前低1 AND L<REF(L,距离D2),L,0),COLORGREEN;
DRAWLINE1(前低3,L,前低2 AND L>=REF(L,距离D3),L,0),COLORYELLOW;
DRAWLINE1(前低3,L,前低2 AND L<REF(L,距离D3),L,0),COLORGREEN;
DRAWLINE1(前低4,L,前低3 AND L>=REF(L,距离D4),L,0),COLORYELLOW;
DRAWLINE1(前低4,L,前低3 AND L<REF(L,距离D4),L,0),COLORGREEN;


ZT:=REF(C,1)*1.1-C<0.01 AND H=C;
{涨停}
DT:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)) AND L=C,1,0);
//{跌停}
STICKLINE(ZT,OPEN,CLOSE,0.1,0),COLORYELLOW;
STICKLINE(DT,OPEN,CLOSE,0.1,0),COLORLIGHTGREEN;

2.

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
SA:=INTPART(MACD*100+0.5)/100,COLORYELLOW,NODRAW;
红天数:=IF(MACD>0,BARSLAST(CROSS(MACD,0)),NULL),COLORYELLOW,NODRAW;
绿天数:=IF(MACD<0,BARSLAST(CROSS(0,MACD)),NULL),COLORCYAN,NODRAW;
STICKLINE(MACD>0,MACD,0,2.5,1),COLORRED;
STICKLINE(MACD<0,MACD,0,2.5,1),COLORCYAN;

VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
DRAWLINE1(VA2,MACD,REF(VA2,1),REF(MACD,1),0),COLORGREEN,DOT;
QG:=TRENDLINES(VA2,MACD,REF(VA2,1),REF(MACD,1));
DRAWLINE1(VA2,MACD,ISLASTBAR,REF(MACD,BARSLAST(VA2)),0),COLORWHITE,DOT;

VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),0.5);
DRAWLINE1(VA4,MACD,REF(VA4,1),REF(MACD,1),0),COLORYELLOW,DOT;
QD:=TRENDLINES(VA4,MACD,REF(VA4,1),REF(MACD,1));
DRAWLINE1(VA4,MACD,ISLASTBAR,REF(MACD,BARSLAST(VA4)),0),COLORWHITE,DOT;


STICKLINE(MACD>QG,MACD,QG,1,0),COLORYELLOW;
STICKLINE(MACD<0 AND MACD<QD AND QD<0,MACD,QD,1,0),COLORBLUE;


基准:=REFX1(SUM(VA2,0),10000);
前高:=基准=SUM(VA2,0) AND VA2,COLORCYAN,NODRAW;
前高1:=基准-1=SUM(VA2,0) AND VA2,COLORYELLOW,NODRAW;
前高2:=基准-2=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高3:=基准-3=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高4:=基准-4=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;


距离G1:=BARSLAST(前高1);
距离G2:=BARSLAST(前高2);
距离G3:=BARSLAST(前高3);
距离G4:=BARSLAST(前高4);


DRAWLINE1(前高1,MACD,前高 AND MACD>=REF(MACD,距离G1),MACD,0),COLORYELLOW;
DRAWLINE1(前高1,MACD,前高 AND MACD<REF(MACD,距离G1),MACD,0),COLORGREEN;
DRAWLINE1(前高2,MACD,前高1 AND MACD>=REF(MACD,距离G2),MACD,0),COLORYELLOW;
DRAWLINE1(前高2,MACD,前高1 AND MACD<REF(MACD,距离G2),MACD,0),COLORGREEN;
DRAWLINE1(前高3,MACD,前高2 AND MACD>=REF(MACD,距离G3),MACD,0),COLORYELLOW;
DRAWLINE1(前高3,MACD,前高2 AND MACD<REF(MACD,距离G3),MACD,0),COLORGREEN;
DRAWLINE1(前高4,MACD,前高3 AND MACD>=REF(MACD,距离G4),MACD,0),COLORYELLOW;
DRAWLINE1(前高4,MACD,前高3 AND MACD<REF(MACD,距离G4),MACD,0),COLORGREEN;


基准2:=REFX(SUM(VA4,0),10000);
前低:=基准2=SUM(VA4,0) AND VA4;
前低1:=基准2-1=SUM(VA4,0) AND VA4;
前低2:=基准2-2=SUM(VA4,0) AND VA4;
前低3:=基准2-3=SUM(VA4,0) AND VA4;
前低4:=基准2-4=SUM(VA4,0) AND VA4;

距离D1:=BARSLAST(前低1);
距离D2:=BARSLAST(前低2);
距离D3:=BARSLAST(前低3);
距离D4:=BARSLAST(前低4);


DRAWLINE1(前低1,MACD,前低 AND MACD>=REF(MACD,距离D1),MACD,0),COLORYELLOW;
DRAWLINE1(前低1,MACD,前低 AND MACD<REF(MACD,距离D1),MACD,0),COLORGREEN;
DRAWLINE1(前低2,MACD,前低1 AND MACD>=REF(MACD,距离D2),MACD,0),COLORYELLOW;
DRAWLINE1(前低2,MACD,前低1 AND MACD<REF(MACD,距离D2),MACD,0),COLORGREEN;
DRAWLINE1(前低3,MACD,前低2 AND MACD>=REF(MACD,距离D3),MACD,0),COLORYELLOW;
DRAWLINE1(前低3,MACD,前低2 AND MACD<REF(MACD,距离D3),MACD,0),COLORGREEN;
DRAWLINE1(前低4,MACD,前低3 AND MACD>=REF(MACD,距离D4),MACD,0),COLORYELLOW;
DRAWLINE1(前低4,MACD,前低3 AND MACD<REF(MACD,距离D4),MACD,0),COLORGREEN;