原帖由 logoslogos 于 2013-7-14 10:08 发表 # c. X; X- X, l+ l( E
Y兄,还有一个思路,能否实现再编写一个:9 d5 p. W0 e" G3 @
1.准许设定开始的日期(日,周,月)
( g4 y5 b, w; r& Q( k/ O2.能否搞个用于5分钟图的,并且开始点能否让自如输入设定?这样就可以用于期货的日内短线了。。。我的意思您能明白吧? 万分感谢% x2 G6 l+ w; }7 X
... 8 A2 Q- O6 ~! E% L
`3 n1 }1 [+ m- J有二法可编之0 e* G4 n {* B( l6 R. Z, |$ k7 }
第一法:是输入日期如:, _2 I$ _6 V3 Q' C& L7 q
9 @4 B# X- a6 z1010924 -----> 20010924
& X$ ~ V; S* E5 K+ \" `! S9 {. a6 ]20130124------>公式给入1130124
# H0 b/ e- r: c+ l这是日K线情形,至于周或月飞狐似乎无直接可引用的函数, 在周或月可用第二法& j* p" b% b2 O! @: E/ g
日期长度超过,可自行加上drawnumber函数
$ D( ~1 ^/ r' f----------------------------------------------------------------------------------6 P. z j2 `5 n' b ]% f& N
3 w' q( o; b' y
dat1:=barslast(date=1010924);
( o" r$ L, [/ G7 Z! Q2 sstickline(mod(dat1,15)=0,hhv(h,count(c,0)),llv(L,count(c,0)),1,0),color00ffff,pointdot;
! Q1 N# b! d6 l9 _9 Cdrawnumber(dat1<=360 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1,0),colorff00ff,shift1;
# s8 N) z& s/ d0 L, q) r1 X+ pdrawnumber(dat1>360 and dat1<720 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-360,0),colorff00ff,shift1;, t$ V2 Y! I: r# X/ V1 e/ v
drawnumber(dat1>720 and dat1<1080 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-720,0),colorff00ff,shift1;0 x1 V1 K" |. ?
drawnumber(dat1>1080 and dat1<1440 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-1080,0),colorff00ff,shift1;
) H w* _9 J1 {% B' _: f, vdrawnumber(dat1>1440 and dat1<11800 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-1440,0),colorff00ff,shift1;
% M" R9 o0 [, o7 D 4 P! S1 a5 _. R! {- r+ ]
第二法:是移动飞狐老鼠十字光标到目标日期K线(日周月均可):
+ R" v( a) P; l3 D& r& B( U
' p" |) c. V5 o/ L9 l此法是直接沟通公式与老鼠十字光标,应用到sysparam函数,所以执行极慢
- Z# b$ _8 \. O% h
$ l2 N: d: n6 D9 b2 Ydat2:=barslast(barpos=sysparam(1));6 c4 Y6 s* p0 Q, L) V7 v
stickline(mod(dat2,15)=0,hhv(h,count(c,0)),llv(L,count(c,0)),1,0),color0000ff,pointdot;* i8 E( Q) u( W# a+ e
drawnumber(dat2<=360 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2,0),colorffffff,shift1;
4 V9 r' ^# y6 H' G+ Q. u" ydrawnumber(dat2>360 and dat2<720 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-360,0),colorffffff,shift1;, ^1 c6 ~+ U p- O1 M0 C
drawnumber(dat2>720 and dat2<1080 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-720,0),colorffffff,shift1;
3 \/ g5 P5 V: B: Q7 \drawnumber(dat2>1080 and dat2<1440 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-1080,0),colorffffff,shift1; f) K$ P7 e4 E' R7 e5 H
drawnumber(dat2>1440 and dat2<11800 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-1440,0),colorffffff,shift1;2 y3 `3 }$ q& o% a, N+ x
0 V6 @. A& O6 {1 A我自用的是公式直接自动定位波浪高低点起位,但此法未曾外给 (这与先前说过的含二个理念无关)
( [8 F: ~. n; i7 A至于5分钟的分时公式,抱歉未编过,你可以用上面公式商请会编分时公式的朋友依样修改0 Q" i+ |* T3 S5 N* x, W9 u3 b# h
% g* c1 U. w* I1 Z" m! p[ 本帖最后由 ycng 于 2013-7-14 16:52 编辑 ] |