用VB来写看看0 E% b$ `7 Y" R A4 b* R/ Y# k
4 f" H# p# R5 ~7 U% p% P+ u4 X
2 |4 d- X. L5 z4 R( z" W8 A
8 z% _4 a3 K% |: m- if DATAPERIOD<>0 then
4 Y( t5 u- b1 t5 j - begin2 a+ _5 x( F7 N
- DRAWTEXT(BARPOS=SYSPARAM(2)+10,1,'本指标只能用于分笔分析');% e: d4 f3 H& O7 I" S8 t
- exit;
4 }4 V* w: r( _; H+ L - end; ~- G$ ~( z3 N! @- {) p
- 5 U' f/ w% e1 m
- dd:=date;
& z1 Y( }( q- Z- i! e - : v5 T0 U9 m O: k7 N- u( F8 T
- str:=NUMTOSTR(time,0)+';'+NUMTOSTR(v,0)+';'+NUMTOSTR(c,2);
" D; ^. ?3 c* z4 ^) {5 H: u* Q - for i=25 to 36 do A) U+ G7 u/ s7 {2 H9 H, o' y
- begin
, x9 g7 |0 U/ d/ `: c9 i - str:=str+';'+NUMTOSTR(DYNAINFO(i),2);
^; W; u& n w# x5 T - end;7 B' v! L/ G% N K) D. F
- * V3 ^9 F* m: S1 U" K
- <%/ X9 _$ H1 Z, L
- vd1 = FFL.VarData("dd")% z" c' r/ ]0 ?9 \/ |& G# {' ~4 g
- vd2 = FFL.VarData("str")0 H8 `/ f0 q9 O# C
- nFirst = FFL.VarStartIndex("dd") . t+ C$ w7 ?+ @. i8 N1 r/ x0 j# \
6 | z! e' D! _1 H) J1 ~- Set fso=CreateObject("Scripting.FileSystemObject")
2 H1 l. f. p! O% i* F* \8 u - fn ="D:/fhdata/"+cstr(vd1(nFirst))+"data.txt"
3 B% w1 \' V! w/ K - " g& F4 g) A1 D+ `1 G- y1 n
- Set f1 = fso.OpenTextFile(fn,8,True)
( E8 {/ d, E$ N0 \% n x - f1.writeline vd2
6 ~$ g' S- @. f8 P7 f& I$ g% ]7 |7 p - f1.close
9 H8 W9 G1 K2 Y# Z/ Q+ }
- D M+ t& s; ~ e- %>
4 s4 V$ S- `( i$ Z: j6 g7 f - C7 j4 `8 {: q2 T6 y8 o1 B. W9 |! }
- aa:time;7 I: v6 c* R( B% K- O% V1 E
- Show File Failed
3 S: \! Y+ [* @' D# w# c# d
3 u; ` y# V0 s7 H7 V; }- ; `7 E. l* o' A1 F. X( N% l4 A
复制代码
5 N9 s' L2 U7 P0 R |