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 wftrrdt, Today, 05:01 AM
    0 responses
    3 views
    0 likes
    Last Post wftrrdt
    by wftrrdt
     
    Started by wellbeingcbd, Today, 04:41 AM
    0 responses
    1 view
    0 likes
    Last Post wellbeingcbd  
    Started by piydasuknu, Today, 03:45 AM
    0 responses
    3 views
    0 likes
    Last Post piydasuknu  
    Started by ajdfkgjiojjhfihjg, Today, 03:20 AM
    0 responses
    3 views
    0 likes
    Last Post ajdfkgjiojjhfihjg  
    Started by keravitahere, Today, 01:56 AM
    0 responses
    2 views
    0 likes
    Last Post keravitahere  
    Working...
    X