金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 419|回复: 9

求助:请帮我把下面文华财经的缠论指标代码改成金字塔的代码

[复制链接]

4

主题

23

帖子

23

积分

Rank: 1

等级: 新手上路

注册:
2021-11-7
曾用名:
发表于 2024-8-21 12:59 | 显示全部楼层 |阅读模式
MA8:=1;
缠论线开关:=1;
展F:=10;//10
HH展BDD:=(H>HV(H,展F))*缠论线开关*MA8;

NH展BDD:=(BARSLAST(HH展BDD)+1)*缠论线开关*MA8;

LL展BDD:=(L<LV(L,展F))*缠论线开关*MA8;

NL展BDD:=(BARSLAST(LL展BDD)+1)*缠论线开关*MA8;

AH展BDD:=(BACKSET(COUNT(LL展BDD,NH展BDD)&&LL展BDD,NH展BDD))*缠论线开关*MA8;

AL展BDD:=(BACKSET(COUNT(HH展BDD,NL展BDD)&&HH展BDD,NL展BDD))*缠论线开关*MA8;

LX:=AL展BDD, NOTEXT;

HX:=AH展BDD, NOTEXT;

笔:=1;
//1、本级别 (BOLL26)笔:
DRAWLINE1(笔*CROSS(LX=1,0.5),L,CROSS(HX=1,0.5),H,0),COLORMAGENTA,LINETHICK2;//画笔,虚线;上笔
DRAWLINE1(笔*CROSS(HX=1,0.5),H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN,LINETHICK2;//画笔,虚线;下笔
XZ:BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),12)),NODRAW;
X8:CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),8)),0.5),NODRAW;
X9:CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),9)),0.5),NODRAW;
X12:CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),12)),0.5),NODRAW;
X13:CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),13)),0.5),NODRAW;

//BOLL26最后一笔(未完成);
//HH:=CROSS(HX=1,0.5);
//LL:=CROSS(LX=1,0.5);
H0:=笔*CROSS(HX=1,0.5),ICON(1,'ICO1');
L0:=笔*CROSS(LX=1,0.5),ICON(1,'ICO2');
XX:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H0||L0,1)),0.5);
XY:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H0||L0,3)),0.5);
ZZ:=XX&& SQRT(POW( ABS(IF(H0,H,L)-REF(VALUEWHEN(H0||L0,IF(H0,H,L)),1)),2)+POW(SUMBARS(H0||L0,2),2 ))>VALUEWHEN(XY,SQRT(POW( ABS(IF(H0,H,L)-REF(VALUEWHEN(H0||L0,IF(H0,H,L)),1)),2)+POW(SUMBARS(H0||L0,2),2 ))),NODRAW;
ZZ1:=XX&& SQRT(POW( ABS(IF(H0,H,L)-REF(VALUEWHEN(H0||L0,IF(H0,H,L)),1)),2)+POW(SUMBARS(H0||L0,2),2 ))<VALUEWHEN(XY,SQRT(POW( ABS(IF(H0,H,L)-REF(VALUEWHEN(H0||L0,IF(H0,H,L)),1)),2)+POW(SUMBARS(H0||L0,2),2 ))),NODRAW;

HH:CROSS(AH展BDD=1,0.5), NOTEXT;
LL:CROSS(AL展BDD=1,0.5), NOTEXT;
DRAWLINE3(笔*ISLASTBAR&&BARSLAST(HH)<BARSLAST(LL),笔*VALUEWHEN(HH,H),笔*BARSLAST(HH),1,LLV(L,BARSLAST(HH)),LLVBARS(L,BARSLAST(HH)),0),COLORBLUE,DASH;//BOLL26最后一笔(未完成),向下笔;
DRAWLINE3(笔*ISLASTBAR&&BARSLAST(HH)>BARSLAST(LL),笔*VALUEWHEN(LL,L),笔*BARSLAST(LL),1,HHV(H,BARSLAST(LL)),HHVBARS(H,BARSLAST(LL)),0),COLORRED,DASH;//BOLL26最后一笔(未完成),向上笔;

