用VB来写看看
5 Z* ?, n, b! H6 t4 S8 F8 F7 g
) O! C4 f0 S9 d5 h
: |3 A0 N% B/ o# t& w7 ]
# _# p! k8 r3 C' r. d: o5 S: P- if DATAPERIOD<>0 then
/ f/ K* z; {# H - begin
$ c4 q! C9 D* {1 L5 E" Q3 b( L+ q% x - DRAWTEXT(BARPOS=SYSPARAM(2)+10,1,'本指标只能用于分笔分析');
$ H' L8 H: R4 M& Y- B5 E& @ - exit;+ h4 d8 f9 E1 g& L
- end;1 `' P; z/ B D2 h5 N
: b( E: t8 }' d% h2 T' l1 L- dd:=date;
' {8 @- x3 k- l) `; S: D& j7 `9 \
& k; z- B' a" r6 @9 E- str:=NUMTOSTR(time,0)+';'+NUMTOSTR(v,0)+';'+NUMTOSTR(c,2);4 L7 {2 @* q ^7 b1 l. V& x
- for i=25 to 36 do
+ [- U0 v' B) D& y4 T# ] - begin, Q1 G+ S+ o* z
- str:=str+';'+NUMTOSTR(DYNAINFO(i),2);2 h( [- S( G3 \
- end;9 B( x7 R' K( P( h* ?! i) c3 ]
* h: t# u( {8 N1 V2 J$ E$ n- n4 ]- <%. F# k/ P$ f! ?2 U" ?" l
- vd1 = FFL.VarData("dd")7 U; V4 L+ ^7 m& N
- vd2 = FFL.VarData("str")
, k* I5 s- P8 Q- v6 n - nFirst = FFL.VarStartIndex("dd") # w% j" H7 v4 B @5 P5 a
- & R& p: E. F' r, ?( l
- Set fso=CreateObject("Scripting.FileSystemObject")
6 P& |4 D6 @0 ~( t. N/ d6 x7 g - fn ="D:/fhdata/"+cstr(vd1(nFirst))+"data.txt"
" u1 ^* R6 {4 j1 a
9 C* u- [! w2 v5 L+ T T- Set f1 = fso.OpenTextFile(fn,8,True)
( i9 e: J/ r) T( j* L3 F0 L, O - f1.writeline vd26 H, P" f/ o6 S+ R; t% E
- f1.close
: z" X1 z! ~7 D' G* v - ( s+ p+ |0 q) J
- %>
4 n6 D' Q6 |0 Z9 ] u B% o
% L6 M0 x* B% B9 D9 ]- aa:time;% U2 x9 O4 R* l+ Y; e
- Show File Failed
: L. }, H1 D7 X4 G+ d1 O
: y* S5 }! q5 P7 \& R/ T' I- S' X& W, P% P% n6 J$ b: |
复制代码 : `, `' v3 |" C6 d: ?& c5 X3 D
|