用VB来写看看' ~4 d5 \# ?$ C; T' ~
) s! H6 D# d: ?7 N
2 I: N! M3 w9 V$ s4 P
1 L4 f6 l" h" G' u$ E0 l! G% Q- if DATAPERIOD<>0 then
! v1 t1 o) L# Y9 _1 Y# j( n - begin6 \1 ~, M- v/ C
- DRAWTEXT(BARPOS=SYSPARAM(2)+10,1,'本指标只能用于分笔分析');
1 x8 S3 g6 N. n6 ]: R - exit;
) N! o. ~5 s1 Y5 ?( Z7 m9 i - end;
! V8 `' b! p; N" c L
; a1 Z3 t: E2 N* Z r- dd:=date;
! [: x( z" U% ]1 L8 |7 k
* Q9 y3 @0 p) q' `- S- str:=NUMTOSTR(time,0)+';'+NUMTOSTR(v,0)+';'+NUMTOSTR(c,2);
9 H1 X' O, b' T: a% q; s) r - for i=25 to 36 do
" Q# k8 @4 h- ]3 e: S4 j5 F& W' a - begin% v4 ]9 h! s* c3 e
- str:=str+';'+NUMTOSTR(DYNAINFO(i),2);
4 P9 D) W" {% n2 }" e' z3 p - end;& b( K4 @3 \! ]* X/ w8 }6 q& Y
$ I/ i# Q) \. R/ V! @- <%6 B( G4 x P7 S1 }$ w$ a+ f; n
- vd1 = FFL.VarData("dd")
: y9 ]9 j$ m+ [8 M& _ - vd2 = FFL.VarData("str")
" ~3 B; h& |0 ~8 z) ~& g( {/ I - nFirst = FFL.VarStartIndex("dd") 2 y: q) C8 ^& c) @8 w" r# s* H
- 3 A% q* L% h: ]: c& R/ @
- Set fso=CreateObject("Scripting.FileSystemObject")
$ v4 L$ b1 A+ }$ f9 Q" A - fn ="D:/fhdata/"+cstr(vd1(nFirst))+"data.txt"
& R; I! D ~2 t% w6 y0 U: ` - . }! p/ D4 O; [
- Set f1 = fso.OpenTextFile(fn,8,True)$ l! O5 l k& T2 S& S
- f1.writeline vd2' A) g7 v8 `. a f2 ~
- f1.close6 ^4 ^$ U( N. F8 J- W
) R5 |! F5 Y1 x3 _- %>
* C. \9 O5 V0 Q) M8 x$ _1 H) q8 u
( b) {9 J) F! j( u, \2 P- aa:time;
4 _. M$ v7 j2 Y& W - Show File Failed
: v# E6 \) i, A/ h; [8 P
4 m- I" L! K" W2 B* j" ^- / D* J/ ~8 z E
复制代码
0 b$ ~, v$ |0 X; n2 Z |