Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator trade duration

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

    indicator trade duration

    hi hello is any indicator available that show the duration of the trade?
    thanks

    #2
    Hello canarydaytrading,

    I'm not aware of any indicators that would show the number of minutes/seconds between an entry and exit order from an account object.

    This thread will remain open for any community members to share.

    Is this something you are attempting to develop?

    If so, you can monitor the <Account>.ExecutionUpdate event and store the entry and exit executions to variables, and then compare the time of the orders.
    https://ninjatrader.com/support/help...tionupdate.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      thanks Chelsea, i mean about the time during the trade before exit.

      Comment


        #4
        Hello canarydaytrading,

        You are wanting to compare the current time minus the entry time before the exit order closes the trade?

        Assign the <execution>.Time to a variable. Then use <DateTime>.Subtract to subtract this

        private DateTime entryTime;

        In the <Account>.ExecutionUpdate event handler;
        entryTime = e.Time;

        In OnBarUpdate():

        if (entryTime != null)
        {
        Print(Time[0].Subtract(entryTime));
        }
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        642 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X