SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue Mar 31, 2020 5:48 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Oct 24, 2019 2:01 pm 
Offline

Joined: Mon Aug 05, 2019 7:11 pm
Posts: 15
In my provider I can use this:
Code:
base.EmitData(bid, true);


An in my strategy catch bid price with:
Code:
protected override void OnBid(Instrument instrument, Bid bid)


But this is only best bid price(bid1). If I want bid2,bid3.... then what should I do?


Top
 Profile  
 
PostPosted: Thu Oct 24, 2019 3:42 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 566
dave10030 wrote:
In my provider I can use this:
Code:
base.EmitData(bid, true);


An in my strategy catch bid price with:
Code:
protected override void OnBid(Instrument instrument, Bid bid)


But this is only best bid price(bid1). If I want bid2,bid3.... then what should I do?

Hi,
I suppose you want to retrieve market depth, so you should subscribe events like OnLevel2.
From provider side, you should send Level2Snapshot or Level2Update.


Top
 Profile  
 
PostPosted: Mon Feb 17, 2020 8:00 pm 
Offline

Joined: Wed Sep 26, 2007 10:03 pm
Posts: 101
Quote:
I suppose you want to retrieve market depth, so you should subscribe events like OnLevel2.
From provider side, you should send Level2Snapshot or Level2Update.


Could you provide a small code example how you would retrieve Level2 data from IB in OnLevel2()?


Top
 Profile  
 
PostPosted: Wed Feb 19, 2020 3:07 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 566
brankov wrote:
Quote:
I suppose you want to retrieve market depth, so you should subscribe events like OnLevel2.
From provider side, you should send Level2Snapshot or Level2Update.


Could you provide a small code example how you would retrieve Level2 data from IB in OnLevel2()?

In strategy:

Code:
public override void OnLevel2(Instrument instrument, Level2Snapshot snapshot)
{

}

public override void OnLevel2(Instrument instrument, Level2Update update)
{

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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