SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue May 21, 2019 6:22 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Feb 22, 2012 5:19 pm 
Offline

Joined: Wed Feb 01, 2012 4:57 pm
Posts: 7
Hi,

I´m using the example code "How to switch continuously from Simulation to Live mode" and I added load historical data from IB (to complete my data). I was expecting a OnBar(Bar bar) call (included in my strategy), but it´s not the case...
Am I missing something ?

Code:
        public override void Run()
        {
                Project project = Solution.Projects[0];
                Instrument eurusd = project.Instruments["EUR.USD"];
               
                foreach (Bar bar in DataManager.GetHistoricalBars("IB",eurusd, new DateTime(2012,02,13), Clock.Now,1800))
                        DataManager.Add(eurusd, bar);
               
                this.Solution.StartDate = new DateTime(2012,02,13);
                this.Solution.StopDate = Clock.Now;
               
                Start(StrategyMode.Simulation);
                this.ResetOnStart = false;
                Start(StrategyMode.Live);
        }


Rgds,
jean-philippe


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 11:12 am 
Offline

Joined: Wed Oct 08, 2003 1:06 pm
Posts: 833
Hi,

Could you please make sure you are getting at least one historical bar from IB (check in OQ database or/and print historical bars in the scenario code)?

Regards,
Sergey.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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