Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Actual Executed Price of the trading

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

    Actual Executed Price of the trading

    Greetings of the Season
    I will appreciate if someone could explain the following and guide me to do it better
    When using the EnterLong() and EnterShort() Command how to extract the price at which the actual trading has executed.

    Thank You

    Simple

    #2
    Simple,

    You would want to use the IOrder object to get the entry price of the order, you can also use the IExecution object as well to get the exact execution fill price -

    http://www.ninjatrader.com/support/h...iexecution.htm

    http://www.ninjatrader.com/support/h...tml?iorder.htm
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the link. I am not expert programmer. Would you mind giving me a simple sample code to extract the price please , please.

      Best Regards

      Simple.

      Comment


        #4
        Simple,

        The reference sample below will give you a good starting point on using OnOrderUpdate() and OnExecution() -
        The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()


        The links I gave before will help in using the IOrder or IExecution objects in getting the price.

        Example (This assumes that the IOrder object has been created in OnBarUpdate()) -
        Code:
        protected override void OnExecution(IExecution execution)
        {
            if(execution.Order == EntryOrder)
              Print(execution.Price);
        }
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        52 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        142 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X