Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"For anyone considering using DTN.IQ for a data feed, my experience with the quality of data and the tech support has been very positive." - Comment from Public Forum
"I have to tell you though that using the IQFeed API is about the easiest and cleanest I have seen for some time." - Comment from Jim
"DTN feed was the only feed that consistently matched Bloomberg feed for BID/ASK data verification work these past years......DTN feed is a must for my supply & demand based trading using Cumulative Delta" - Comment from Public Forum Post
"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"I just wanted to tell you what a fine job you have been doing. While *******, from what I hear, has been down and out, off and on, IQ feed has held like a champ this week." - Comment from Shirin
"I have been using IQFeed now for a few years in MultiCharts and I have zero complaints. Very, very rare to have any data hiccups or anything at all go wrong." - Comment from Public Forum
"I ran your IQFeed DDE vs. my broker vs. a level II window for some slow-moving options. I would see the level II quote change, then your feed update instantaneously. My broker's DDE, however, would take as much as 30 seconds to update. I am not chasing milliseconds, but half a minute is unacceptable." - Comment from Rob
"Version 4.0.0.2 has been working well for me and I appreciate that it is now a much tighter client to work with. I feel I can go to press with my own application and rely on a stable platform" - Comment from David in IA.
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
Viewing User Profile for: nelsonandara
About Contact
Joined: Aug 21, 2006 12:10 AM
Last Post: Aug 22, 2006 04:29 PM
Last Visit: Aug 22, 2006 05:52 PM
Website:  
Location: ALbuquerque NM
Occupation: Developer
Interests:
Avatar:
Email: nelsonandara@comcast.net
AIM:
ICQ:
MSN IM:
Yahoo IM:
Post Statistics
nelsonandara has contributed to 3 posts out of 21202 total posts (0.01%) in 6,491 days (0.00 posts per day).

20 Most recent posts:
IQFeed Developer Support » Problems retrieving History in C# .NET via COM Aug 22, 2006 04:29 PM (Total replies: 5)

Hi Jean Francois,

I noticed that when receiving History messages, if you have anymore than one event registered at a time, you get an exception that apparently comes from COM, not the C# code. I would also like to have the abillity to register more than one event ( at least TickProgress and TickCompleted ) at the same time.

If anyone knows about a way to accomplish this in .NET, please share.

Nelson Andara
nelsonandara@comcast.net


IQFeed Developer Support » Problems retrieving History in C# .NET via COM Aug 21, 2006 10:59 AM (Total replies: 5)

Hi Steve, thanks for your quick response. I noticed that the application started receiving History data as soon as the market opened. Are there scheduled times when port 9100 is down?

I will move forward with my implementation in terms of better multithreading and front end.

I look forward to more information on the availability of port 9100 for historic data feeds.

Regards,

Nelson

Nelson Andara
nelsonandara@comcast.net


IQFeed Developer Support » Problems retrieving History in C# .NET via COM Aug 21, 2006 12:21 AM (Total replies: 5)

I created a program based on a posting from January 2005 from Dennis. THey program compiles and runs, everything works well when requesting real time Level 1 data. However, when I request Tick History using RequestTickHistory, the call does not cause a runtime error, but the event handlers associated with this call ( TickProgress or TickCompleted ) do not fire.

In this example I am using the IQFEED_DEMO application name. I have tried replacing with my own credentials and the symptoms are the same.

I have been able to see that the connection is registered by the IQConnect Manager. I am appending the frmMain.cs contents of my project. Any help on this issue will be greatly appreciated.

Regards,

Nelson Andara

// Sample application to request level1 and History via COM
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using DTNHISTORYLOOKUPLib;

namespace CSharpLevel1Com
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class frmMain : System.Windows.Forms.Form
{
string strSymbol = "";
private bool reporting_history = false;
private System.Windows.Forms.Label lblSymbol;
private System.Windows.Forms.TextBox txtSymbol;
private System.Windows.Forms.Button cmdGetData;
private System.Windows.Forms.ListBox lstData;
private AxIQFEEDYLib.AxIQFeedY axIQFeedY1;
private HistoryLookupClass m_HistoryLookupClass;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

public frmMain()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//

this.m_HistoryLookupClass = new HistoryLookupClass();
this.m_HistoryLookupClass.MinuteCompleted += new _IHistoryLookupEvents_MinuteCompletedEventHandler(m_HistoryLookupClass_MinuteCompleted);
this.m_HistoryLookupClass.TickCompleted += new _IHistoryLookupEvents_TickCompletedEventHandler(m_HistoryLookupClass_TickCompleted);
this.m_HistoryLookupClass.TickProgress += new _IHistoryLookupEvents_TickProgressEventHandler(m_HistoryLookupClass_TickProgress);
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}

