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 Segwin, 05-07-2018, 02:15 PM
        10 responses
        1,767 views
        0 likes
        Last Post Leafcutter  
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        30 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        943 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        9 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        7 views
        0 likes
        Last Post rocketman7  
        Working...
        X