• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 leodrz, Yesterday, 09:45 PM
    2 responses
    14 views
    0 likes
    Last Post leodrz
    by leodrz
     
    Started by habibalex, Yesterday, 09:30 PM
    0 responses
    8 views
    0 likes
    Last Post habibalex  
    Started by Herrwolf1, Yesterday, 09:07 PM
    0 responses
    8 views
    0 likes
    Last Post Herrwolf1  
    Started by nomadmilo, Yesterday, 08:52 PM
    1 response
    9 views
    0 likes
    Last Post nomadmilo  
    Started by jvanelli, Yesterday, 08:48 PM
    2 responses
    9 views
    0 likes
    Last Post jvanelli  
    Working...
    X