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 Christopher_R, Today, 12:29 AM
    0 responses
    9 views
    0 likes
    Last Post Christopher_R  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    166 responses
    2,235 views
    0 likes
    Last Post sidlercom80  
    Started by thread, Yesterday, 11:58 PM
    0 responses
    3 views
    0 likes
    Last Post thread
    by thread
     
    Started by jclose, Yesterday, 09:37 PM
    0 responses
    8 views
    0 likes
    Last Post jclose
    by jclose
     
    Started by WeyldFalcon, 08-07-2020, 06:13 AM
    10 responses
    1,415 views
    0 likes
    Last Post Traderontheroad  
    Working...
    X