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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    67 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    36 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    60 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X