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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    146 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X