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 frankthearm, Today, 09:08 AM
    5 responses
    14 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    43 views
    0 likes
    Last Post jeronymite  
    Started by yertle, Today, 08:38 AM
    5 responses
    16 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by adeelshahzad, Today, 03:54 AM
    3 responses
    19 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by bill2023, Yesterday, 08:51 AM
    6 responses
    27 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X