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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    47 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X