Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Subscribe to Market (Tick) Data when Strategy enters a position

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

    Subscribe to Market (Tick) Data when Strategy enters a position

    I want to subscribe to Market Data (Ticks) when my strategy enters a position. Is this possible. Waiting for OnBarUpdate() using large Bars affects profit.

    #2
    MajorIIssue,

    Thanks for your post.

    I would suggest adding OnMarketData to your script and to add a check for

    if (Position.MarketPosition == MarketPosition.Long)

    or

    if (Position.MarketPosition == MarketPosition.Short)

    inside OnMarketData so the code is only executed there when you are in a position.

    OnMarketData - https://ninjatrader.com/support/help...marketdata.htm

    We look forward to assisting.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    42 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X