Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using SetTrailStop in NT 6.5

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

    Using SetTrailStop in NT 6.5

    I'm having problems using a trailing stop strategy in NT 6.5 and would like some suggestions.

    Here's what I want to do:
    1) A trade is entered for 3 lots [lots #1, #2, and #3], where each lot is entered concurrently as an individual trade.
    2) An initial stop loss of x%, using SetStopLoss, is set for all of the 3 lots.
    3) Separate profit targets [#1, #2, and #3] are set for each of the 3 lots

    NOTE: I already have 1), 2), and 3) coded.

    4) I'd like to use SetTrailStop after price target #1 is hit and lot #1 is taken out so I can implement trailing stops of y% for the remaining lots #2 and #3.

    My question is how do I have an initial stop loss for the 3 lots of x% AND trailing stop losses of y% once the first price target [lot#1] is taken out? Can this be done using NinjaScript methods or do you suggest that I code my own trailing stop method?

    #2
    bluelou, this is getting into fairly complicated stuff and as such I recommend moving away from the SetTrailStop() method and start using the methods such as ExitLongStop() and ExitLongLimit()
    AustinNinjaTrader Customer Service

    Comment


      #3
      Austin, I just checked out ExitLongStop( ) and it appears that the only calculation mode is price (in levels). Is there a way to override this to change the calc mode to percent?

      If not, it seems as though I'll have to write my own method that functions the same as ExitLongStop( ) but uses percent as a calc mode.

      Who uses a fixed price in levels in an automated strategy? That parameter doesn't even make sense.

      Comment


        #4
        Hi bluelou,

        The ExitLongStop() price can be used with a variable that changes based on changing calculation in your strategy, so it can accept something like Close[1] -1, which would make sense in automated strategy.
        TimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        68 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        24 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        27 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        54 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X