Loop needs to only print 1 z
- Simple continue syntax issue
- Recalculation of an indicator
- Questions from Beginners MQL5 MT5 MetaTrader 5
THX! just one z necessary prints like 100 anyone know how to just print once z above y? Is this worth it or just have it break and save to variables faster bc break ends the whole loop?
What is a faster bc?
What is a faster bc?
bc = because
for(int x=0; x<100; x++) if(x==1) { x1=1; break; } for(int y=0; y<100; y++) if(y>x1) { Print("y ",y); break; }
as in this instead and just stop the for loops to make it faster?
- www.metatrader5.com
THX! just one z necessary prints like 100 anyone know how to just print once z above y? Is this worth it or just have it break and save to variables faster bc break ends the whole loop?
you have not put an end to y iteration after z condition is met
how do i do that why doesnt break take care of it like before that now is the next step
tried to move brackets around not it
from y is equal to 2 until 98 is valid for z is equal to 3 until 99,that is what i understand from your code
all until a hundred supposed to be
all until a hundred supposed to be
your last stop is 99 and your count is 100
yes 99 ok not exactly 100
for(int x=0; x<100; x++) if(x==1) for(int y=0; y<100; y++) if(y>x) // DEAL WITH THE PREVIOUS DETERMINED X AND FINALLY { for(int z=0; z<100; z++) if(z>y) // DEAL WITH THE PREVIOUS DETERMINED Y AND FINALLY { Print(__LINE__," ",GetLastError()," ",GetMicrosecondCount()," z ",z," ",GetMicrosecondCount()," ",GetLastError()); break; // !!!!! ONLY ONCE THOUGH !!! THIS ONE PRINTS MANY Z's; NOT CORRECT } break; }
yes 99 ok not exactly 100
int tempz; for(int x=0; x<100; x++) { int o = 0; int p = 0; if (x==1) { for(int y=0;y<100;y++) { if (y>x&&o<1) { o += 1; for(int z=0;z<100;z++) { if (z>y&&p<1) { p += 1; Print("z:",z); tempz = z; } } Print("y:",y); } continue; } Print("x:",x); } continue; } Print(__LINE__," ",GetLastError()," ",GetMicrosecondCount()," to get z value which is ",tempz," it took ",GetMicrosecondCount()," ms ",GetLastError());
bc = because
Then please write because instead of bc.
I am English and I could not make sense of your sentence.
Imagine how it can be for non native English speakers and there are many that use this forum.