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

see market orders

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

    see market orders

    hello
    is it possible to create an indicator that shows the quantity of orders entering the market but only a "market order"(no limit orders)??

    thank you

    #2
    Hello Simon Investimens,

    Thank you for your post.

    Yes, this is possible. You could track Buys and Sells with Level 1 market data by using OnMarketData(). Resting limit orders would be held in Level 2 market data. Market orders would not be resting and stop market orders would be at the order routing server, not the exchange.

    To track Buys and Sells using OnMarketData(), you would first create a double variable for buys and sells. Then, in OnMarketData() you would create a condition checking if e.MarketDataType == MarketDataType.Last. Within that condition you could track buys by creating a condition that checks if e.Price >= e.Ask and increments your buys variable. To track sells you would create a condition that checks if e.Price <= e.Bid and increment your sells variable.

    An example of this is seen in the BuySellVolume indicator that comes default with NinjaTrader. To view the code for the BuySellVolume indicator, open a New > NinjaScript Editor window, open the Indicators folder, and select the BuySellVolume indicator.

    See the help guide documentation for more information.
    OnMarketData() - https://ninjatrader.com/support/help...marketdata.htm
    MarketDataEventArgs - https://ninjatrader.com/support/help...aeventargs.htm

    Let us know if we may assist further
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DanielTynera, Today, 01:14 AM
    0 responses
    2 views
    0 likes
    Last Post DanielTynera  
    Started by yertle, 04-18-2024, 08:38 AM
    9 responses
    40 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by techgetgame, Yesterday, 11:42 PM
    0 responses
    12 views
    0 likes
    Last Post techgetgame  
    Started by sephichapdson, Yesterday, 11:36 PM
    0 responses
    2 views
    0 likes
    Last Post sephichapdson  
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,615 views
    0 likes
    Last Post aligator  
    Working...
    X