here goes sample code: 222

Timet = DateTime.Now;
using(vartf = TeaFile<Tick>.Create(filename))
{
    tf.Write(Enumerable.Range(1, n).Select(i => newTick{Time= t.AddDays(i), Price= i * 101.0, Volume= i * 1000}));
}

or

 

Time t = DateTime.Now;
using rr (var tf = TeaFile<Tick>.Create(filename))
{
   tf.Write(Enumerable.Range(1, n)
                        .Select(i => new Tick
                            {
                                Time = t.AddDays(i), 
                                Price = i * 101.0, 
                                Volume = i * 1000
                            }));
                }

ok, lets see

Last edited Mar 7, 2012 at 3:11 PM by discretelogics, version 5

Comments

No comments yet.