////////2、画倒数1234的笔;
//2.1、倒数第4笔(已完成);
BADS4:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),4));
BBDS4:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),5));
DRAWLINE1(笔*CROSS(LX=1,0.5)&&BBDS4=1&&BADS4=0,L,CROSS(HX=1,0.5),H,0),COLORMAGENTA;//向上笔(倒数4),黄色;
DRAWLINE1(笔*CROSS(HX=1,0.5)&&BBDS4=1&&BADS4=0,H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN;//向下笔(倒数4),黄色;
//2.2、倒数第2笔(已完成);
BADS2:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),2));
BBDS2:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),3));
DRAWLINE1(笔*CROSS(LX=1,0.5)&&BBDS2=1&&BADS2=0,L,CROSS(HX=1,0.5),H,0),COLORMAGENTA;//向上笔(倒数2),紫红色;
DRAWLINE1(笔*CROSS(HX=1,0.5)&&BBDS2=1&&BADS2=0,H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN;//向下笔(倒数2),紫红色;
//2.3、倒数第3笔(已完成);
BADS3:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),3));
BBDS3:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),4));
DRAWLINE1(笔*CROSS(LX=1,0.5)&&BBDS3=1&&BADS3=0,L,CROSS(HX=1,0.5),H,0),COLORMAGENTA;//向上笔(倒数3),紫红色;
DRAWLINE1(笔*CROSS(HX=1,0.5)&&BBDS3=1&&BADS3=0,H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN;//向下笔(倒数3),紫红色;
//2.4、倒数第1笔(已完成);
BADS1:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),1));
BBDS1:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),2));
DRAWLINE1(笔*CROSS(LX=1,0.5)&&BBDS1=1&&BADS1=0,L,CROSS(HX=1,0.5),H,0),COLORMAGENTA;//向上笔(倒数1),紫红色;
DRAWLINE1(笔*CROSS(HX=1,0.5)&&BBDS1=1&&BADS1=0,H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN;//向下笔(倒数1),紫红色;




////////4、笔终点标注文字记号;
//4.1、笔(已完成)终点标注文字;
BAA:=IF(CROSS(LX=1,0.5),L,H);
BBB:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),4));
DRAWTEXT(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=1,H,'G2 '),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第2个高点标注文字;
DRAWTEXT(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=2,H,'G1 '),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第1个高点标注文字;
DRAWTEXT(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=1,L,'D2 '),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第2个低点标注文字;
DRAWTEXT(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=2,L,'D1 '),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第1个低点标注文字;




BAA0:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),5));
DRAWTEXT(笔*CROSS(BAA0>=1,0.5) && CROSS(LX=1,0.5),L,'D3'),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第3个低点标注文字;
DRAWTEXT(笔*CROSS(BAA0>=1,0.5) && CROSS(HX=1,0.5),H,'G3'),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第3个高点标注文字;

BAA1:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),6));
DRAWTEXT(笔*CROSS(BAA1>=1,0.5) && CROSS(LX=1,0.5),L,'D4'),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第4个低点标注文字;
DRAWTEXT(笔*CROSS(BAA1>=1,0.5) && CROSS(HX=1,0.5),H,'G4'),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第4个高点标注文字;

BAA2:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),7));
DRAWTEXT(笔*CROSS(BAA2>=1,0.5) && CROSS(LX=1,0.5),L,'D5'),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第5个低点标注文字;
DRAWTEXT(笔*CROSS(BAA2>=1,0.5) && CROSS(HX=1,0.5),H,'G5 '),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第5个高点标注文字;

//4.2、笔(未完成)的最后1笔标注文字;
AM26:=BACKSET(ISLASTBAR&&BARSLAST(HH)>BARSLAST(LL),HHVBARS(H,BARSLAST(LL))+1);
BM26:=BACKSET(ISLASTBAR&&BARSLAST(HH)<BARSLAST(LL),LLVBARS(L,BARSLAST(HH))+1);
DRAWTEXT(笔*CROSS(AM26,0.5),H,'G0 '),ALIGN2,FONTSIZE18,COLORWHITE;//最后一笔(未完成)标注文字;
DRAWTEXT(笔*CROSS(BM26,0.5),L,'D0'),ALIGN2,VALIGN2,FONTSIZE18,COLORWHITE;//最后一笔(未完成)标注文字;


//下跌中枢当G1<G2,D1<D2时,D1*G1/G2
QQ:=VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=2,H)<VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=1,H)//下跌中枢当G1<G2,D1<D2时,D1*G1/G2
&&VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=2,L)<VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=1,L);
MM1:=VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=2,L)*VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=2,H)/VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=1,H);//下跌中枢

Z:IF(QQ,MM1,NULL),COLORWHITE;//下跌中枢
DRAWNUMBER(ISLASTBAR,Z,Z,0,COLORWHITE),FONTSIZE20,ALIGN2;//下跌中枢
DRAWSL(ISLASTBAR,Z,0,-10000,0,COLORWHITE),DASH;//下跌中枢
DRAWTEXT(CROSS(QQ,0.5),Z,'F1 '),COLORWHITE,FONTSIZE20,VALIGN2,ALIGN2;//下跌中枢当G1<G2,D1<D2时,D1*G1/G2

