Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get the first trade of an account?

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

    How to get the first trade of an account?

    Hello.

    How can I get the first historical trade of an account?

    I can get the first trade of a strategy, fetching:
    Code:
    Trade firstTrade = SystemPerformance.AllTrades[0];
    , but I need the same of my account, not the strategy.

    Thank you very much.

    #2
    Hello,

    Thank you for the post.

    In this case, because you want the actual account trades this would not be an item Strategies have by default. All of the reporting items in Strategies specifically will relate to only the running instance of that specific strategy. To utilize the Account, you could reference the addon account methods: http://ninjatrader.com/support/helpG...ount_class.htm

    You could use the following example to loop through an accounts orders:


    To access the account, please see the following example as this step is omitted in the above samples, mainly just the portion noted "// Find our Sim101 account": http://ninjatrader.com/support/helpG...ount_class.htm

    Please let me know if I may be of additional assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X