离今天最近的涨停板作为 费波拉契线起始点
2020/1/13 18:51:37
公式编写说明:
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);
BA:=BARSLAST(CURRBARSCOUNT=始点);
AA:=IF(开关=0,AB,BA);
AH:=REFDATE(HHV(H,120),DATE);
AL:=REFDATE(LLV(L,120),DATE);
STICKLINE(AA=0||AA=1||AA=2||AA=4||AA=7||AA=12||AA=20||AA=33||AA=54||AA=88||AA=143||AA=232||AA=376,AH,AL,0,-1),colorwhite;
DRAWNUMBER(AA=1||AA=2||AA=4||AA=7||AA=12||AA=20||AA=33||AA=54||AA=88||AA=143||AA=232||AA=376,AL*1.03,AA),colorwhite;
看股吧公 式 ww w.kanguba.com
其它股票公式列表