KTEXT(笔*CROSS(AM26,0.5)&&H<REF(L,BARSLAST(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=1)),-BARSLAST(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=2),REF(H,BARSLAST(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=2)),1,COLORYELLOW,'低');
KTEXT(笔*CROSS(AM26,0.5)&&L>REF(H,BARSLAST(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=1)),-BARSLAST(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=2),REF(L,BARSLAST(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=2)),1,COLORYELLOW,'高'),VALIGN0;
//
QQX:=VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=2,L)>VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=1,L)//
&&VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=2,H)>VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=1,H);
MM1X:=VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=2,H)*VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLASTCOUNT(BBB))=2,L)/VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLASTCOUNT(BBB))=1,H);//上涨中枢

ZX:=IF(QQX,MM1X,NULL),COLORWHITE;//上涨中枢
DRAWNUMBER(ISLASTBAR,ZX,ZX,0,COLORYELLOW),FONTSIZE20,ALIGN2;//上涨中枢
DRAWSL(ISLASTBAR,ZX,0,-10000,0,COLORYELLOW),DASH;//上涨中枢
DRAWTEXT(CROSS(QQX,0.5),ZX+MINPRICE,'F2 '),COLORYELLOW,FONTSIZE20,VALIGN2,ALIGN2;//上涨中枢


回复

使用道具 举报

31

主题

7776

帖子

7786

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2024-8-21 13:02 | 显示全部楼层
MA8:=1;
缠论线开关:=1;
展F:=10;//10
HH展BDD:=(H>hhv(H,展F))*缠论线开关*MA8;

NH展BDD:=(BARSLAST(HH展BDD)+1)*缠论线开关*MA8;

LL展BDD:=(L<llv(L,展F))*缠论线开关*MA8;

NL展BDD:=(BARSLAST(LL展BDD)+1)*缠论线开关*MA8;

AH展BDD:=(BACKSET(COUNT(LL展BDD,NH展BDD)&&LL展BDD,NH展BDD))*缠论线开关*MA8;

AL展BDD:=(BACKSET(COUNT(HH展BDD,NL展BDD)&&HH展BDD,NL展BDD))*缠论线开关*MA8;

LX:=AL展BDD, NOTEXT;

HX:=AH展BDD, NOTEXT;

笔:=1;
//1、本级别 (BOLL26)笔:
DRAWLINE(笔*CROSS(LX=1,0.5),L,CROSS(HX=1,0.5),H,0),COLORMAGENTA,LINETHICK2;//画笔,虚线;上笔
DRAWLINE(笔*CROSS(HX=1,0.5),H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN,LINETHICK2;//画笔,虚线;下笔
XZ:BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),12)),NODRAW;
X8:CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),8)),0.5),NODRAW;
X9:CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),9)),0.5),NODRAW;
X12:CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),12)),0.5),NODRAW;
X13:CROSS(BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),13)),0.5),NODRAW;

//BOLL26最后一笔(未完成);
//HH:=CROSS(HX=1,0.5);
//LL:=CROSS(LX=1,0.5);
H0:=笔*CROSS(HX=1,0.5);
L0:=笔*CROSS(LX=1,0.5);
XX:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H0||L0,1)),0.5);
XY:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H0||L0,3)),0.5);
ZZ:=XX&& SQRT(POW( ABS(IF(H0,H,L)-REF(VALUEWHEN(H0||L0,IF(H0,H,L)),1)),2)+POW(SUMBARS(H0||L0,2),2 ))>VALUEWHEN(XY,SQRT(POW( ABS(IF(H0,H,L)-REF(VALUEWHEN(H0||L0,IF(H0,H,L)),1)),2)+POW(SUMBARS(H0||L0,2),2 ))),NODRAW;
ZZ1:=XX&& SQRT(POW( ABS(IF(H0,H,L)-REF(VALUEWHEN(H0||L0,IF(H0,H,L)),1)),2)+POW(SUMBARS(H0||L0,2),2 ))<VALUEWHEN(XY,SQRT(POW( ABS(IF(H0,H,L)-REF(VALUEWHEN(H0||L0,IF(H0,H,L)),1)),2)+POW(SUMBARS(H0||L0,2),2 ))),NODRAW;

