• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TailStop for multiple entrees?

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

    TailStop for multiple entrees?

    Is there a way to implement a trailing stop in a strategy that takes multiple positions to average in. Basically I want to set a 25% trailing stop from the Avg. Position Price each time an additional entree is made.

    #2
    Hello relogical,

    Thank you for your post.

    This is possible by tracking the position size and comparing it to the previous size. Then adjust your Stop Loss price and size based on your desired parameters.

    You can use Position.Quantity to track the quantity: http://www.ninjatrader.com/support/h...7/quantity.htm

    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Patrick, how would I adjust the trailing stop each time the AvgPosPrice changes? Could you show me some code examples? Thank you

      Comment


        #4
        There are some different ways this could be done and while I don't have an exact example I will get you pointed in the right direction.

        For advanced order management use this example to get started. It will show you how to setup an auto breakeven stop order through the use of IOrders. When using IOrders you're able to track your orders individually and are given more flexibility when placing your targets and stops:

        http://www.ninjatrader.com/support/f...ead.php?t=7499

        To track the avg fill price you can use this for the whole position: http://www.ninjatrader.com/support/h...l?avgprice.htm
        Or this for an individual IOrder: IOrder.AvgFillPrice http://www.ninjatrader.com/support/h...tml?iorder.htm


        Let me know if I can further assist.
        LanceNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Ram by tonynt
        Started by tonynt, Today, 06:14 AM
        0 responses
        2 views
        0 likes
        Last Post tonynt
        by tonynt
         
        Started by pjsmith, Today, 04:10 AM
        0 responses
        3 views
        0 likes
        Last Post pjsmith
        by pjsmith
         
        Started by tonynt, Today, 02:21 AM
        0 responses
        8 views
        0 likes
        Last Post tonynt
        by tonynt
         
        Started by alstsion, Today, 12:55 AM
        0 responses
        2 views
        0 likes
        Last Post alstsion  
        Started by kandster, Yesterday, 11:49 PM
        0 responses
        3 views
        0 likes
        Last Post kandster  
        Working...
        X