Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change Stop Price

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

    Change Stop Price

    I have a strategy, which enters 3 positions simultaneously (say 3 short).

    The initial stop is set to 200 ticks.

    When the profit target is reached for the first 2, I'd like to move the stop to the entry price.

    But I can't seem to get the entry price.
    I also can't seem to set a condition that lets it know it has sold 2 of the 3 contracts.

    position.avgprice doesn't seem to work here.
    position.quantity doesn't seem to work here.

    #2
    Hello,

    Please see the following reference sample on how to move your stop up with a NinjaScript strategy.



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    574 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X