• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Incoming Tick Data

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

  • NinjaTrader_Ray
    started a topic Accessing Incoming Tick Data

    Accessing Incoming Tick Data

    From a user:

    ----------------------------------------------------------------

    I would like to be able to inspect the tick data (not the bar data with open, high, low and close) of each trade in real time in order to build a custom indicator. I looked online at your samples and it looked likeyour samplesdealt with bar data only. I need to receive the raw tick data for each trade in order to accumulate my own data for a custom indicator that I would like to display on the chart, or even as a separate data window that I can dynamically add entries to.

    Can you show me some examples of accessing the raw tick data in Ninjascript? How about opening a separate data window for updates?

    Any help you can provide would be greatly appreciated.

    -----------------------------------------------------------------

    Answer:

    Custom Indicators:
    This depends what you mean by tick data? The OnBarUpdate() method fires each incoming tick (last trade) and you can access the MarketData object which holds properties for ask/bid/last price and volume. If you want to access this object on any change in any market data property, this can be done as well but you would need to create an event handler to fire on this type of market data change event. If this is what you want to do, let me know and I can provide an example. Keep in mind that indicators plot only on incoming last trade tick which is handled by the OnBarUpdate() method.

    Separate Data Window:
    We will be releasing shortly the Ninja QuoteBoard which supports custom columns that can be defined via NinjaScript. You have the option of calculating the column value using:

    - Change in any market data property
    -Each incoming tick
    - Order status event
    - Execution/Fill event
    - Position size change event
    - Account information change event

    There might be others but I can't remember off the top of my head.

    I hope this helps.

    Ray

  • richard
    replied
    imported post

    Thank you again.

    I will be trying this out. Will get back to you if I run into problems. Thanks again for all your help. Please keep me abreast of the Quoteboard release.

    Leave a comment:


  • NinjaTrader_Ray
    replied
    imported post

    Actually, we are not going to be able to release the QB for sometime, its complete but there is some underlying changes we need to make so that the QB and Chart indicators use the same pool of market data which is currently not the case.

    That being said, there is no current sample code for this if you still want to do something in the charts.

    You can access:

    MarketData.Ask.Price
    MarketData.Ask.Volume
    MarketData.Ask.Time

    MarketData.Bid.Price
    MarketData.Bid.Volume
    MarketData.Bid.Time

    MarketData.Last.Price
    MarketData.Last.Volume
    MarketData.Last.Time

    You have to check for null references first -

    if (MarketData != null && marketData.Ask != null)
    Print(MarketData.Ask.Price.ToString())

    for example.

    Leave a comment:


  • richard
    replied
    imported post

    Again thanks for the fast reply Ray.

    Yes, I am a paid subscriber. My account is with Eliot at Mirus Futures. I would be very interested in the beta for Quoteboard.

    I just need to display these volumes in a data window. How can I create a data window that I can display my collections through? Do you have sample code that lets me see how to inspect teh Marketdata object with bid/ask/time etc.?

    Thanks.






    Leave a comment:


  • NinjaTrader_Ray
    replied
    imported post

    Yes this can be done with the quote board and it can be done with chart indicators to. Since the OnBarUpdate() method by default fires everytick you can also accumulate this data in some sort of collection object.

    How do you want to display this data?



    Not sure when we will release the QuoteBoard. If you are a subscriber, I would be likely willing to give you access shortly as beta.

    Ray

    Leave a comment:


  • richard
    replied
    imported post

    Thanks Ray for the fast response.

    The NT quoteboard sounds interesting.

    What I'm trying to do is this:

    On a 5 minute bar, you have OHLC and volume. I need to break up that volume in to various price levels. e.g., volume of 200 traded at 20.45, 100 at 20.44 and 600 at 20.46. I need to accumulate that volume on each incoming trade tick data and then when we go to next 5 minute window, I will start another count of all price levels that occurred for that 5 minute window. These counts will be accumulating throughout the day. So my data window will show all price levels for 10:00 and then 10:05, 10:10, etc...

    Can this be done on the Quoteboard? If so, what is the time frame for release? And if not, what samples can you provide to allow this? Thanks again in advance.




    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by Sank1, Today, 01:58 PM
1 response
5 views
0 likes
Last Post NinjaTrader_PatrickG  
Started by GARZONJ, Today, 12:50 PM
2 responses
8 views
0 likes
Last Post GARZONJ
by GARZONJ
 
Started by guigs88, Today, 12:45 PM
1 response
6 views
0 likes
Last Post NinjaTrader_PaulH  
Started by FREEN, 08-13-2019, 09:18 AM
5 responses
28 views
0 likes
Last Post koganam
by koganam
 
Started by U0000999, Today, 12:43 PM
1 response
5 views
0 likes
Last Post NinjaTrader_Jim  
Working...
X