this.axIQFeedY1.RemoveClientApp();
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
this.lblSymbol = new System.Windows.Forms.Label();
this.txtSymbol = new System.Windows.Forms.TextBox();
this.cmdGetData = new System.Windows.Forms.Button();
this.lstData = new System.Windows.Forms.ListBox();
this.axIQFeedY1 = new AxIQFEEDYLib.AxIQFeedY();
((System.ComponentModel.ISupportInitialize)(this.axIQFeedY1)).BeginInit();
this.SuspendLayout();
//
// lblSymbol
//
this.lblSymbol.Location = new System.Drawing.Point(8, 8);
this.lblSymbol.Name = "lblSymbol";
this.lblSymbol.Size = new System.Drawing.Size(48, 16);
this.lblSymbol.TabIndex = 0;
this.lblSymbol.Text = "Symbol: ";
//
// txtSymbol
//
this.txtSymbol.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.txtSymbol.Location = new System.Drawing.Point(72, 8);
this.txtSymbol.Name = "txtSymbol";
this.txtSymbol.Size = new System.Drawing.Size(136, 20);
this.txtSymbol.TabIndex = 1;
this.txtSymbol.Text = "TXTSYMBOL";
//
// cmdGetData
//
this.cmdGetData.Location = new System.Drawing.Point(216, 8);
this.cmdGetData.Name = "cmdGetData";
this.cmdGetData.Size = new System.Drawing.Size(88, 24);
this.cmdGetData.TabIndex = 2;
this.cmdGetData.Text = "&Get Data";
this.cmdGetData.Click += new System.EventHandler(this.cmdGetData_Click);
//
// lstData
//
this.lstData.HorizontalScrollbar = true;
this.lstData.Location = new System.Drawing.Point(8, 40);
this.lstData.Name = "lstData";
this.lstData.Size = new System.Drawing.Size(656, 316);
this.lstData.TabIndex = 3;
//
// axIQFeedY1
//
this.axIQFeedY1.Enabled = true;
this.axIQFeedY1.Location = new System.Drawing.Point(408, 16);
this.axIQFeedY1.Name = "axIQFeedY1";
this.axIQFeedY1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axIQFeedY1.OcxState")));
this.axIQFeedY1.Size = new System.Drawing.Size(100, 50);
this.axIQFeedY1.TabIndex = 4;
this.axIQFeedY1.Visible = false;
this.axIQFeedY1.SystemMessage += new AxIQFEEDYLib._DIQFeedYEvents_SystemMessageEventHandler(this.IQFeed_SystemMessage);
this.axIQFeedY1.SummaryMessage += new AxIQFEEDYLib._DIQFeedYEvents_SummaryMessageEventHandler(this.IQFeed_SummaryMessage);
this.axIQFeedY1.FundamentalMessage += new AxIQFEEDYLib._DIQFeedYEvents_FundamentalMessageEventHandler(this.IQFeed_FundamentalMessage);
this.axIQFeedY1.TimeStampMessage += new AxIQFEEDYLib._DIQFeedYEvents_TimeStampMessageEventHandler(this.IQFeed_TimeStampMessage);
this.axIQFeedY1.QuoteMessage += new AxIQFEEDYLib._DIQFeedYEvents_QuoteMessageEventHandler(this.IQFeed_QuoteMessage);

//
// frmMain
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(672, 364);
this.Controls.Add(this.axIQFeedY1);
this.Controls.Add(this.lstData);
this.Controls.Add(this.cmdGetData);
this.Controls.Add(this.txtSymbol);
this.Controls.Add(this.lblSymbol);
this.MaximizeBox = false;
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "frmMain";
this.Load += new System.EventHandler(this.frmMain_Load);
((System.ComponentModel.ISupportInitialize)(this.axIQFeedY1)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new frmMain());
}

//Form load handler, register client app here
private void frmMain_Load(object sender, System.EventArgs e)
{
this.Text = "CSharp Level1 COM";
this.txtSymbol.Text = "";
this.txtSymbol.Enabled = false;

string strName = "IQFEED_DEMO";
string strVersion = "1.0";
string strKey = "1.0";

this.axIQFeedY1.RegisterClientApp( ref strName, ref strVersion, ref strKey );
}

//Watch symbol when the get data button is clicked
private void cmdGetData_Click(object sender, System.EventArgs e)
{
string strSymbol = txtSymbol.Text.Trim();
if( strSymbol != "" )
{
axIQFeedY1.WatchSymbol( ref strSymbol );
}
}

