- Simple continue syntax issue
- Recalculation of an indicator
- Questions from Beginners MQL5 MT5 MetaTrader 5
nadiawicket:
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?
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?
faster bc break ends the whole loop?
What is a faster bc?
Keith Watford:
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?
Code profiling - Developing programs - MetaEditor Help
- www.metatrader5.com
Profiling means collecting program parameters during its execution. During a profiling, the execution time and the number of calls of individual functions and program code lines are measured. With this tool, the programmer is able to find and optimize the slowest code sections. Profiling can be performed on the normal chart of the trading...
nadiawicket:
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
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?
roshjardine:
you have not put an end to y iteration after z condition is met
you have not put an end to y iteration after z condition is met
nadiawicket:
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
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
roshjardine:
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
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
nadiawicket:
your last stop is 99 and your count is 100
all until a hundred supposed to be
roshjardine:
your last stop is 99 and your count is 100
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; }
nadiawicket:
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());
nadiawicket:
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.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register