SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Wed Nov 25, 2020 10:32 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Tue Oct 01, 2013 5:49 am 
Offline

Joined: Tue Jul 30, 2013 6:28 am
Posts: 14
I have Quanttrader connected to QuantRouter and it is getting data from IQFEED, this is no issue here.
I also have locally IB for sending trades to. how ever I am not able to pull any sort of data from IB,
now if I sign into IB on quantrouter I have no problems pulling data from IB this way. what would be
the reason for not getting IB data when i sign into IB on the same machine as quanttrader. is QT
not able to get data from two sources?


Attachments:
File comment: this is odd that is trying to get data from QR when the settings r for IB
screenshot (2).png
screenshot (2).png [ 8.55 KiB | Viewed 5334 times ]
File comment: you can see here that the symbol QGC# which is pulling iqfeed data from QR works fine. however the GC Dec13 pulling from the local IB connection does not work. and you can see my Alt Settings too.
screenshot.png
screenshot.png [ 45.39 KiB | Viewed 5335 times ]
Top
 Profile  
 
PostPosted: Tue Oct 01, 2013 6:06 am 
Offline

Joined: Tue Jul 30, 2013 6:28 am
Posts: 14
I am seeing that there is an option under Options -> Modes that you specify where the market data comes from. and that being QR... so this means QT can only accept one market data provider and that being QR? so if I want both as data providers then I need to have all connected to QR correct?

how about if I do not want data from IB and just want to send orders to IB, I presume I can have this portion located on the same machine as QT?

am I able to connect multiple IB accounts to QR?


Attachments:
screenshot3.png
screenshot3.png [ 20.58 KiB | Viewed 5334 times ]
Top
 Profile  
 
PostPosted: Tue Oct 01, 2013 11:49 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Hi,

QT can receive data from one data source per mode, but you can configure QR so that it consolidates data from IB and IQFeed and sends consolidated data feed to QT. Please let me know if you need additional instructions.

Regards,
Anton


Top
 Profile  
 
PostPosted: Tue Oct 01, 2013 11:53 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
PS. From QR Getting Startegy Guide

9.2. Feed Consolidation
Task
Connect a strategy trading client application (OpenQuant) to a consolidated feed consisting of Hotspot
FX and Currenex FX feeds.
Solution
Use formula defining a consolidated stream.
For example to subscribe for EUR/USD Bid and Ask on Currenex and Bid, Ask and Trade on HotSpot use
the following formula:
EUR/USD(Currenex)Bid|Ask,EUR/USD(Hotspot)Bid|Ask|Trade


Top
 Profile  
 
PostPosted: Tue Dec 10, 2013 10:55 am 
Offline

Joined: Sat Feb 02, 2013 7:44 am
Posts: 18
Location: Islamabad
Hello Support,

Moving forward from you suggestion above, i would like to seek advice on something similar. My scenario is:

My strategy is running in OQ. What i would like is for it to use 2 different data feeds. I would like it to do all its calculations on IQFeed. But when the strategy generates a signal, it should use data from another provider to manage the orders etc. I have gone through the QuantRouter document and the part on feed consolidation, but i do not understand how i can make use of the multiple (consolidated) feeds available using QuantRouter.

Is what i want possible? If so, then how can i achieve this?

Hoping to hear from you soon.

Thanks


Top
 Profile  
 
PostPosted: Tue Dec 10, 2013 11:08 am 
Offline

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

Please take a look at this video:
http://smartquant.com/quantrouter/video ... tions.html

It shows how to setup instruments in OQ to consolidate/aggregate feeds using QR.

Regards,
Sergey.


Top
 Profile  
 
PostPosted: Tue Dec 10, 2013 12:52 pm 
Offline

Joined: Sat Feb 02, 2013 7:44 am
Posts: 18
Location: Islamabad
Hello Sergey,

Thank you for your prompt response.

