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

Breadth indicators

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

    Breadth indicators

    Two questions here:

    1. can I get snapshot data, for example net change of a basket of instruments like the stock universe and then plot arithmetic such as # stocks up x%, down x
    %?

    2. Could I create an indicator that would plot the fraction of shares traded in block trades? I have iq feed

    thanks

    #2
    Hello tffmd123,

    Thanks for your questions.

    If we look at the Market Analyzer, we can see that there is a Net Change column, which we also have source code for which will show the price change since the last session close. This uses OnMarketData to read the level 1 data feed. Reading this will involve using OnMarketData in your indicator.

    OnMarketData - https://ninjatrader.com/support/help...marketdata.htm

    Totaling the number of stocks that have increased or decreased would involve either adding all of the desired instruments to an indicator so you can read the level 1 data feed from those symbols. If you wanted to apply an indicator to multiple charts this would result in multiple feeds subscribed, which can carry a performance hit if it is applied to multiple charts. You could then consider having a "hosting indicator" perform the calculations, that then writes to a static variables in an AddOn. Then you could write a "display" indicator that will plot the data you have written to the AddOn variables. (Creating an AddOn to perform the operations of the "hosting indicator" is also possible.)

    The example below can be followed to see how you may write to static variables in an Addon.



    Detecting block trades would involve reading OnMarketData (and using Tick Replay for historical Last ticks) or using a single tick data series to analyze each trade and check their volume to see if that trade would meet your criteria for a block trade. Using a single tick data series would be less performance impacting than OnMarketData with Tick Replay. From there, you can keep track of the volume that is taken from block trades vs. other trades.

    Multi Time Frame and Instruments - https://ninjatrader.com/support/help...nstruments.htm

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mmenigma, Today, 02:22 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by frankthearm, Today, 09:08 AM
    9 responses
    35 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by NRITV, Today, 01:15 PM
    2 responses
    9 views
    0 likes
    Last Post NRITV
    by NRITV
     
    Started by maybeimnotrader, Yesterday, 05:46 PM
    5 responses
    26 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by quantismo, Yesterday, 05:13 PM
    2 responses
    21 views
    0 likes
    Last Post quantismo  
    Working...
    X