• 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

Has functionality been added to cancel SetStopLoss or ProfitTaker?

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

    Has functionality been added to cancel SetStopLoss or ProfitTaker?

    Found previous forum articles that looks like this is not possible from years ago? Is this possible now? Would add a lot more functionality to the Managed Order approach. I'm aware they can be moved but doesn't really help me for my goal. It leads to me using my StopLoss for a ProfitTaker which impacts reporting when exporting my analyzed trade results.

    Maybe another question is - Can I saw how write to a custom field that would be available in that exported report if the above is not possible?

    #2
    Hello Dragon989,

    Thank you for the questions.

    In regard to your question in the forum title, this is still the case.

    Regarding your other question, I am not sure I understand what you mean can you provide more detail on what report you are referring to?

    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 11-06-2018, 04:25 PM.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I attempted this with the StopLoss or ProfitTaker order. They were transferred to the order object no problem but would not cancel. I verified the order lived in the object as expected through a print statement and also monitored for it in the OrderState.Cancelled.
      This is how I attempted to cancel the order.


      Code:
      CancelOrder(stopLossOrders[0]);
      Note that I cancelled the order OnBarUpdate() but my orginal Set was in OnStateChange() / State == State.Configure

      For the other question -

      In Strategy analyzer you can view all the trades taken and then export those trades to an excel sheet. I use this for deep dive analysis in the performance of my strategy. Now when I see an exit name of Stop loss it indicates that my actual stoploss was hit. If I move the stoploss to become a profittaker(above the current price when short but still positive in the trade) it would still report as a Stop loss in the downloaded excel sheet. Question is: Can I modify the Exit name or any other data in the downloaded trade report to indicate this time the stoploss is being used differently.

      Comment


        #4
        Hello Dragon989,

        Thank you for the reply. That was my mistake I have edited my previous post, you would need to move to using standard orders for this concept to both cancel the orders and also provide unique names.

        Please let me know if I may be of additional assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by tonynt, Today, 02:18 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_JoshG  
        Started by denalek2419, Today, 01:46 PM
        2 responses
        8 views
        0 likes
        Last Post denalek2419  
        Started by REI140205, Today, 12:58 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by Aditrade, Today, 12:33 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by music_p13, Today, 12:22 PM
        2 responses
        10 views
        0 likes
        Last Post music_p13  
        Working...
        X