编写要求:
P:=20;{参数可以自己修改} AH:=REF(C,P)=HHV(C,2*P+1); BH:=FILTER(AH,P); CH:=BACKSET(BH,P+1); DH:=FILTER(CH,P);{高点} AL:=REF(C,P)=LLV(C,2*P+1); BL:=FILTER(AL,P); CL:=BACKSET(BL,P+1); DL:=FILTER(CL,P);{低点} 基点:=IF(C>MA(C,20),BARSLAST(DL),BARSLAST(DH)); {费波拉契(LEONARDO FIBONACCI)线} LE0:=BACKSET(ISLASTBAR,基点+1); FI0:=FILTER(LE0,基点); LE1:=BACKSET(ISLASTBAR,基点); FI1:=FILTER(LE1,基点); LE2:=BACKSET(ISLASTBAR,基点-1); FI2:=FILTER(LE2,基点); LE3:=BACKSET(ISLASTBAR,基点-2); FI3:=FILTER(LE3,基点); LE5:=BACKSET(ISLASTBAR,基点-4); FI5:=FILTER(LE5,基点); LE8:=BACKSET(ISLASTBAR,基点-7); FI8:=FILTER(LE8,基点); LE13:=BACKSET(ISLASTBAR,基点-12); FI13:=FILTER(LE13,基点); LE21:=BACKSET(ISLASTBAR,基点-20); FI21:=FILTER(LE21,基点); LE34:=BACKSET(ISLASTBAR,基点-33); FI34:=FILTER(LE34,基点); LE55:=BACKSET(ISLASTBAR,基点-54); FI55:=FILTER(LE55,基点); LE89:=BACKSET(ISLASTBAR,基点-88); FI89:=FILTER(LE89,基点); LE144:=BACKSET(ISLASTBAR,基点-143); FI144:=FILTER(LE144,基点); LE233:=BACKSET(ISLASTBAR,基点-232); FI233:=FILTER(LE233,基点); LE377:=BACKSET(ISLASTBAR,基点-376); FI377:=FILTER(LE377,基点); 费线高:=REFDATE(HHV(H,233),DATE); 费线低:=REFDATE(LLV(L,233),DATE); STICKLINE(FI0,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=1 AND FI1,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=2 AND FI2,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=3 AND FI3,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=5 AND FI5,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=8 AND FI8,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=13 AND FI13,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=21 AND FI21,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=34 AND FI34,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=55 AND FI55,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=89 AND FI89,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=144 AND FI144,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=233 AND FI233,费线高,费线低,0,1),COLORWHITE; STICKLINE(基点>=377 AND FI377,费线高,费线低,0,1),COLORWHITE; DRAWTEXT(FI0,费线低,'0'); DRAWTEXT(基点>=3 AND FI3,费线低,'3'); DRAWTEXT(基点>=5 AND FI5,费线低,'5'); DRAWTEXT(基点>=8 AND FI8,费线低,'8'); DRAWTEXT(基点>=13 AND FI13,费线低,'13'); DRAWTEXT(基点>=21 AND FI21,费线低,'21'); DRAWTEXT(基点>=34 AND FI34,费线低,'34'); DRAWTEXT(基点>=55 AND FI55,费线低,'55'); DRAWTEXT(基点>=89 AND FI89,费线低,'89'); DRAWTEXT(基点>=144 AND FI144,费线低,'144'); DRAWTEXT(基点>=233 AND FI233,费线低,'233'); DRAWTEXT(基点>=377 AND FI377,费线低,'377'); 费波拉契线 如截图显示也可以。谢谢!
解答:
?{参数: 开关(0,1,0) 始点(0,9999,60)}
AB:=BARSLAST(CONST(BARSLAST(C>=REF(C,1)*0.97 AND C=H))+1=CURRBARSCOUNT);
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!