用VB来写看看
9 v* x5 r2 i: O" r; D# k( o; @ @$ l% f) |
' l3 Q% w& A- z- m7 I' _- " f# W; z9 W; T! Z3 L3 @( a
- if DATAPERIOD<>0 then
* K, K. a; S' W0 j - begin/ E5 m* @) H! A, U+ A. x7 C3 f, u
- DRAWTEXT(BARPOS=SYSPARAM(2)+10,1,'本指标只能用于分笔分析');
8 v1 e( i2 a% n5 J, d - exit;2 f3 `/ \ E8 P5 a- V* _9 o8 e
- end;
% n" i( l1 [% Q! G& Z - * C$ [/ ~% A: L- ~
- dd:=date;
- s% |' K$ c, C! l1 v. Z$ h2 f; c
$ D$ N1 |; M, A& B, U" S5 {- str:=NUMTOSTR(time,0)+';'+NUMTOSTR(v,0)+';'+NUMTOSTR(c,2);
- S: L8 k7 E& Q& c - for i=25 to 36 do
* w& w* _) ~8 g+ J - begin" H) o0 U! E+ }4 p
- str:=str+';'+NUMTOSTR(DYNAINFO(i),2);6 u4 G1 I3 z( z0 ?
- end;) \0 I3 z# \- C# M8 z3 ~2 ^& |
, B, M! G- _: {1 D- <%
) B5 ~9 i+ u! S9 V2 W* \+ C - vd1 = FFL.VarData("dd")
4 N+ {' L/ [- e) s' y# b+ x$ |# _ - vd2 = FFL.VarData("str")
: U5 P% }3 d. a$ H% z - nFirst = FFL.VarStartIndex("dd") . i' z' Q) I b
- : j: H3 f$ W7 r5 B
- Set fso=CreateObject("Scripting.FileSystemObject")
0 M M& T8 N" @2 V6 V3 L - fn ="D:/fhdata/"+cstr(vd1(nFirst))+"data.txt") _& c7 e% ~3 H5 l: R! ~. c$ c
! |" x2 H5 R, |) N- Set f1 = fso.OpenTextFile(fn,8,True)
6 f* L+ j3 U$ u0 H/ J7 o# ~ @ - f1.writeline vd2, K. D7 Z" C: e4 u0 M
- f1.close* s% p9 W2 Z/ X
- . B8 O" \# R7 K( F
- %>/ v; y. `$ ^; K* m. f# y
- ( T) |1 V" C9 O3 ^+ g- |
- aa:time;
7 x; U! J+ V( p! t- E2 Y - Show File Failed8 r- J. m$ t) I8 |4 d
- 0 O- g$ g" A& z9 _* G+ K$ c: ~
- + ^5 ?3 x5 q8 T1 |5 [. p
复制代码
5 c5 p: M" s5 A9 ]9 j1 L |