Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Preventing Two Strategies From Taking The Same Position

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

    Preventing Two Strategies From Taking The Same Position

    I have two strategies trading the same instrument (CL), both from the long side. Because of the nature of the strategies, they rarely take positions at the same time. However, for risk reduction purposes I would like to insure that that if one has gone long, the other never enters a position. Is there a test I can perform that will tell me if the other strategy is already long?

    I realize I could fold both strategies into one and then just check

    Position.MarketPosition = MarketPosition.Flat

    but given how they work I'd much rather keep them separate.

    #2
    Welcome to our forums here - unfortunately strategies would not communicate with eachother so a check for the market position from outside the invidual strategy is not possible...one workaround would be writing the current position to a textfile and then accessing this for your checks. Working with txt files is laid out in our reference samples section - http://www.ninjatrader.com/support/f...ead.php?t=3477

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    668 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    377 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    110 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    580 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X