SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Thu Dec 13, 2018 9:52 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 62 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
 Post subject: Re: Финам TRANSAQ
PostPosted: Mon Jun 16, 2014 3:39 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6810
Концепция не изменилась, т.к. квантбейз сделан на базе старого фреймворка. В новом фреймворке (ок2014) в тиках есть время биржи, которое можно читать и писать в базу ок2014 или использовать через квантфайлсервер.

Антон


Top
 Profile  
 
 Post subject: Re: Финам TRANSAQ
PostPosted: Mon Jun 16, 2014 4:02 pm 
Offline

Joined: Mon Aug 01, 2011 9:31 am
Posts: 62
Здравствуйте, grinboy.

Загрузить и сохранить данные в QuantBase можно следующим скриптом:
Code:
using System;
using OpenQuant.API;

public class LoadHistoryQB : Script
{
   [Parameter]
   public string Instrument = "AAPL";
   
   [Parameter]
   public string Provider = "IQFeed";

   public override void Run()
   {
      Instrument instrument = InstrumentManager.Instruments[Instrument];

      // Load 1 minute bars.
      BarSeries barSeries = DataManager.GetHistoricalBars(Provider, instrument, DateTime.Now.Date, DateTime.Now, 60);

      // Save bars.
      foreach (Bar bar in barSeries)
         DataManager.Add(instrument, bar);

      Console.WriteLine("Loaded and added {0} bars", barSeries.Count);
   }
}

_________________
SmartQuant Development Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 62 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group