Announcement

Collapse
No announcement yet.

get_RequestHistory

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

  • get_RequestHistory

    I am trying to get history data for a symbol in 15 minute increments for the past one month or two. What do I enter for the parameters? I tried entering get_RequestHistory("LU", "15", IESignal.barType.btBARS, 96, -1, -1); ..but that did not help at all...not sure where I am going wrong. Also, is there any documentation I could refer to get an explanation of the method parameters? Did anybody else have a similar experience? Any assistance would be appreciated. Thank you.

  • #2
    All available documentation is located here.

    You should use:

    RequestHistory("LU", "15", IESignal.barType.btDAYS, 60, -1, -1)

    Comment


    • #3
      get_RequestHistory

      I tried several combinations including RequestHistory("LU", "15", IESignal.barType.btDAYS, 60, -1, -1). However, it only returns one bar for the last 15 minutes. If I put it in a loop incrementing the interval parameters as 60, 120, 180, 360..... and making it wait for sometime after every call, the maximum it stretches is till the beginning of the current day. How do I get history data for more than just the current trade day...eg. for 2 months?

      Comment


      • #4
        Could it be that you are calling GetBar with positive indices? If so, they need to be negative.

        for (x = 0 to -5) GetBar(handle, x)

        Not:

        for (x = 0 to 5) GetBar(handle, x)

        If you are using positive numbers, that would make it look like you are only getting one bar (the most recent).

        Cheers... George

        Comment


        • #5
          get_RequestHistory

          Thanks a lot!!!! That was the problem. It works now....Following the sample project, I was coding it as esignal.get_GetBar(lHandle, 0). So I was always getting the last bar. Thanks once again...

          Comment


          • #6
            You're welcome. Glad that was it. A simple solution and a very common problem I'd bet for most people the first time they use the API since most folks don't naturely use negative indexing.

            Cheers... George

            Comment

            Working...
            X