Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 alifarahani, 04-19-2024, 09:40 AM
        8 responses
        52 views
        0 likes
        Last Post alifarahani  
        Started by mmckinnm, Today, 01:34 PM
        2 responses
        4 views
        0 likes
        Last Post mmckinnm  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        3 responses
        60 views
        0 likes
        Last Post NinjaTrader_SeanH  
        Started by f.saeidi, Today, 01:32 PM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by traderqz, Today, 12:06 AM
        9 responses
        16 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X