As i mentioned in my original post, I understand this much i.e. how to add a consolidated feed. But, my question was how to use this in my scenario?

Quote:
My strategy is running in OQ. What i would like is for it to use 2 different data feeds. I would like it to do all its calculations on IQFeed. But when the strategy generates a signal, it should use data from another provider to manage the orders etc. I have gone through the QuantRouter document and the part on feed consolidation, but i do not understand how i can make use of the multiple (consolidated) feeds available using QuantRouter.

Is what i want possible? If so, then how can i achieve this?


Please help me with this.

Thanks


Top
 Profile  
 
PostPosted: Tue Dec 10, 2013 1:01 pm 
Offline

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

Perhaps you need to create two different instruments (one for IQFeed and one for another broker) and add them both to the MarketData section. Then in one instance of your strategy that corresponds to IQFeed you will get only IQFeed data, you can do any calculation you need and when you need to send an order you can call some function of the other instance of your strategy (that corresponds to another provider). This fuction can send an order on the second instrument and manage it using another provider data.

Do you see what I mean?

Regards,
Sergey.


Top
 Profile  
 
PostPosted: Tue Dec 10, 2013 1:10 pm 
Offline

Joined: Sat Feb 02, 2013 7:44 am
Posts: 18
Location: Islamabad
Hello Sergey,

Yeah, thank you for the suggestion.

So for the 2 instruments i create, i would need to provide only the required data provider in the symbol properties. Like you did separately in EUR/USD_CNX & EUR/USD_HS?

Regards


Top
 Profile  
 
PostPosted: Tue Dec 10, 2013 2:16 pm 
Offline

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

Yes, each instrument should be set up to be used with a given market data provider.

Regards,
Sergey.


Top
 Profile  
 
PostPosted: Tue Dec 10, 2013 2:17 pm 
Offline

Joined: Sat Feb 02, 2013 7:44 am
Posts: 18
Location: Islamabad
Understood. Thanks

I will try and let you know if i have any further questions.

Best
Umer


Top
 Profile  
 
PostPosted: Tue Dec 10, 2013 6:44 pm 
Offline

Joined: Sat Feb 02, 2013 7:44 am
Posts: 18
Location: Islamabad
ok so here is the complexity here:

Quote:
...and when you need to send an order you can call some function of the other instance of your strategy (that corresponds to another provider).


How can we communicate between different instances of the strategy? It would be very complex to communicate between the 2 instances in terms of coding as well as managing the solution.

Isn't there any other way to go about this? If not, then the functionality of providing consolidated data feed become literally useless in the broader perspective.

Hoping to hear from you soon.

Thanks


Top
 Profile  
 
PostPosted: Wed Dec 11, 2013 10:31 am 
Offline

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

Quote:
How can we communicate between different instances of the strategy?

Please see the following sample, it demonstrates how to call a method of one strategy instance from another one:
Code:
using System;
using System.Collections.Generic;
using System.Drawing;

using OpenQuant.API;
using OpenQuant.API.Indicators;

public class MyStrategy : Strategy
{   
   static Dictionary<string, MyStrategy> strategyTable = new Dictionary<string, MyStrategy>();
   
   public override void OnStrategyStart()
   {
      // register strategy instance in the table
      strategyTable[Instrument.Symbol] = this;
   }

   public override void OnBar(Bar bar)
   {
      // call MyFunc of another strategy instance
      if (Instrument.Symbol == "MSFT")
         strategyTable["CSCO"].MyFunc();
   }

   // user custom function
   public void MyFunc()
   {
      Buy(100);
   }
}

Quote:
Isn't there any other way to go about this?

Another option to accomplish what you need is to have 1 instrument that receives consolidated feed, but use ProviderId property of the incoming Trades and Quotes to realize where a given trade or quote comes from. Please note that bars will be generated using market data from both providers in this case, unless you build your own bars in the strategy code using ProviderId property of trades and quotes.

Regards,
Sergey.


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 0 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