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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        64 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        35 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        58 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        61 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        49 views
        0 likes
        Last Post CarlTrading  
        Working...
        X