Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Partial profits and move stoploss

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

    Partial profits and move stoploss

    Hello,

    Maybe somebody can point me in the right direction. I need some direction on which methods to use.

    Basically simple example:

    - Entry long $100
    - Risk $5
    - 1st target $105
    - 2nd target $110
    - 3rd target $115

    So now I already have the EnterLongLimit() method, the SetStopLoss() and the SetProfitTarget() methods.

    But now I am stuck because I want to take 1/2 profit at the 1st Target and then move the stoploss to my entry level. And then basically for each $5 move my stoploss to the previous target level.

    Any ideas?

    I was thinking to check my Market.Position and based on that see if the current price has reached a new target.. But when I am in a position I dont know my targets anymore. Possible to attach additional properties or something to a buy order?

    #2
    Don't do it. Its wrong!
    I you insist on doing it you will need to declare 3 different entry orders (o1,o2,o3) and use exit(long/short)

    Comment


      #3
      Ok, so I got a little further. Basically I just created three orders (1/3rd of total size), all with the same entry price and stoploss price, but with three different profit targets.

      But now comes the tricky part. When target 1 is hit, I want the remaining orders to move the stoploss level to breakeven. When target 2 is hit I want the remaining order stoploss level to set to target 1 level.

      Comment


        #4
        Originally posted by Baruch View Post
        Don't do it. Its wrong!
        I you insist on doing it you will need to declare 3 different entry orders (o1,o2,o3) and use exit(long/short)
        What do you mean by it's wrong?

        Comment


          #5
          The correct way to develop strategies is one entry / one stop / one profit.

          Comment


            #6
            Hello siroki,

            Thank you for your post.

            You can use IOrder objects to begin submitting a single entry with your own Targets and Stops. There is no harm in using multiple orders for exit of one single lot size. However, you will need to check the IOrder states when they are filled to appropriately adjust your Stops and Targets.

            Please visit the following link for information on the IOrder objects: http://www.ninjatrader.com/support/h...nt7/iorder.htm

            For a reference sample on using OnOrderUpdate() for protective orders please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=7499

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              Hello siroki,

              Thank you for your post.

              You can use IOrder objects to begin submitting a single entry with your own Targets and Stops. There is no harm in using multiple orders for exit of one single lot size. However, you will need to check the IOrder states when they are filled to appropriately adjust your Stops and Targets. ...
              Not quite, as this single post shows: http://www.ninjatrader.com/support/f...59&postcount=8

              It is part of two pretty long discussions which show that, in NT7, one cannot scale out without scaling in.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Waxavi, Today, 02:10 AM
              0 responses
              1 view
              0 likes
              Last Post Waxavi
              by Waxavi
               
              Started by TradeForge, Today, 02:09 AM
              0 responses
              2 views
              0 likes
              Last Post TradeForge  
              Started by Waxavi, Today, 02:00 AM
              0 responses
              2 views
              0 likes
              Last Post Waxavi
              by Waxavi
               
              Started by elirion, Today, 01:36 AM
              0 responses
              4 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by gentlebenthebear, Today, 01:30 AM
              0 responses
              4 views
              0 likes
              Last Post gentlebenthebear  
              Working...
              X