HH:CROSS(AH展BDD=1,0.5), NOTEXT;
LL:CROSS(AL展BDD=1,0.5), NOTEXT;
DRAWLINE(笔*ISLASTBAR&&BARSLAST(HH)<BARSLAST(LL),笔*VALUEWHEN(HH,H),笔*BARSLAST(HH),1,llv(L,BARSLAST(HH)),llvBARS(L,BARSLAST(HH)),0),COLORBLUE,DASH;//BOLL26最后一笔(未完成),向下笔;
DRAWLINE(笔*ISLASTBAR&&BARSLAST(HH)>BARSLAST(LL),笔*VALUEWHEN(LL,L),笔*BARSLAST(LL),1,hhv(H,BARSLAST(LL)),hhvBARS(H,BARSLAST(LL)),0),COLORRED,DASH;//BOLL26最后一笔(未完成),向上笔;

////////2、画倒数1234的笔;
//2.1、倒数第4笔(已完成);
BADS4:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),4));
BBDS4:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),5));
DRAWLINE(笔*CROSS(LX=1,0.5)&&BBDS4=1&&BADS4=0,L,CROSS(HX=1,0.5),H,0),COLORMAGENTA;//向上笔(倒数4),黄色;
DRAWLINE(笔*CROSS(HX=1,0.5)&&BBDS4=1&&BADS4=0,H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN;//向下笔(倒数4),黄色;
//2.2、倒数第2笔(已完成);
BADS2:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),2));
BBDS2:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),3));
DRAWLINE(笔*CROSS(LX=1,0.5)&&BBDS2=1&&BADS2=0,L,CROSS(HX=1,0.5),H,0),COLORMAGENTA;//向上笔(倒数2),紫红色;
DRAWLINE(笔*CROSS(HX=1,0.5)&&BBDS2=1&&BADS2=0,H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN;//向下笔(倒数2),紫红色;
//2.3、倒数第3笔(已完成);
BADS3:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),3));
BBDS3:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),4));
DRAWLINE(笔*CROSS(LX=1,0.5)&&BBDS3=1&&BADS3=0,L,CROSS(HX=1,0.5),H,0),COLORMAGENTA;//向上笔(倒数3),紫红色;
DRAWLINE(笔*CROSS(HX=1,0.5)&&BBDS3=1&&BADS3=0,H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN;//向下笔(倒数3),紫红色;
//2.4、倒数第1笔(已完成);
BADS1:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),1));
BBDS1:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),2));
DRAWLINE(笔*CROSS(LX=1,0.5)&&BBDS1=1&&BADS1=0,L,CROSS(HX=1,0.5),H,0),COLORMAGENTA;//向上笔(倒数1),紫红色;
DRAWLINE(笔*CROSS(HX=1,0.5)&&BBDS1=1&&BADS1=0,H,CROSS(LX=1,0.5),L,0),COLORLIGHTGREEN;//向下笔(倒数1),紫红色;




////////4、笔终点标注文字记号;
//4.1、笔(已完成)终点标注文字;
BAA:=IF(CROSS(LX=1,0.5),L,H);
BBB:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),4));
DRAWTEXT(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLAST(BBB))=1,H,'G2 '),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第2个高点标注文字;
DRAWTEXT(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLAST(BBB))=2,H,'G1 '),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第1个高点标注文字;
DRAWTEXT(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLAST(BBB))=1,L,'D2 '),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第2个低点标注文字;
DRAWTEXT(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLAST(BBB))=2,L,'D1 '),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第1个低点标注文字;




BAA0:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),5));
DRAWTEXT(笔*CROSS(BAA0>=1,0.5) && CROSS(LX=1,0.5),L,'D3'),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第3个低点标注文字;
DRAWTEXT(笔*CROSS(BAA0>=1,0.5) && CROSS(HX=1,0.5),H,'G3'),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第3个高点标注文字;

BAA1:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),6));
DRAWTEXT(笔*CROSS(BAA1>=1,0.5) && CROSS(LX=1,0.5),L,'D4'),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第4个低点标注文字;
DRAWTEXT(笔*CROSS(BAA1>=1,0.5) && CROSS(HX=1,0.5),H,'G4'),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第4个高点标注文字;

BAA2:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),7));
DRAWTEXT(笔*CROSS(BAA2>=1,0.5) && CROSS(LX=1,0.5),L,'D5'),ALIGN2,VALIGN0,FONTSIZE18,COLORWHITE;//倒数第5个低点标注文字;
DRAWTEXT(笔*CROSS(BAA2>=1,0.5) && CROSS(HX=1,0.5),H,'G5 '),ALIGN2,FONTSIZE18,COLORWHITE;//倒数第5个高点标注文字;

