Login Page - Create Account

Support Board


Date/Time: Sun, 28 Apr 2024 13:49:38 +0000



Post From: Custom dll study has just caused a CPU exception.

[2014-12-12 13:17:29]
User54873 - Posts: 1
Hi,

I am facing this error when i add custom study.

i am using following code.I didn't find the solution of this.can anyone help me.

int RequestValuesFromServer(SCStudyInterfaceRef sc)
{
  SCString WebsiteURL;
  int& RequestState = sc.PersistVars->i1;
WebsiteURL="https://google.com/finance";
sc.AddMessageToLog(WebsiteURL.GetChars(), true);
if (!sc.MakeHTTPRequest(WebsiteURL))
  {
   sc.AddMessageToLog("Error making HTTP Request.", true);
   RequestState = HTTP_REQUEST_ERROR;
  }
  else
  {
   RequestState = HTTP_REQUEST_MADE;
   sc.AddMessageToLog("Requesting data from Trading Levels server.",true);
  }
  return 0;

  if (RequestState == HTTP_REQUEST_MADE && sc.HTTPResponse != "")
  {
   RequestState = HTTP_REQUEST_RECEIVED;
   sc.AddMessageToLog("HTTP_REQUEST_RECEIVED",true);
   return 1;
  }
  else if(RequestState == HTTP_REQUEST_MADE && sc.HTTPResponse == "")
  {
    return 0;
  }
  if (RequestState != HTTP_REQUEST_RECEIVED)
    return 0;

  return 1;
}
Date Time Of Last Edit: 2014-12-12 13:18:40