用VB来写看看
- h( J# o; {" W6 O- ~' D& J1 c) v# j; d* N4 c( r
- - s2 e, n/ X. i" R6 L- C' B5 E+ F) W
7 O' s/ u" U: i x1 `/ O/ b$ L( A7 s- if DATAPERIOD<>0 then
1 L% W# f& S* Y4 s - begin5 N* [, @2 t8 g3 Z
- DRAWTEXT(BARPOS=SYSPARAM(2)+10,1,'本指标只能用于分笔分析');
2 V+ ]8 S) D" n* S+ M# C - exit;
) \' Q3 P3 j7 I - end;# M9 z3 s( L! o/ ?% L
5 {' P/ D) O$ Y' C- dd:=date;
5 C& \/ X5 B' w7 I( G( N) h - 7 @6 l' q2 _$ Y: {" B
- str:=NUMTOSTR(time,0)+';'+NUMTOSTR(v,0)+';'+NUMTOSTR(c,2);6 F0 S) ~" O/ m6 k
- for i=25 to 36 do
7 U h4 z$ ]- N1 h# t1 y6 F - begin J( t" I/ _' `- Y# a
- str:=str+';'+NUMTOSTR(DYNAINFO(i),2);
) z$ Y9 @% p/ n0 x - end;# R9 M9 P! c& i( W. m! K9 n( L
- , t) q2 P3 o# u2 V8 _7 {) N
- <%9 C$ f; g4 l7 b. j! [7 Y
- vd1 = FFL.VarData("dd"). K/ o |) }8 O. h
- vd2 = FFL.VarData("str")
# r4 Z" s! e5 |7 o# Z+ | - nFirst = FFL.VarStartIndex("dd") 2 f9 j6 t5 F- {4 `$ p
- 9 N9 }' D9 _# h; W0 V
- Set fso=CreateObject("Scripting.FileSystemObject")
9 X' T. b7 y% { \* ]6 s5 {5 F - fn ="D:/fhdata/"+cstr(vd1(nFirst))+"data.txt"
8 Q/ s. i! \4 a: m - 2 l+ _2 L# Q, S' w
- Set f1 = fso.OpenTextFile(fn,8,True)( T& s- L, a, }. s
- f1.writeline vd2
6 M$ p; L& d& X, M) K. } - f1.close
- b! _( G, T" R# f
, ?' p% y, k, Q! v8 n- %>
+ Q6 H k6 V" `2 K - $ e0 |( z( e. U" u( w
- aa:time;* J0 b I( [2 s; v- n, |1 w5 Q
- Show File Failed
( }# L+ Z; A$ m. E& c
, L% H. u, V; D( E7 @4 |
' ?3 q* i* p+ l7 r3 H+ X
复制代码
. y0 k! ?8 a2 J1 g7 m9 R( A6 f! Q |