What's the reason that it doesn't work? I always mess it up and it can't get out of the cycle, is that like coding 101 that you can't put if-else conditional operators in a cycle or am I doing something wrong?
Stupid question 1 reply
Stupid question 10 replies
Stupid Question about News Trading! 2 replies
Ok, so I am really feeling stupid... 2 replies
for (cnt=2; cnt<stopcandle; cnt++)
{
if (iClose(pair,chart,cnt) > iOpen(pair,chart,cnt) ) {bull = bull+1; continue;}
else if (iClose(pair,chart,cnt) < iOpen(pair,chart,cnt) ) {bear = bear+1; continue;}
} for( cnt = 2; cnt < stopcandle; cnt ++ ) {
if( iClose( pair, chart, cnt ) > iOpen( pair, chart, cnt ))
bull = bull + 1;
else if( iClose( pair, chart, cnt) < iOpen( pair, chart, cnt ))
bear = bear + 1;
} DislikedThanks for the reply. I'm not sure what the exact mistake was (I should've written down what it was...). I think it had either something to do with not using continue or not redefining an external int. Either way I fixed it myself, I do think alot of it is unneccisary though.
If I think logically using...Inserted Codefor (cnt=2; cnt<stopcandle; cnt++) { if (iClose(pair,chart,cnt) > iOpen(pair,chart,cnt) ) {bull = bull+1; continue;} else if (iClose(pair,chart,cnt) < iOpen(pair,chart,cnt) ) {bear = bear+1; continue;} }Ignored