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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    52 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    29 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    194 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    355 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    274 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X