Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get execution times from Trade objects

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

    Get execution times from Trade objects

    Is there a way to get the historical execution times of the strategy? I noticed that Trades do not contain any DateTime properties.

    What about historical orders for the strategy? Is there a way I can access those without needing to save all of the information in variables?

    #2
    Hello texasnomad,

    A TradeCollection will contain the entry and the exit Order objects. Each Order object has a Time property.

    For example:
    Code:
    for (int i = 0; i < SystemPerformance.AllTrades.Count(); i++)
    {
    	Print(string.Format( "{0} | {1}", SystemPerformance.AllTrades[i].Exit.Time, SystemPerformance.AllTrades[i].ToString() ));
    }
    http://ninjatrader.com/support/helpG...collection.htm
    http://ninjatrader.com/support/helpG...n-us/order.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by space_trader, 11-26-2020, 05:06 AM
    2 responses
    164 views
    1 like
    Last Post klaus w
    by klaus w
     
    Started by Kicks.Spin, Today, 07:46 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by Renejm, Today, 06:17 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by kazisl, Yesterday, 06:41 PM
    2 responses
    10 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by impactX, 05-04-2021, 01:07 AM
    2 responses
    11 views
    0 likes
    Last Post NinjaTrader_Melissa  
    Working...
    X