• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 rwilliam, Today, 01:54 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by franco12364, Today, 11:27 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by YevhenShynkarenko, Today, 11:48 AM
    3 responses
    22 views
    0 likes
    Last Post YevhenShynkarenko  
    Started by NinjaTrader_ChrisL, Today, 11:21 AM
    0 responses
    21 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by lunardiplomacy, Today, 08:09 AM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Kate  
    Working...
    X