Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IQFeed Futures data request #44

Closed
jasonnator opened this issue Apr 10, 2015 · 7 comments
Closed

IQFeed Futures data request #44

jasonnator opened this issue Apr 10, 2015 · 7 comments

Comments

@jasonnator
Copy link
Contributor

English:
Sample -> IQFeed -> HistoryCandlesWindow.xaml.cs

var candles = MainWindow.Instance.Trader.GetHistoricalCandles(_security, typeof(TimeFrameCandle), (TimeSpan)TimeFramePicker.SelectedValue, (DateTime)DateFromPicker.Value, (DateTime)DateToPicker.Value, out isSuccess);

problem: _security includes "@xxxx" where xxxx is the exchange (ALL, NYMEX, etc.)

solution (hack)
// HACK: remove exchange from future contract
if (_security.Id.Substring(0, 1) == "@" || _security.Id.Substring(0, 1) == "+")
_security.Id = _security.Code;

Verified to work with M6E#, 6N#, ES#, etc.

Russian:
Sample -> IQFeed -> HistoryCandlesWindow.xaml.cs

var candles = MainWindow.Instance.Trader.GetHistoricalCandles(_security, typeof(TimeFrameCandle), (TimeSpan)TimeFramePicker.SelectedValue, (DateTime)DateFromPicker.Value, (DateTime)DateToPicker.Value, out isSuccess);

Проблема: _security включает в себя "xxxx", где ХХХХ обмен (ALL, NYMEX, и т.д.)

решение (хак)
// Код: удалить обмена из будущего контракта
if (_security.Id.Substring(0, 1) == "@" || _security.Id.Substring(0, 1) == "+")
_security.Id = _security.Code;

Проверенные работать с M6E #, 6 н #, Е. С. #, и т.д.

@mikasoukhov
Copy link
Contributor

Hi Jason

  1. Please use one lang in bug reports.
  2. Can you clarify the problem? Because Security.Id should to include exchange code (electronic board code from where market data were received). Security.Id = Symbol@Board

@jasonnator
Copy link
Contributor Author

  1. Ok, no problem.
  2. below:

When trying to pull futures data in hydra or studio (used precompiled binaries from web), no information would ever get pulled in using IQFeed as the connector. So then I pulled the latest Github source and tried the sample IQFeed project and AAPL will pull data fine but still not any futures. I inserted a break point at HistoryCandlesWindow.xaml.cs and looked at the _security parameter. Since @es#@ALL is an invalid id at IQFeed, I always got an invalid security error from the sample program.

I used the hack above to parse off the @ALL and the sample program worked fine and was able to pull the candles in to populate the chart.

@jasonnator
Copy link
Contributor Author

IQFeed ES symbol lookup:
http://www.iqfeed.net/symbolguide/index.cfm?symbolguide=lookup&displayaction=support&section=guide&web=iqfeed&alpha=1&start=1

StockSharp appears to be querying IQFeed with @es#@ALL which is invalid

@mikasoukhov
Copy link
Contributor

Jason

Just to check. For other symbols that didn't have @ symbol you look the same problem?

@jasonnator
Copy link
Contributor Author

+CL# gave me a permissions error which is not correct because I can get quotes to Crude Oil with NinjaTrader so I know I have permissions. I can screen share on skype if you'd like.

@mikasoukhov
Copy link
Contributor

@jasonnator
Copy link
Contributor Author

Fix has been identified and check in.

mikasoukhov added a commit that referenced this issue Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants