• 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

Can I add a stop and target after opening a position

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

    Can I add a stop and target after opening a position

    Hello,

    Is ther any way to add a stop loss and target after a position is opened? Also how should I close out the position? For example, I have a buy position open, I am up $190.00 and want to close out to take my profits. How do I do this?

    #2
    Hello dmelleady,

    Yes it would be possible to submit the profit target and stop loss some bars after an entry was made.

    I have attached a sample strategy which will submit a PT and SL 3 bars after an order was filled you can use as a sample.

    Instead of using if(CurrentBar==xBars+3) as my sample does for the if statement related to submitting the PT and SL, you could use BarsSinceEntryExecution too, see.
    https://ninjatrader.com/support/help...yexecution.htm

    To close out the position at $190 you could use SetStopLoss with the mode set to CalculationMode.Currency, see the following helpguide link,
    https://ninjatrader.com/support/help...etstoploss.htm

    You could also write an if statement which said if
    Code:
    if(PositionAccount.GetUnrealizedProfitLoss(PerformanceUnit.Points, Close[0])>$190) ExitLong();
    See the following two links,
    https://ninjatrader.com/support/help...profitloss.htm

    https://ninjatrader.com/support/help.../?exitlong.htm

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      This doesn't make sense to me. If I close the position with the close button will it keep my profit or does it just close at zero or negative? I am confused, I accidentally opened an order without a stop and need to close it with profit in tact?

      Comment


        #4
        Hello dmelleady,

        So I may confirm, you are not using automated strategies?

        If you were to be in a trade and hit the close button, a closing trade would be sent at the market and filled at the best bid or offer. Whether that would be for a profit would depend on the bid/ask at that time.

        I look forward to your reply.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          I am not using automated strategies. At this point I am manually submitting orders through chart trader.

          Comment


            #6
            Hello dmelleady,

            This would be the automated strategy development section of the forum, in the future if you would please post these types of questions in the support section of the forum or open inquiries in the Control Center>Help>Remote Support that would be appreciated.

            What you're asking to do is called an OCO, one cancels other. To place an OCO you must right mouse click on the SuperDOM and enable OCO. Place your buy limit or buy stop, followed by your sell or sell stop. Then disable OCO by right clicking the DOM and unchecking OCO. This last part, unchecking is very important to avoid ID numbers being reused.

            Understanding "One Cancels Other"
            https://ninjatrader.com/support/help...ng_orders4.htm

            Let us know if we may be of further assistance.
            Alan P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by saltminer, Today, 11:06 PM
            0 responses
            1 view
            0 likes
            Last Post saltminer  
            Started by saltminer, Today, 10:14 PM
            0 responses
            4 views
            0 likes
            Last Post saltminer  
            Started by Mykro, Today, 10:03 PM
            0 responses
            4 views
            0 likes
            Last Post Mykro
            by Mykro
             
            Started by coolTrade, Today, 09:37 PM
            0 responses
            7 views
            0 likes
            Last Post coolTrade  
            Started by PatrickM, Today, 08:43 PM
            0 responses
            8 views
            0 likes
            Last Post PatrickM  
            Working...
            X