Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Expose strategy template or ATM from a manually entered order

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

    Expose strategy template or ATM from a manually entered order

    Is there a way to expose programmatically the strategy template or ATM from a manually entered order?
    Attached Files

    #2
    Hello,

    Thank you for your post.

    If you have an open position and you wish to add a limit and stop order to protect the position please follow these steps:
    • In the ATM Strategy drop down menu, set it to a value of "none"
    • Right click in the SuperDOM or Chart Trader and enable OCO order placement by selecting the menu "OCO Order"
    • Then place a limit order where you want to exit at a profit
    • Then place a stop order where you want to exit at a loss
    • Then right click again and select the menu "OCO Order" to disable the OCO order placement
    • Now you have a target and a stop placed protecting your open position, and when one of these orders is filled the other will be canceled automatically.

    To add an ATM strategy to an unprotected open position, please follow the steps below.
    • Select the Positions tab of the Control Center.
    • Right click on the position.
    • Select Apply ATM Strategy and then select the desired ATM.
    • Now your position will have ATM applied to it.

    Please let us know if we may be of further assistance.
    Marco G.NinjaTrader Customer Service

    Comment


      #3
      I want to get the "Strategy Template" name, the encircle in red. I tried using foreach(Orders order in Account.Orders) but there's no option order.GetStrategyTemplate and order.Name doesn't work either. I just want to know if that entry is came from specific strategy template in the chart trader.

      Comment


        #4
        Hi ...
        I guess you need to use OnOrderUpdate to detect all orders issued...
        something like this
        private void OnOrderUpdate(object sender, OrderEventArgs e)

        But I would prefer to have a way to check that from the current active orders...
        Pablo
        pmaglio
        NinjaTrader Ecosystem Vendor - The Indicator Store

        Comment


          #5
          Originally posted by pmaglio View Post
          Hi ...
          I guess you need to use OnOrderUpdate to detect all orders issued...
          something like this
          private void OnOrderUpdate(object sender, OrderEventArgs e)

          But I would prefer to have a way to check that from the current active orders...
          Pablo
          I want to detect or get the order from a specific atm strategy template by code. I am entering the order manually using the chart trader with an ATM Strategy template. Now I want to check the trade I have entered using that ATM Strategy template. In the attached image I encircle the "SampleATM2-1", that is what I want to get by code. I am coding it on the indicator, not on strategy.

          foreach(Order order in Account.Orders)
          {

          }

          doesn't give that option. I can only get the name, instrument, quantity, average price, etc., but what I want is the ATM Strategy template that I used in the chart trader when I took the order.

          Comment


            #6
            Hello luxurious_04,

            You could loop through the Account.Orders collection, or you can subscribe to account level OrderUpdates to capture the Order updates of an ATM strategy.

            Intercepting and modifying ATM strategy orders would go beyond the level of support that we would offer, but I do have a rough example that can give some further direction for identifying ATM strategy orders from account level OrderUpdate events. This example is attached to give you some further direction.

            Account.OrdeUpdate - https://ninjatrader.com/support/help...rderupdate.htm

            We look forward to assisting.
            Attached Files
            JimNinjaTrader Customer Service

            Comment


              #7
              Marco,

              You posted:
              "To add an ATM strategy to an unprotected open position, please follow the steps below.
              • Select the Positions tab of the Control Center.
              • Right click on the position.
              • Select Apply ATM Strategy and then select the desired ATM.
              • Now your position will have ATM applied to it.
              '

              Could this be evoked programmically from a custom button in ChartTrader?


              Comment


                #8
                Hello EminiTrader,

                There is not a supported means to apply an ATM strategy to an open position programmatically and having the user actions automated would also be outside of what we can support and give direction for.

                I may suggest creating a NinjaScript strategy that uses Adopt Account Position for this purpose. I have attached an example here.

                Start Behaviors - https://ninjatrader.com/support/help..._positions.htm

                We look forward to assisting.
                Attached Files
                JimNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bortz, 11-06-2023, 08:04 AM
                47 responses
                1,605 views
                0 likes
                Last Post aligator  
                Started by jaybedreamin, Today, 05:56 PM
                0 responses
                8 views
                0 likes
                Last Post jaybedreamin  
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                18 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                4 views
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                13 views
                0 likes
                Last Post Javierw.ok  
                Working...
                X