原帖由 logoslogos 于 2013-7-14 10:08 发表 ![]()
6 D8 O9 K/ I4 ^! dY兄,还有一个思路,能否实现再编写一个:# J# k% y$ y6 S) }; o3 b
1.准许设定开始的日期(日,周,月)7 b6 O, z. k% N) s. R- i
2.能否搞个用于5分钟图的,并且开始点能否让自如输入设定?这样就可以用于期货的日内短线了。。。我的意思您能明白吧? 万分感谢
2 g' H0 {* h0 \0 ~. t ... ( t: C" `0 s& @/ [/ d3 R4 s
- N: r8 Q9 t+ u, `# y有二法可编之
2 u3 w' [' j9 X6 U第一法:是输入日期如:
7 d7 F3 \: B7 L) u" X' X( g3 S" G3 Y2 h
1010924 -----> 20010924. ~0 p- A8 \* M$ Q0 V1 W* ~
20130124------>公式给入1130124% {7 A3 R& ^; M* h0 ^
这是日K线情形,至于周或月飞狐似乎无直接可引用的函数, 在周或月可用第二法" q; W/ k3 L! q6 s% F& e1 X( M! q
日期长度超过,可自行加上drawnumber函数+ D/ r3 O- t1 t3 V9 P& _
----------------------------------------------------------------------------------
! M" J7 K/ Y9 Z! `+ m3 ~ ! E/ ~7 _6 K( |
dat1:=barslast(date=1010924);; P1 p7 Q( Z* i9 Z
stickline(mod(dat1,15)=0,hhv(h,count(c,0)),llv(L,count(c,0)),1,0),color00ffff,pointdot;1 w+ O+ J( `' m
drawnumber(dat1<=360 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1,0),colorff00ff,shift1;2 N1 l1 r% t$ B7 W& r# E/ g0 C( J
drawnumber(dat1>360 and dat1<720 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-360,0),colorff00ff,shift1;, G' }$ ^9 V! E: z' B4 U+ S
drawnumber(dat1>720 and dat1<1080 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-720,0),colorff00ff,shift1;
8 c. P! F3 W8 k* V7 zdrawnumber(dat1>1080 and dat1<1440 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-1080,0),colorff00ff,shift1;
7 y/ Y+ @' j8 \* ?" A4 Q" R, e/ sdrawnumber(dat1>1440 and dat1<11800 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-1440,0),colorff00ff,shift1;+ O( p5 w& i- B6 O2 f4 ~7 `, N
( b! N6 a; O! y9 u7 W, } @+ Z
第二法:是移动飞狐老鼠十字光标到目标日期K线(日周月均可):$ u @: E8 b- h+ k. F
`2 V1 H9 a- {. Q/ l j: K( x此法是直接沟通公式与老鼠十字光标,应用到sysparam函数,所以执行极慢) b" u/ f7 }& e. l% {- m% P' t
6 J w; D* C8 L( o; Ddat2:=barslast(barpos=sysparam(1));8 N# o% G5 s# k
stickline(mod(dat2,15)=0,hhv(h,count(c,0)),llv(L,count(c,0)),1,0),color0000ff,pointdot;
# r2 ]; J! q. c" ^( M1 Bdrawnumber(dat2<=360 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2,0),colorffffff,shift1;
- q3 v W/ n; g3 ydrawnumber(dat2>360 and dat2<720 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-360,0),colorffffff,shift1; o8 d( l3 H5 L6 b
drawnumber(dat2>720 and dat2<1080 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-720,0),colorffffff,shift1;
K( r# H& [$ k$ I' bdrawnumber(dat2>1080 and dat2<1440 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-1080,0),colorffffff,shift1;
3 r. C, ?' h; T( d7 kdrawnumber(dat2>1440 and dat2<11800 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-1440,0),colorffffff,shift1;9 {% } R8 k: Z N5 u
/ L- Z( x4 f8 c$ R* r$ D! V我自用的是公式直接自动定位波浪高低点起位,但此法未曾外给 (这与先前说过的含二个理念无关)* l6 t' Q7 U+ `# J
至于5分钟的分时公式,抱歉未编过,你可以用上面公式商请会编分时公式的朋友依样修改 F/ u- m; x+ w/ D
$ N* H) X4 b; n9 `2 ]
[ 本帖最后由 ycng 于 2013-7-14 16:52 编辑 ] |