Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

getting proper OrderID

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

    #16
    Hello ballboy11,

    Thank you for your response.

    I need to clarify on the following:
    • Position.MarketPosition is the position of the strategy and not the account.
    • GetAtmStrategyMarketPosition() is the position of the specific instance of the ATM Strategy template as initialized through the NinjaScript strategy.

    What you want are the following from the Account:
    Please make sure to reviewed the details at these links and review the examples to understand their use.

    Comment


      #17
      Thanks that helped. I got it working but had to do some massaging. Last question how does the event handlers work in NT8? in your manual your event handler is this.

      private void OnOrderUpdate(object sender, OrderEventArgs e)

      {
      }

      but the NTrader8 when creating a new indicator the event handler is this

      protected override void OnOrderUpdate(Cbi.Order order, double limitPrice, double stopPrice,
      int quantity, int filled, double averageFillPrice,
      Cbi.OrderState orderState, DateTime time, Cbi.ErrorCode error, string comment)
      {

      }

      Comment


        #18
        Hello ballboy11,

        Thank you for your response.

        In the specific case of the OnOrderUpdate() we removed the need for the IOrder container and gave direct access to the order object. We also allow you to pull the events in sequence via the the order update parameters such as limitPrice, stopPrice, etc. And you can pull the current information of the order via the 'order' parameter.

        So we allow for direct access to the objects but still provide the update sequence and the properties that would update.

        Please let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by AaronKoRn, Today, 06:28 AM
        0 responses
        3 views
        0 likes
        Last Post AaronKoRn  
        Started by pjsmith, Today, 01:00 AM
        1 response
        12 views
        0 likes
        Last Post NT-Roland  
        Started by alejandro888, Yesterday, 08:41 PM
        0 responses
        9 views
        0 likes
        Last Post alejandro888  
        Started by UltraNIX, Today, 02:14 AM
        0 responses
        9 views
        0 likes
        Last Post UltraNIX  
        Started by augustfay, Yesterday, 12:06 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jason  
        Working...
        X