• 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

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:
    http://ninjatrader.com/support/helpG...rs_account.htm

    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.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by MavMoney, Yesterday, 07:17 AM
    2 responses
    12 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by ksarin, 02-27-2020, 01:39 PM
    4 responses
    24 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by Janfor, Today, 10:19 AM
    0 responses
    2 views
    0 likes
    Last Post Janfor
    by Janfor
     
    Started by Brian F, Today, 10:00 AM
    0 responses
    6 views
    0 likes
    Last Post Brian F
    by Brian F
     
    Started by Teebone21, Yesterday, 04:26 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X