I have 3 "For loops" in my program under function main() using a one minute chart. I am trying to figure out how the program reads in function main()? Is it sequential from top to bottom until it reads "return"? Does it read all the data first and then work the formulas in the program or does it read one piece of stock data and then goes through the formulas?
Is the "return" statement at the end of the program in the correct place? When it reads "return" does it go back to the beginning of function main() and gets the next one minute data point and then goes through the formulas again repeating itself until all the one minute data analyzed?
I also ran it once and got an "Out of Memory" message. Looked everywhere and could find no information on this. Any suggestions as to where I can find info on this? I realize it most likely is due to an error on part writing the program.
or should the last 5 lines of the program look like this?
Or should the top part of the program be switched around like this?
Is the "return" statement at the end of the program in the correct place? When it reads "return" does it go back to the beginning of function main() and gets the next one minute data point and then goes through the formulas again repeating itself until all the one minute data analyzed?
I also ran it once and got an "Out of Memory" message. Looked everywhere and could find no information on this. Any suggestions as to where I can find info on this? I realize it most likely is due to an error on part writing the program.
PHP Code:
function main() {
for (var iii = 0; iii < 16; iii++) {
for (var jjj = 0; jjj < 16; jjj++) {
for (var kkk = 50; kkk < 92; kkk = kkk + 2) {
var ibarMinute = getMinute(0);
var ibarHour = getHour(0);
var ibarDay = getDay(0);
var ibarMonth = getMonth(0);
var ibarYear = getYear(0);
if(ibarHour == 10 && ibarMinute == 31) {
//My code goes here
}
if (ibarHour == 15 && ibarMinute == 59) {
//My code goes here
}
}
return;
}
}
}
PHP Code:
}
}
}
return;
}
PHP Code:
function main() {
var ibarMinute = getMinute(0);
var ibarHour = getHour(0);
var ibarDay = getDay(0);
var ibarMonth = getMonth(0);
var ibarYear = getYear(0);
for (var iii = 0; iii < 16; iii++) {
for (var jjj = 0; jjj < 16; jjj++) {
for (var kkk = 50; kkk < 92; kkk = kkk + 2) {
//My code goes here
}
}
}
return;
}
Comment