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 inanazsocial, Today, 01:15 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by rocketman7, Today, 02:12 AM
    0 responses
    10 views
    0 likes
    Last Post rocketman7  
    Started by dustydbayer, Today, 01:59 AM
    0 responses
    1 view
    0 likes
    Last Post dustydbayer  
    Started by trilliantrader, 04-18-2024, 08:16 AM
    5 responses
    23 views
    0 likes
    Last Post trilliantrader  
    Started by Davidtowleii, Today, 12:15 AM
    0 responses
    3 views
    0 likes
    Last Post Davidtowleii  
    Working...
    X