资源描述:
《【股票指标公式下载】-【大智慧】波神凯线(测量、做多)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、【大智慧】波神凯线(测量、做多)-指标公式源码INPUT:年(8,0,100),月(1,1,12),日(1,1,31),年2(8,0,100),月2(1,1,12),日2(1,1,31),做多吗(1,0,1),测量(1,1,4);DATE1:=年*10000+月*100+日+1000000;DATE2:=年2*10000+月2*100+日2+1000000;hh:=ref(h,BARSLAST(DATE1=DATE));HH2:=IF(ref(h,barslast(DATE1=DATE))2、T(DATE1=DATE)-1),IF(ref(h,barslast(DATE1=DATE))[REF(l,BARSLAST(DATE1=DATE)-1),ref(l,BARSLAST(DATE1=DATE)-1),IF(ref(l,barslast(DATE1=DATE))>REF(l,BARSLAST(DATE1=DAT]
3、E)-2),REF(l,BARSLAST(DATE1=DATE)-2),ref(l,BARSLAST(DATE1=DATE)-1)));hh31:=ref(o,BARSLAST(DATE1=DATE));hh32:=ref(c,BARSLAST(DATE1=DATE));hh3:=min(hh31,hh32);LL3:=max(hh31,hh32);HH4:=if(做多吗,ref(h,barslast(DATE=DATE2)),ref(h,barslast(DATE=DATE1)));LL4:=if(做多吗,ref(L,barslast(DATE=DATE1)),ref(L,
4、barslast(DATE=DATE2)));LLOW:=ref(LOW,BARSLAST(DATE1=DATE));H1:=STRTONUM(NUMTOSTR(Hh));L1:=STRTONUM(NUMTOSTR(LLOW));H2:=STRTONUM(NUMTOSTR(HH2));L2:=STRTONUM(NUMTOSTR(LL2));h3:=STRTONUM(NUMTOSTR(Hh3));L3:=STRTONUM(NUMTOSTR(LL3));H4:=STRTONUM(NUMTOSTR(HH4));L4:=STRTONUM(NUMTOSTR(LL4));LL1:=if(
5、测量=1,H1-L1,IF(测量=2AND做多吗=1,H2-L1,IF(测量=2AND做多吗<>1,H1-L2,IF(测量=3AND做多吗=1,H3-L1,IF(测量=3AND做多吗<>1,H1-L3,IF(测量=4,H4-L4,H4-L4))))));LL:=STRTONUM(NUMTOSTR(LL1));VERTLINE(date=date1,0),COLORB0B0B0,LINETHICK2;IF测量=4THENVERTLINE(date=date2,1),COLORBBBBBB;if做多吗=1thenbegin多开门:LL*1.508+L1,COLORRED,line
6、thick2;一线:L1+LL*2,COLORWHITE,dotline;二线:L1+LL*2.4,COLORWHITE,dotline;三线:L1+LL*3.05,color0045FF;四线:L1+LL*3.75,COLORWHITE,dotline;五线:L1+LL*4.15,color00A5FF;六线:L1+LL*4.8,COLORWHITE,dotline;七线:L1+LL*5.5,colorCBC0FF;八线:L1+LL*6.1,COLORWHITE,dotline;多关门:L1+LL*6.90001,linethick2;DRAWTEXT(barstatus=
7、2,LL*1.50801+L1,numtostr(LL*1.508+L1)+'多开门'),COLORB0B0B0,ALIGN2;DRAWTEXT(BARSTATUS=2,L1+LL*3.05001,numtostr(L1+LL*3.05)+'No:3'),COLORB0B0B0,ALIGN2;DRAWTEXT(BARSTATUS=2,L1+LL*4.15001,numtostr(L1+LL*4.15)+'No:5'),COLORB0B0B0,ALIGN2;DRAWTEXT(BARSTATUS=2,L1+