//Received fundamental message, add to list box
private void IQFeed_FundamentalMessage(object sender, AxIQFEEDYLib._DIQFeedYEvents_FundamentalMessageEvent e)
{
string strData = e.strFundamentalData;
lstData.Items.Insert(0,strData);
}

//Received summary message, add to list box
private void IQFeed_SummaryMessage(object sender, AxIQFEEDYLib._DIQFeedYEvents_SummaryMessageEvent e)
{
string strData = e.strSummaryData;
lstData.Items.Insert(0,strData);
}

//Received quote message, add to list box
private void IQFeed_QuoteMessage(object sender, AxIQFEEDYLib._DIQFeedYEvents_QuoteMessageEvent e)
{
string strData = e.strQuoteData;
lstData.Items.Insert(0,strData);
}

// First Time you receive the System message indicates you are connected.
private void IQFeed_SystemMessage(object sender,AxIQFEEDYLib._DIQFeedYEvents_SystemMessageEvent e)
{
string strData = e.strSystemData ;
txtSymbol.Enabled = true;
lstData.Items.Insert(0,strData);
}

//Received Time Stamp message, add to list box, request history
private void IQFeed_TimeStampMessage( object sender, AxIQFEEDYLib._DIQFeedYEvents_TimeStampMessageEvent e)
{
string strData = e.strTimeStampData;
lstData.Items.Add(strData);
strSymbol = txtSymbol.Text.Trim();
if ( strSymbol != "" )
{
this.m_HistoryLookupClass.RequestTickHistory(strSymbol,1);
}
Console.Write(" TImeStampMessage Received\n");
}
private void m_HistoryLookupClass_TickProgress( int iTicksReceived)
{
Console.Write( "{0} ticks received ",iTicksReceived);
}
private void m_HistoryLookupClass_TickCompleted( int iTicksReceived,
object Time,
object Ask,
object Bid,
object Volume,
object TradePrice,
object TradeSize)
{
if(!reporting_history)
{
reporting_history = true;
DateTime[] m_TimeArray = (DateTime[]) Time;
double[] m_AskArray = (double[]) Ask;
double[] m_BidArray = (double[]) Bid;
int[] m_VolumeArray = (int[]) Volume;
double[] m_TradePriceArray = (double[]) TradePrice;
int[] m_TradeSizeArray = (int[]) TradeSize;

for (long i = iTicksReceived; i>0; i--)
{
Console.Write("Time: {0}, ", m_TimeArray.GetValue(i));
Console.Write("Ask: {0,8:F}, ",m_AskArray.GetValue(i));
Console.Write("Bid: {0,8:F}, ",m_BidArray.GetValue(i));
Console.Write("Volume:{0,6}, ", m_VolumeArray.GetValue(i));
Console.Write("Trade Price: {0,8:F}, ",m_TradePriceArray.GetValue(i));
Console.Write("Trade Size: {0,6}, ",m_TradeSizeArray.GetValue(i));
}
}
Console.Write("TickCompleted executed\n");
}

private void m_HistoryLookupClass_MinuteCompleted( int lMinutesLoaded,
object Time,
object Open,
object Close,
object High,
object Low,
object Volume,
object IntVolume)
{
if (!reporting_history)
{
reporting_history = true;

DateTime[] m_TimeArray = (DateTime[]) Time;
double[] m_OpenArray = (double[]) Open;
double[] m_CloseArray = (double[]) Close;
double[] m_HighArray = (double[]) High;
double[] m_LowArray = (double[]) Low;
int[] m_VolumeArray = (int[]) Volume;
int[] m_IntVolumeArray = (int[]) IntVolume;

for(long i = lMinutesLoaded; i> 0; i--)
{
Console.Write("Time: {0}, ", m_TimeArray.GetValue(i));
Console.Write("Open: {0,8:F}, ",m_OpenArray.GetValue(i));
Console.Write("Close: {0,8:F}, ",m_CloseArray.GetValue(i));
Console.Write("High: {0,8:F}, ",m_HighArray.GetValue(i));
Console.Write("Low: {0,8:F}, ",m_LowArray.GetValue(i));
Console.Write("Volume:{0,6}, ", m_VolumeArray.GetValue(i));
Console.Write("IntVolume:{0,6}, ",m_IntVolumeArray.GetValue(i));
}
}
}
}
}

Nelson Andara
nelsonandara@comcast.net



Time: Tue May 28, 2024 4:44 AM CFBB v1.2.0 4 ms.
© AderSoftware 2002-2003