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, 03-31-2026, 09:41 PM
    1 response
    42 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X