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

BidAsk Volume on each price

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

    BidAsk Volume on each price

    Hello,

    I'm trying to develop an indicator that draws a dot on the imbalance prices within a candle. The picture attached is what I'm trying to develop.
    How do I print BidAsk Volume on each price? And how do I draw dots to the right and left of imbalance prices?
    Attached Files

    #2
    Hello KINGKODA,

    Thanks for opening the thread.

    What you are trying to do would be best accomplished through custom rendering.

    Getting Bid/Ask volume can be done through subscribing to level 1 events, sorting the bid and ask volume between certain prices, and then presenting this information on the chart. Please see the OnMarketData() documentation for subscribing to level 1 events. You may also reference the open source indicators on the platform for working examples using this method. BuySellVolume may provide some further direction here.

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

    Presenting this information would not be easily done without custom rendering and using a custom ChartStyle. Drawing tools cannot specify an X pixel offset and would be difficult to align this information specifying a price for Y and a BarsAgo for X. You could change the bar width and bar spacing (Ctrl + Up/Down, Alt + Up/Down) and avoid creating a custom ChartStyle, but this would not effect the placement of draw objects created with drawing tools and being able to offset their X coordinate.

    ChartStyle documentation can be found here - https://ninjatrader.com/support/help...hart_style.htm

    If you would like to look into custom rendering, please see the SampleCustomRender indicator example that is included with NinjaTrader 8. This example also demonstrates how Ellipse's can by drawn with SharpDX.

    When using custom rendering, you can use the ChartScale to convert a price level to a Y pixel coordinate with GetYByValue(). ChartControl can be used to get X coordinates with GetXByTime(). Please also see the Using SharpDX for Custom Rendering documentation for further reference when writing your own custom rendering.

    GetYByValue() - https://ninjatrader.com/support/help...etybyvalue.htm

    GetXByTime() - https://ninjatrader.com/support/help...getxbytime.htm

    Using SharpDX for custom chart rendering - https://ninjatrader.com/support/help..._rendering.htm

    Please let us know if you have any questions.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by zstheorist, Today, 07:52 PM
    0 responses
    2 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    149 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Working...
    X