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

Market Position by Named Entry

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

    Market Position by Named Entry

    Using the strategy builder...

    I have a strategy with 2 separate named entries.

    Is there a way to determine the market position for the named entries individually.

    Example under the conditions and actions box
    Entryname1 Position.MarketPosition = MarketPosition.Long
    Entryname2 Position.MarketPosition = MarketPosition.Flat

    I need to set Variable values based on the market position of each entry.

    Thank you



    #2
    Hello sdauteuil,

    Thank you for your post.

    The Position object is for the strategy's whole position (separate from the account position) and it cannot be broken down to individual entries. To tell which order the entries were submitted, you may use booleans that get changed when the various orders get submitted.

    Additionally, the strategy may use BarsSinceEntryExecution to see if the entry has executed. Attached are example screenshots showing how BarsSinceEntryExecution can be tested.


    Please let me know if I may be of further assistance.
    Attached Files
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Lumbeezl, 01-11-2022, 06:50 PM
    31 responses
    817 views
    1 like
    Last Post NinjaTrader_Adrian  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    5 responses
    14 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by swestendorf, Today, 11:14 AM
    2 responses
    6 views
    0 likes
    Last Post NinjaTrader_Kimberly  
    Started by Mupulen, Today, 11:26 AM
    0 responses
    6 views
    0 likes
    Last Post Mupulen
    by Mupulen
     
    Started by Sparkyboy, Today, 10:57 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X