Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to check if strategy has open position?

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

    How to check if strategy has open position?

    Hello, I am aware of position.marketposition, however for strategies based on mini data series but entering on micro contracts, this does not work. Is there something else to replace this in this case? Thanks

    #2
    Hello rbeckmann05,

    Thanks for your post.

    Positions could be used to get the market position of a secondary instrument added to the script.

    For example, Positions[0].MarketPosition would be used to get the market position of the primary series the script is running on. Positions[2].MarketPosition would be used to get the market position of the secondary series.

    See this help guide page for more information and sample code: https://ninjatrader.com/support/help.../positions.htm
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sofortune, Today, 09:49 PM
    0 responses
    1 view
    0 likes
    Last Post sofortune  
    Started by trader_by_day, Today, 09:37 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by trader_by_day, Today, 09:25 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by quicksandatl, 05-09-2024, 11:11 AM
    3 responses
    25 views
    0 likes
    Last Post quicksandatl  
    Started by morrnel, 05-12-2024, 06:07 PM
    6 responses
    68 views
    1 like
    Last Post NinjaTrader_Manfred  
    Working...
    X