Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Possible to write NS with two targets and trail?

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

    Possible to write NS with two targets and trail?

    I have been using a script I wrote to generate a limit order either to go long or short based on conditions. It works just as it should, however now I am thinking of making it a little more complicated and add two targets followed by a trailing stop.

    For example, say I am trading 8 contracts. I want 4 (1/2) of those to profit at my first target. Then I want 2 (1/4) of those to profit at the second target. Once my second target is hit I want the stop to become a trailing stop of 4ticks and to increase every 2ticks it goes into profit with the remaining 2 contracts.

    I know how to do this using the DOM but I am uncertain if this is possible with ninjascript. If it is could you please give me a guide or reference to help me out?

    #2
    Hi shazzmoe, this is definitely possible with NinjaScript. Please see the reference titled Modifying the price of stop loss and profit target orders to get started with this idea.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    80 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    66 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X