Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

previous day's trades

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

    previous day's trades

    Hello Support --

    I used tye following code to get execution details

    foreach (Account acct in Cbi.Globals.Accounts)
    {

    if (acct.Executions != null)
    {


    ExecutionCollection execution = acct.Executions;


    foreach (Execution eX in execution)
    {

    Print("Account " + eX.Account + "Instrument " + eX.Instrument + "Time " + eX.Time + "Price " + eX.Price + "Quantity " + eX.Quantity + "mp " + eX.MarketPosition);



    }
    }
    }

    but it gives only the current day trades and does not previous day trades. The other thing is that if I close the terminal and open it again the code gives me the trades. It means that NT7 keeps trades somwere but the script has default settings to work with only the current day trades.

    What is the settings how to change them.

    Thank you in advance.

    #2
    alex_bbfg, this is unfortunately not an area we could support in our NinjaScript - I would expect prior days being stored into your database (Ninjatrader.sdf file) from where current day and prior day are then combined where requested.

    Comment


      #3
      Bertrand,

      your reply is the same as expected. I understand that it is not the area of supporting in the way I asked. But I guess that strategy trades have the same logic. Just answer in a way of strategy content. Which methods manage periods to work with.

      Any way, thank you for Ninjatrader.sdf file information.

      Regards.

      Comment


        #4
        Alex, the strategies have the Trade collections for historical and / or realtime trades to query against - this is in contrast the account objects.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        82 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        43 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        56 views
        0 likes
        Last Post CarlTrading  
        Working...
        X