Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

gap in atm strategy methods

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

    gap in atm strategy methods

    I cannot subscribe to orderupdate or execution update from my ATM Strategy code.
    however, I have the ability to change the price of the target and stop order. how can I just change the info without the ability to query what the existing stop and target order prices are.
    the simplest method I can think of is the ability to subscribe to
    OnOrderUpdate() and OnExecutionUpdate()

    how do I subscribe to these 2 from my ATM Strategy code?

    #2
    Hello junkone,

    Thank you for your post.

    ATM Strategies would not trigger the OnOrderUpdate() or OnExecution() events of a NinjaScript strategy.

    You would use AtmStrategyChangeStopTarget: http://ninjatrader.com/support/helpG...stoptarget.htm

    You also have GetAtmStrategyStopTargetOrders: http://ninjatrader.com/support/helpG...rgetorders.htm

    Comment


      #3
      My previous response is for NT 7. For NinjaTrader 8 you would refer to the methods at the following link: http://ninjatrader.com/support/helpG...gy_methods.htm

      Comment


        #4
        you need a new method in ATM Strategy Monitoring to get the existing price of the target/stop orders. there is no way to derive it from the order methods today especially if the order is still in a accepted state.

        Comment


          #5
          Hello junkone,

          You would use GetAtmStrategyStopTargetOrderStatus() to get the order state of the Stop Loss or Profit Target. Are you referring to when the entry order is not yet filled?

          Comment


            #6
            yes, when the stop and the target orders are not filled, I have no way to find out programmatically what the set prices are

            Comment


              #7
              Hello junkone,

              Thank you for your patience.

              I will forward your request for a means to check the price level of the unfilled orders on an ATM strategy to development.

              You can currently call the account events to see the orders. For example:
              Code:
              		private Account myAccount;
              		protected override void OnStateChange()
              		{
              			if (State == State.SetDefaults)
              			{
              				lock (Account.Accounts)
              					myAccount = Account.Accounts.FirstOrDefault(a => a.Name == "Sim101");
              				
              				lock(myAccount.Orders)
              					myAccount.OrderUpdate += OnAccountOrderUpdate;
              			}
              		}
              		
              		private void OnAccountOrderUpdate(object sender, OrderEventArgs e)
              		{
              			Print(e.LimitPrice + " " + e.StopPrice);
              		}
              You can find information on Account at the following link: http://ninjatrader.com/support/helpG...ount_class.htm

              Comment


                #8
                Hello junkone,

                Your request for a method to track the price level of the orders before fill is being tracked under ID # SFT- 1434.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Waxavi, Today, 02:10 AM
                0 responses
                2 views
                0 likes
                Last Post Waxavi
                by Waxavi
                 
                Started by TradeForge, Today, 02:09 AM
                0 responses
                4 views
                0 likes
                Last Post TradeForge  
                Started by Waxavi, Today, 02:00 AM
                0 responses
                2 views
                0 likes
                Last Post Waxavi
                by Waxavi
                 
                Started by elirion, Today, 01:36 AM
                0 responses
                4 views
                0 likes
                Last Post elirion
                by elirion
                 
                Started by gentlebenthebear, Today, 01:30 AM
                0 responses
                4 views
                0 likes
                Last Post gentlebenthebear  
                Working...
                X