Greetings:
I'm trying to retrieve a text string from a URL using the following:
function preMain()
{
setPriceStudy(true);
setStudyTitle("Proof");
setCursorLabelName("Proof");
}
var ReportDataCall = null;
var ReportData = null;
var ReportDataArray = new Array();
function main()
{
// Get Report data from website
if (getBarState() == BARSTATE_NEWBAR)
{
ReportDataCall = new HTTP("www.tradersreports.com/reportdata/report.txt");
if (ReportDataCall == null) return;
ReportDataCall.open("rt");
ReportData = ReportDataCall.readln();
}
debugClear();
debugPrintln(" ReportData: " + ReportData);
}
Unfortunately, the variable 'ReportData' does not return any value. I've tried many variations to no avail.
Any ideas?
Warren
I'm trying to retrieve a text string from a URL using the following:
function preMain()
{
setPriceStudy(true);
setStudyTitle("Proof");
setCursorLabelName("Proof");
}
var ReportDataCall = null;
var ReportData = null;
var ReportDataArray = new Array();
function main()
{
// Get Report data from website
if (getBarState() == BARSTATE_NEWBAR)
{
ReportDataCall = new HTTP("www.tradersreports.com/reportdata/report.txt");
if (ReportDataCall == null) return;
ReportDataCall.open("rt");
ReportData = ReportDataCall.readln();
}
debugClear();
debugPrintln(" ReportData: " + ReportData);
}
Unfortunately, the variable 'ReportData' does not return any value. I've tried many variations to no avail.
Any ideas?
Warren
Comment