Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exporting data for a specific session

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

    Exporting data for a specific session

    Hi. I'm looking for a way to export data for a specific trading session. For example:

    I can go to Historical Data, select the instrument (CL) select the contract (CL 01-20), select Last, Day and get the OHLC an Vol data for each day. I assume this is Extended Trading Hours session data. How can I export OHLC and Vol data (Day and Minute) for the Nymex Energy RTH session?

    Thanks!

    #2
    When exporting data, you're looking at raw OHLCV information for that instrument on that date. This data has no concept of trading hours or sessions. For example, 60 minute data doesn't really exist. When you open a 60 minute chart, NinjaTrader is using the underlying minute data to build that 60 minute bar.

    You can learn more about exporting data and data formats here:

    Comment


      #3
      Ok, so I get that I can download the minute data for each day, sort that data, throw out the data that does not align with the RTH session for crude, and then do that over and over and over to build a file that gives me OHLC for the Nymex Energy RTH session. It would probably be faster to just look at the chart and record in manually.

      However, the Ninja Trader interface for exporting historical data includes "day" (in addition to "minute" and "tick") as a selection and displays OHLC data for that "day".It has to be using some consistent star and end time for that "day" which likely aligns with a trading session. What is the definition of "day" in the menu for exporting historical data?

      Further, and maybe this is a feature request, but given that "day" is already a selection for exporting historical data and given that many session times are already defined in the "Trading Hours" menu, its seem like it would be fairly easy to allow exporting the OHLC data for a pre-defined "trading hours" session.

      Comment


        #4

        Originally posted by ralett View Post
        Hi. I'm looking for a way to export data for a specific trading session. For example:

        I can go to Historical Data, select the instrument (CL) select the contract (CL 01-20), select Last, Day and get the OHLC an Vol data for each day. I assume this is Extended Trading Hours session data. How can I export OHLC and Vol data (Day and Minute) for the Nymex Energy RTH session?

        Thanks!
        Can this help you? I used it but only in NT7. Works perfectly. Just download the trial and test it.



        If not this might work:
        Place a print statement in your NT8 code, below the result you want to export, which includes the reference to the result you want to see.


        Code
        Print(Time[0].ToString()+" " + "bullArrowsUp:" + " " + bullArrowsUp + " " + "bearArrowsDown:" + " " + bearArrowsDown);
        Above, I give an example of a print statement that returns the results of how many arrows are seen on my chart using a for loop.

        Attach the indicator to a chart. From the Control Panel Open a New> NinjaScript Output Window. Refresh the chart, F5, and if your print code is correctly written you should see the results in the output window. Then if you right click on the output window you can save it as a text file.
        Last edited by marcus2300; 12-10-2019, 02:41 PM.

        Comment


          #5
          You're correct to say that daily data would be some sort of session. That session would be controlled by your historical data provider. In most cases, the daily data is ETH.

          Comment


            #6
            Originally posted by marcus2300 View Post
            http://www.indicatormall.com/export-to-excel/


            Can this help you? I used it but only in NT7. Works perfectly. Just download the trial and test it.



            If not this might work:
            Place a print statement in your NT8 code, below the result you want to export, which includes the reference to the result you want to see.


            Code
            Print(Time[0].ToString()+" " + "bullArrowsUp:" + " " + bullArrowsUp + " " + "bearArrowsDown:" + " " + bearArrowsDown);
            Above, I give an example of a print statement that returns the results of how many arrows are seen on my chart using a for loop.

            Attach the indicator to a chart. From the Control Panel Open a New> NinjaScript Output Window. Refresh the chart, F5, and if your print code is correctly written you should see the results in the output window. Then if you right click on the output window you can save it as a text file.
            Thanks Marcus. Yes, it looks like they have a version for Ninja 8. I will check it out...

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bmartz, 03-12-2024, 06:12 AM
            5 responses
            32 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Started by Aviram Y, Today, 05:29 AM
            4 responses
            13 views
            0 likes
            Last Post Aviram Y  
            Started by algospoke, 04-17-2024, 06:40 PM
            3 responses
            28 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by gentlebenthebear, Today, 01:30 AM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by cls71, Today, 04:45 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X