Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelled orders

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

    Cancelled orders

    Hi Guys
    My strategy sometimes get some: New state = "cancel submitted" or New state = "cancelled"
    Some orders get cancelled on my playback. how does that work on live trading, I don't think trades will get cancelled without anything been calculated, just like that on live trading? so what happens in this case?

    #2
    Hello onlinebusiness,

    Thanks for your post.

    This indicates that a cancel was submitted for an order that was placed or that the order was canceled. This could occur when running a strategy live if orders are canceled. There are a number of factors that could cause an order to cancel.

    If you are using the Managed Approach order entry methods, keep in mind that by default orders submitted via Entry() and Exit() methods automatically cancel at the end of a bar if not re-submitted. This is noted on the help guide page linked below.

    Managed Approach: https://ninjatrader.com/support/help...d_approach.htm

    Calling CancelOrder() will also cause orders to cancel.

    CancelOrder(): https://ninjatrader.com/support/help...ancelorder.htm

    Order will also be canceled if you have a position open and the strategy encounters an error or the strategy is disabled.

    Please let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      so if this happened in live account how it is going to be calculated?
      just like closing a trade? either on profit or on loss, it will cancel the trade and calculate that as realised PnL?

      Comment


        #4
        Hello onlinebusiness,

        Thanks for your note.

        Yes this would be similar to a closed trade. If you have a working order and the strategy cancels the order, such as when an error occurs and the strategy cancels all working orders and disables, the Realized PnL will be calculated as a profit or loss depending on the position.

        For example, say you have a working long position, and the market moves in your favor. Then, the strategy encounters an error, the position is canceled, and the strategy disables. Since the market moved in your favor when the working order is canceled, the profit would be added to your Realized PnL.

        Note that you may see this message when using Stop Loss and Profit target orders, such as SetStopLoss()/SetProfitTarget(). Since these orders are tied together through OCO, once one order is filled, the other order will be canceled.

        Let me know if I may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        50 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        127 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        69 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X