Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OrderAction.SellShort and OrderAction.Sell

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

    OrderAction.SellShort and OrderAction.Sell

    Hi,

    As far as I know:
    OrderAction.SellShort - is used for opening a Short position;
    OrderAction.Sell - is used for closing a Long position;
    Is this correct?

    I believe so. In this case can you please clarify why when I place a SellLimit order manually I see the 'orderAction=Sell'?
    Click image for larger version

Name:	image.png
Views:	233
Size:	29.1 KB
ID:	1245391

    Why when I click 'Sell Mkt' button I see the 'orderAction=Sell'?
    Click image for larger version

Name:	image.png
Views:	230
Size:	14.9 KB
ID:	1245392

    Please take a look:
    Click image for larger version

Name:	image.png
Views:	186
Size:	41.7 KB
ID:	1245393

    #2
    Hi webus, The manual trading in the platform just uses buy and sell signals internally so this will not be the same as using the managed approach in a strategy. There is nothing documenting the reason for this naming in manual trading but the actions using automated trading stay the same.

    Comment


      #3
      Hi NinjaTrader_ChrisL,

      Question #1:
      And what is the logic and meaning of this? Why the 'Buy' direction is correct, but the 'Sell' direction is weird and unexpected? If I open a 'Buy' order - it will be 'OrderAction.Buy'. If I close a Short positon - it will be 'OrderAction.BuyToCover'. Why the 'Sell' direction is special? Why if I open a 'Sell' order - it will be 'OrderAction.Sell' and if I close a Long position - it will be 'OrderAction.Sell' either? Don't you think that this is illogical? Is this a NT8 bug (because I do not see any logical explanation)?

      Question #2:
      One more question. I'm trying to figure out if the account position is opened or closed (programmably). As soon as the 'Sell Mkt' is clicked - I need to know that this is an entry order (I expect that this is a 'SellShort' order). As soon as the 'Close' buttoon is clicked and a Long position is closed - I need to know that this is an exit order (I expect that this is a 'Sell' order). As soon as a SellLimit order is triggered - I need to know that this is an entry order (I expect that this is a 'SellShort' order). Since you're saying that I can't rely on "OrderAction" - how can I do it otherwise in a logical and stable way (without inventing a bicycle)?

      Comment


        #4
        Hi webus, the Order.Action should not be used in your script since each Order.Action value is used only for specific connection technologies/brokerages. The script should be using the Signal Name of the order or track the position using OnPositionUpdate and OnOrderUpdate, or use the Account object and subscribe to its own event methods. The Chart Trader buttons will not have signal names, so the best approach would be to add your own buttons to the chart to support manual trading in your script. I attached an example of this for reference.
        Attached Files

        Comment


          #5
          Hi NinjaTrader_ChrisL

          Thanks for the approach, but it does not work for me. My goal is to catch exactly manually added trades - especially PendingLimit order's execution and Position closing. The Strategy should identify if the execution was from limit order (entry), 'Close' button (exit) or market buttons (entry). I can catch Account's OnExecutionUpdate, but I cannot identify for sure is the order's filling is entry or exit.

          I'm not sure that using the 'OnPositionUpdate' is a good idea, because I faced a lot of problems with this callback on Rithmic connection. It could appear with a delay or not appear at all. I think you understand what I mean. I want to avoid using this callback on the account, because this approach is not stable.

          How can I achieve this without OnPositionUpdate and without custom buttons?

          Actually, the most usefull and easy aproach should be OrderAction, isn't it? I still do not understand why 'Order.Action should not be used' for NT8 standard trades. I understand that a custom Strategy can be written incorrectly (OrderActions are messed up), but I want to catch only standard NT8 order that are created by standard NT8 tools. Please take a look at the NinjaTrader_PatrickH​ answer regarding the 'OrderAction Terminology'. You will see that 'OrderAction.Sell' should be used for Long closing and 'OrderAction.SellShort' should be used for Short opening. What the diffrence? I do not understand why chart trader opens Short postions using 'Sell' orders (not 'SellShort').

          Comment


            #6
            Originally posted by webus View Post
            My goal is to catch exactly manually added trades - especially PendingLimit order's execution and Position closing.
            Wouldn't using the 'Name' field be better for this?

            Chart Trader consistently uses names like 'Entry', 'Stop1, and 'Target1'
            all the time.

            I assume the '1' gets adjusted if you have multiple targets in your ATM.

            Comment


              #7
              Hi webus, In updates 26 and .27 there were fixes applied to the Rithmic connection related to PositionUpdate events, so these should not be seen anymore. Unfortunately, it is not supported to capture and manage the manually placed orders unless they are done through either the Account object with a button, or with the managed approach using buttons. The signal name is not customizable for manually placed orders so either of these approaches must be used.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              24 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              120 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              63 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              41 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              45 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X