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 Lopat, 03-05-2023, 01:19 PM
    4 responses
    166 views
    0 likes
    Last Post Sam2515
    by Sam2515
     
    Started by f.saeidi, Today, 12:14 PM
    0 responses
    1 view
    0 likes
    Last Post f.saeidi  
    Started by giulyko00, Today, 12:03 PM
    0 responses
    4 views
    0 likes
    Last Post giulyko00  
    Started by AttiM, 02-14-2024, 05:20 PM
    12 responses
    213 views
    0 likes
    Last Post DrakeiJosh  
    Started by cre8able, 02-11-2023, 05:43 PM
    3 responses
    238 views
    0 likes
    Last Post rhubear
    by rhubear
     
    Working...
    X