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
Alternate code:
Alternate code:
if(index>0 || index>8) return (-1);
Maybe if(index < 0 || ...) ...; ?
The second version of the code is really better ... and prettier
--
It's true ... when it's harder to maintain a size-optimized code than a blurry one.
i.e., written more broadly is sometimes easier to maintain...
--
In SQL it's upside down... code optimization
putting it into a single query even hurts
what's interesting ...
for example the SQL code of one complex query is harder to read than a few successive SQL queries
and as strange as it may seem, the performance of three simple queries is often better than the performance of one complex (seemingly optimized) query
The logic of those who write complex SQL queries... suffers... just because...
1 - inconvenient to maintain
2-slower working
--
don't apply to your code
that's just from experience...
Here's something I liked a lot... Taken from Igor Kim's thread, his first code:
... and his second:
How is it? It pleased me personally... :))Made an indicator. But when ZZCount>1 the terminal hangs up. It seems that there are no errors.
Maybe someone will find the cause?
You can be an old man, too.
Thank you very much!
Sometimes you need to sort the data in MQL4 without touching the data itself. There are no pointers in MQL4, and there are no structures either.
Here is an example of a script that sorts data by different parameters through emulation of pointers. Perhaps, someone will find this approach and the sorting function useful.
The result of the work: