原帖由 logoslogos 于 2013-7-14 10:08 发表 ) D7 U1 S7 ~" s. M
Y兄,还有一个思路,能否实现再编写一个:9 y# g' o4 L0 J
1.准许设定开始的日期(日,周,月)
! i+ O8 e$ U- C5 t9 Q2.能否搞个用于5分钟图的,并且开始点能否让自如输入设定?这样就可以用于期货的日内短线了。。。我的意思您能明白吧? 万分感谢& f: K9 f8 x. \' l5 L& {& B4 U6 ?
...
) o0 W1 ]" K8 x
$ M4 M7 h; F/ N. ^6 ]; ~' i有二法可编之' G% @+ ? y1 z6 ?5 h' T2 Y2 V% m
第一法:是输入日期如:; C! ~7 r6 \( X6 j
1 X$ c0 O( X+ ~. z5 c
1010924 -----> 20010924( N( e5 {1 c o' S3 [1 A' e
20130124------>公式给入1130124
& G6 S- p. i, g) { M这是日K线情形,至于周或月飞狐似乎无直接可引用的函数, 在周或月可用第二法
# D4 w2 p7 o/ y: i( N/ L! U日期长度超过,可自行加上drawnumber函数
4 ` Y, B1 ?; R& @" K: s. H) }----------------------------------------------------------------------------------
$ p, g* p) w" A6 M* d! g & p: u6 E. P+ k( J
dat1:=barslast(date=1010924);
: D) k5 e" B4 O& U( f( t$ kstickline(mod(dat1,15)=0,hhv(h,count(c,0)),llv(L,count(c,0)),1,0),color00ffff,pointdot;9 W! t% @3 J4 M9 B, }, Y
drawnumber(dat1<=360 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1,0),colorff00ff,shift1;# I5 B, m9 c6 r
drawnumber(dat1>360 and dat1<720 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-360,0),colorff00ff,shift1;
7 Q. K/ E Z0 t2 O* Wdrawnumber(dat1>720 and dat1<1080 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-720,0),colorff00ff,shift1;4 ]2 u9 y; V# ~, U2 A! d
drawnumber(dat1>1080 and dat1<1440 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-1080,0),colorff00ff,shift1;, O) o7 t! L* u. e. ^
drawnumber(dat1>1440 and dat1<11800 and mod(dat1,15)=0,hhv(h,count(c,0)),dat1-1440,0),colorff00ff,shift1;
7 K- g. {2 q. w0 q- b- y - o4 p5 R" }0 F- @* Q m' ~' C1 r4 Z. i: g
第二法:是移动飞狐老鼠十字光标到目标日期K线(日周月均可):
0 \1 X C- x. @& l) v& o8 Z, o; Y5 B3 [' V3 ]9 J
此法是直接沟通公式与老鼠十字光标,应用到sysparam函数,所以执行极慢
6 c/ _/ U3 l# h& q3 t0 t: {/ u
6 V8 n. L" U, l' I2 l8 u. [dat2:=barslast(barpos=sysparam(1));- ] m9 G$ q# W4 {+ M) n
stickline(mod(dat2,15)=0,hhv(h,count(c,0)),llv(L,count(c,0)),1,0),color0000ff,pointdot;* i# R8 z5 A/ [6 Y- Q
drawnumber(dat2<=360 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2,0),colorffffff,shift1;9 l4 s2 N. ]. L9 X3 h
drawnumber(dat2>360 and dat2<720 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-360,0),colorffffff,shift1;
/ w6 H" C4 j4 k; `0 S! f' ^. u$ idrawnumber(dat2>720 and dat2<1080 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-720,0),colorffffff,shift1;; q! R; G: v" D( A5 \6 N* F+ |
drawnumber(dat2>1080 and dat2<1440 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-1080,0),colorffffff,shift1;
& x& k/ X. w$ V7 xdrawnumber(dat2>1440 and dat2<11800 and mod(dat2,15)=0,hhv(h,count(c,0)),dat2-1440,0),colorffffff,shift1;) t$ c6 j/ ?- U6 y% R( ~; ?# ~
/ S2 n8 ]4 q; D/ D5 t# e+ \
我自用的是公式直接自动定位波浪高低点起位,但此法未曾外给 (这与先前说过的含二个理念无关)2 \9 b M# ^9 o# A
至于5分钟的分时公式,抱歉未编过,你可以用上面公式商请会编分时公式的朋友依样修改
9 L1 h# w0 V2 T8 `5 X" T$ s8 k' H8 t# N1 Z2 I" a, \: S# p, E
[ 本帖最后由 ycng 于 2013-7-14 16:52 编辑 ] |