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 GLFX005, Today, 03:23 AM
        0 responses
        1 view
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        11 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        6 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        14 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        3 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Working...
        X