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 GussJ, 03-04-2020, 03:11 PM
        12 responses
        3,239 views
        0 likes
        Last Post Leafcutter  
        Started by AveryFlynn, Today, 04:57 AM
        0 responses
        5 views
        0 likes
        Last Post AveryFlynn  
        Started by RubenCazorla, 08-30-2022, 06:36 AM
        3 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Started by f.saeidi, Yesterday, 12:14 PM
        9 responses
        25 views
        0 likes
        Last Post f.saeidi  
        Started by Tim-c, Today, 03:54 AM
        0 responses
        5 views
        0 likes
        Last Post Tim-c
        by Tim-c
         
        Working...
        X