Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

cancel market order in sim account and market order in live account

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

    cancel market order in sim account and market order in live account

    Hi Team,

    I have an addon that cancels orders, but I have a problem with market orders if the account is a demo or live account. Let say I need to cancel an order based on the number of contracts. If it's bigger than 2 contracts, cancel the order. Using the market buttons in the dom, with the sim account I don't have problems, it works, but if the account is live or demo it doesn't cancel the order. Any idea of what is happening?

    Regards

    #2
    Hello ofaprotrader,

    I believe this is expected, market orders are not a type of order which generally can be cancelled. This is submitted as an active order to the market which will fill as quickly as possible as the market allows. You can cancel resting orders such as limit orders which have not yet filled. Cancelling a resting order also does not guarantee a total cancel will happen if a fill is possible at the same time.

    Can you provide more detail on what your addons purpose is? Are you trying to block orders under certain criteria?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi NinjaTrader_Jesse

      Thank you for your fast answer. Yes, I'm trying to block orders based under certain criteria. For example, if contracts are bigger than 2 I want to block the option to open limit or market orders in the dom, chart or any other place at NinjaTrader platform. I have the problem working with live or demo accounts that the addon doesn't block market orders. Any idea what can I do?

      Regards

      Comment


        #4
        Hello ofaprotrader,

        Blocking user interaction such as orders is not generally something we can provide samples for as this is really not a concept in the platform currently. It is suggested to avoid this in case the user needs to take a corrective action.

        For this specific use case, rather than trying to cancel already submitted orders, you may instead try to observe the quantity control for the order entry in question, and if the value is out of range you can disable the WPF buttons preventing the click. I still don't recommend this, but that potentially is a work around for cancelling the market order, it wouldn't need cancelled if it cant be clicked.

        A more suitable solution is to avoid modifying the default trading tools to give the user an option to restrict themselves or have full control. A good example of this would be the addon sample in the help guide which creates a whole new window. In that window you can do whatever you want with the GUI and buttons, so you could limit the users interaction if needed. I suggest this because this still allows you to manage your position or place trades under your own discretion. When the addon is enabled, if something does not go to plan and is effectively reflected across the platform you may have to emergency call the broker to manage the account.


        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello ofaprotrader,

          Blocking user interaction such as orders is not generally something we can provide samples for as this is really not a concept in the platform currently. It is suggested to avoid this in case the user needs to take a corrective action.

          For this specific use case, rather than trying to cancel already submitted orders, you may instead try to observe the quantity control for the order entry in question, and if the value is out of range you can disable the WPF buttons preventing the click. I still don't recommend this, but that potentially is a work around for cancelling the market order, it wouldn't need cancelled if it cant be clicked.

          A more suitable solution is to avoid modifying the default trading tools to give the user an option to restrict themselves or have full control. A good example of this would be the addon sample in the help guide which creates a whole new window. In that window you can do whatever you want with the GUI and buttons, so you could limit the users interaction if needed. I suggest this because this still allows you to manage your position or place trades under your own discretion. When the addon is enabled, if something does not go to plan and is effectively reflected across the platform you may have to emergency call the broker to manage the account.


          I look forward to being of further assistance.
          Thank you for the guide!!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by WeyldFalcon, Today, 02:07 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ThomasC  
          Started by hfwiley, Today, 03:02 PM
          2 responses
          16 views
          0 likes
          Last Post hfwiley
          by hfwiley
           
          Started by pdennis, Today, 02:34 PM
          3 responses
          15 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by tonynt, Today, 01:47 PM
          3 responses
          17 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by WesFoster, Today, 12:39 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Dennis  
          Working...
          X