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 helpwanted, Today, 03:06 AM
    1 response
    7 views
    0 likes
    Last Post sarafuenonly123  
    Started by Brevo, Today, 01:45 AM
    0 responses
    7 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    5 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    242 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Working...
    X