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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        173 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        328 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        252 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        354 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        181 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X