• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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:
    Patrick G.NinjaTrader Customer Service

    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
        http://www.indicatormall.com/export-to-excel/
        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.

        http://www.indicatormall.com/export-to-excel/

        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.
          Patrick G.NinjaTrader Customer Service

          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.

            http://www.indicatormall.com/export-to-excel/

            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 maltese, Today, 02:54 AM
            0 responses
            1 view
            0 likes
            Last Post maltese
            by maltese
             
            Started by morrnel, Yesterday, 04:18 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Marco  
            Started by jmahon, Today, 02:45 AM
            0 responses
            3 views
            0 likes
            Last Post jmahon
            by jmahon
             
            Started by brianshih, Today, 02:40 AM
            0 responses
            2 views
            0 likes
            Last Post brianshih  
            Started by franco12364, Yesterday, 02:29 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Marco  
            Working...
            X