Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        148 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        5 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        5 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,282 views
        0 likes
        Last Post Leafcutter  
        Working...
        X