Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawingTool + MarketDepth

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

    DrawingTool + MarketDepth

    Hello,

    the subscription to marketdepth events doesn't work well.

    The event handler method to the Update event is executed only once at starting. Then the books are filled correctly. However, the event handler is not executed any more.

    You can test the issue with attached codes.

    Thanks.
    Attached Files

    #2
    Hello,

    Thank you for the question.

    I do see that in this example this is not working and would be because you have created a new MarketDepth<MarketDepthRow> and subscribed to that.

    The drawing tool would be able to see the Instrument and would already have access to its subscriptions.

    One way to access this data from the drawing tool would be to use:

    Code:
    AttachedTo.Instrument.MarketData
    or 
    AttachedTo.Instrument.MarketData.Ask
    I tested calling this in a drawing tools OnRender which I can prints the values. This would not need a subscription in this case as it is already subscribed at the instrument level, once the instrument is updated and calls OnRender the drawing tool would be updated as well.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,229 views
    0 likes
    Last Post xiinteractive  
    Started by andrewtrades, Today, 04:57 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    7 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    441 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    12 views
    0 likes
    Last Post FAQtrader  
    Working...
    X