Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IQFeed Data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    IQFeed Data

    Hi there

    I contacted IQFeed support and they say that they provide historical data as seen in the screenshot attached (for ES).

    The question: how can I access the info whether any historical tick was executed at the bid or the ask price via Ninjascript? Does Ninjatrader store this info at all so it is accessible for indicators/strategies?

    Thanks for clarifying!

    Cheers,
    Chris
    Attached Files

    #2
    Hello Diderino,

    Thank you for your post.

    This data is stored in the historical database when requested from the data provider.

    You can access the data in NinjaScript. Below is an example of checking if the tick is at the bid or ask:
    Code:
    		protected override void Initialize()
    		{
    			Add("ES 06-15", PeriodType.Tick, 1, MarketDataType.Ask);
    			Add("ES 06-15", PeriodType.Tick, 1, MarketDataType.Bid);
    		}
    
            protected override void OnBarUpdate()
            {
    			if(Closes[0][0] == Closes[1][0])
    				Print("ASK");
    			else if(Closes[0][0] == Closes[2][0])
    				Print("BID");
            }
    For information on multiple bar series in your code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      That's what I am struggling with, as the MarketDataType.Bid and MarketDataType.Ask dataseries (1 Tick series as in your code) return 0 values for closes, while for the MarketDataType.Last it worked... any idea?

      Comment


        #4
        Hello Diderino,

        Thank you for your response.

        Can you provide the code you are using? And in addition can you provide the instrument you are testing this on and who you connect to for data?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        142 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        81 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        125 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        120 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        98 views
        0 likes
        Last Post CarlTrading  
        Working...
        X