//4.2、笔(未完成)的最后1笔标注文字;
AM26:=BACKSET(ISLASTBAR&&BARSLAST(HH)>BARSLAST(LL),hhvBARS(H,BARSLAST(LL))+1);
BM26:=BACKSET(ISLASTBAR&&BARSLAST(HH)<BARSLAST(LL),llvBARS(L,BARSLAST(HH))+1);
DRAWTEXT(笔*CROSS(AM26,0.5),H,'G0 '),ALIGN2,FONTSIZE18,COLORWHITE;//最后一笔(未完成)标注文字;
DRAWTEXT(笔*CROSS(BM26,0.5),L,'D0'),ALIGN2,VALIGN2,FONTSIZE18,COLORWHITE;//最后一笔(未完成)标注文字;


//下跌中枢当G1<G2,D1<D2时,D1*G1/G2
QQ:=VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLAST(BBB))=2,H)<VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLAST(BBB))=1,H)//下跌中枢当G1<G2,D1<D2时,D1*G1/G2
&&VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLAST(BBB))=2,L)<VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLAST(BBB))=1,L);
MM1:=VALUEWHEN(笔*BBB&&CROSS(LX=1,0.5)&&COUNT(CROSS(LX=1,0.5),BARSLAST(BBB))=2,L)*VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLAST(BBB))=2,H)/VALUEWHEN(笔*BBB&&CROSS(HX=1,0.5)&&COUNT(CROSS(HX=1,0.5),BARSLAST(BBB))=1,H);//下跌中枢

Z:IF(QQ,MM1,NULL),COLORWHITE;//下跌中枢
DRAWNUMBER(ISLASTBAR,Z,Z,0,COLORWHITE),FONTSIZE20,ALIGN2;//下跌中枢
DRAWSL(ISLASTBAR,Z,0,-10000,0,COLORWHITE),DASH;//下跌中枢
DRAWTEXT(CROSS(QQ,0.5),Z,'F1 '),COLORWHITE,FONTSIZE20,VALIGN2,ALIGN2;//下跌中枢当G1<G2,D1<D2时,D1*G1/G2

金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

31

主题

7776

帖子

7786

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2024-8-21 13:03 | 显示全部楼层
最后一部分ktext不知道是什么函数没法转换
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

4

主题

23

帖子

23

积分

Rank: 1

等级: 新手上路

注册:
2021-11-7
曾用名:
 楼主| 发表于 2024-8-21 13:09 | 显示全部楼层
KTEXT函数文华上是指在K线上标注文字
回复

使用道具 举报

31

主题

7776

帖子

7786

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2024-8-21 13:13 | 显示全部楼层
在图形上显示文字。

用法:
DRAWTEXT(COND,PRICE,TEXT[,COLOR,ALIGN]),
  当COND条件满足时,在PRICE位置书写文字TEXT。COLOR(可选参数)文字颜色,
ALIGN(可选参数)对齐方式 0中对齐;1左对齐;2右对齐;3图中;4图上;5图下。

例如:
DRAWTEXT(CLOSE/OPEN>1.08,LOW,'大阳线')
表示当日涨幅大于8%时在最低价位置显示"大阳线"字样。

所属函数组:绘图函数
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

4

主题

23

帖子

23

积分

Rank: 1

等级: 新手上路

注册:
2021-11-7
曾用名:
 楼主| 发表于 2024-8-21 13:13 | 显示全部楼层
为什么加载后版面没有任何显示?
回复

使用道具 举报

31

主题

7776

帖子

7786

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2024-8-21 13:13 | 显示全部楼层
金字塔中是这个函数,你根据这个函数需要参数自己改下试试把,好像参数不太一样
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

4

主题

23

帖子

23

积分

Rank: 1

等级: 新手上路

注册:
2021-11-7
曾用名:
 楼主| 发表于 2024-8-21 13:14 | 显示全部楼层
加载后版面没有任何显示
回复

使用道具 举报

4

主题

23

帖子

23

积分

Rank: 1

等级: 新手上路

注册:
2021-11-7
曾用名:
 楼主| 发表于 2024-8-21 13:16 | 显示全部楼层
文华财经的版面是这样的
截图202408211316045453.png
回复

使用道具 举报

4

主题

23

帖子

23

积分

Rank: 1

等级: 新手上路

注册:
2021-11-7
曾用名:
 楼主| 发表于 2024-8-21 13:18 | 显示全部楼层
能不能做到这个效果?有这种高低标注和黄/白中枢的虚线
截图202408211318367758.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 微信登录

本版积分规则

手机版|小黑屋|上海金之塔信息技术有限公司 ( 沪ICP备13035422号 )

GMT+8, 2024-12-24 10:09 , Processed in 0.218023 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表