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

Parsing Data From WebLink

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

    Parsing Data From WebLink

    Howdy--

    Here is a link to GC legacy COT data in CSV format (http://www.quandl.com/api/v1/dataset...ollapse=weekly) that I want to use as values for an indicator plot.

    Does anyone know of any examples that:

    1. Show how to make web requests to grab data
    2. Parse CSV data into an array?

    My goal is to build and share (not sell) an indicator to grab the free COT data.

    Thanks,

    Aventeren

    #2
    Aventeren,

    Thank you for your post.

    I did respond to an earlier thread on how to get CSV values to an array -
    http://www.ninjatrader.com/support/f...ad.php?t=68384

    As for a WebRequest, you will want to take a look at the MSDN article on it -http://msdn.microsoft.com/en-us/libr...v=vs.110).aspx

    Please note that both these cases are not supported with NinjaTrader and do not have any documentation on using them with NinjaTrader.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Aventeren,

      Thank you for your post.

      I did respond to an earlier thread on how to get CSV values to an array -
      http://www.ninjatrader.com/support/f...ad.php?t=68384

      As for a WebRequest, you will want to take a look at the MSDN article on it -http://msdn.microsoft.com/en-us/libr...v=vs.110).aspx

      Please note that both these cases are not supported with NinjaTrader and do not have any documentation on using them with NinjaTrader.
      Thanks, Cal.

      So I figured out how to do a web request...and so I am now able to get the CSV data printed to the Output Window.

      I next just need to figure out how to parse this CSV data, and then I should be able to plot it.

      I've moved away from FILE to NT and have shifted to WEB to NT....I'm getting closer.

      Thanks,

      Aventeren

      Comment


        #4
        Aventeren,

        Try taking a look at this link -
        http://stackoverflow.com/questions/1...ile-from-a-url
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Syncing Weekly Bar Data

          So I've been able to successfully make a web request, parse the data and convert the data into the right format while inserting the data into lists.

          I'm having a problem getting the dates to match on bars (weekly bars) and the COT dates.

          For instance, let's say that Time[0].Date is 1/3/2014 2:15:00 PM while the COT date is 12/29/2013 12:00:00 AM. Therefore, the COT data should be potted under this weekly bar because the COT data was released during this time period. But the previous COT data from the previous week should also be in this bar, too. On a daily chart, this wouldn't be that big of deal because you would just see the COT data change on the day, however what are some possible ways of better syncing up the weekly bars?

          Thanks,

          Aventeren

          Comment


            #6
            Aventeren,

            Not really sure here as this is new territory.

            My suggestion would to maybe take the array/list data and find start and end points to the week and then get the min/max values for High, Low, Open, Close that can be processed as a new array for bar data.
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by algospoke, Yesterday, 06:40 PM
            2 responses
            19 views
            0 likes
            Last Post algospoke  
            Started by ghoul, Today, 06:02 PM
            3 responses
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            45 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            20 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            180 views
            0 likes
            Last Post jeronymite  
            Working...
            X