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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    59 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X