Announcement

Collapse
No announcement yet.

Some troubles

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

  • Some troubles

    Hello!

    I successfully use Desjtop API in my application based on examples in http://share.esignal.com/groupconten...r=&groupid=185

    But when I downloaded the history of instrument XAU A0-FX or any other instrument with period 1 minute, I see the next:
    2010.08.02,23:58,1181.8000,1181.8500,1181.3800,118 1.5800,76
    2010.08.03,00:00,1181.7500,1181.8500,1181.1000,118 1.3300,36
    And it is in every day I downloaded. So, is it a problem of my application or API problem? I do not recieve bar with time 23-59, no one.
    I can share code if needed..
    thank you!

  • #2
    Hi,

    In order to diagnose this problem, could you please share the code that you are using.

    Thanks

    Comment


    • #3
      void CSampleDlg::ES_OnBarsReceived(long l) {
      //TRACE ("OnBarsReceived Fired");
      if(!m_bFillHistory)
      {
      FillHistory();
      }
      }

      void CSampleDlg::FillHistory()
      {
      ...
      lNumBars = 0;
      lNumBars = (*m_piHooks)->GetGetNumBars(m_hHistory);

      if (m_hHistory == NULL || lNumBars == 0)
      {
      m_bFillHistory = true;
      // EnableWindows();
      return;
      }
      for (long i = -(lNumBars-1); i <= 0; i++)
      {
      baritem = (BarData)((*m_piHooks)->GetGetBar(m_hHistory, i));

      COleDateTime time;
      time = baritem.dtTime;
      SYSTEMTIME st;

      st.wYear = time.GetYear();
      st.wMonth = time.GetMonth();
      st.wDay = time.GetDay();
      st.wHour = time.GetHour();
      st.wMinute = time.GetMinute();
      st.wSecond = time.GetSecond();

      double open = baritem.dOpen;
      double high = baritem.dHigh;
      double low = baritem.dLow;
      double close = baritem.dClose;

      char isotime[20];
      SystemtimeToISOtime(st,isotime); // this function convert systemtime to ISO-date format as string
      }
      (*m_piHooks)->ReleaseHistory(m_hHistory);
      }

      To form a request I use the same code as int example. And everything I do like in example. Please, check my code. I use functions to convert double-time format to string-format, may be this is the problem?

      Comment


      • #4
        Can you also tell us the version of eSignal you are running. Do include the version and build number. Thanks.

        Comment


        • #5


          version 10.6.1879.975 (2/22/2010)

          Comment


          • #6
            Can you also tell us the arguments you pass to RequestHistory? What are the start and end time interval?

            Comment


            • #7
              m_hHistory = (*m_piHooks)->GetRequestHistory(S2B(m_last_symbol), S2B(period), var,
              depth,0,0);


              var = btDAYS
              depth - calculated by programm.
              depth can not be less then 10 and not earlier 1970 year.
              start and end equal 0, in help it means 24hour history.

              Comment

              Working...
              X