I need a little help. Some time ago, a friend of mine quickly made a module. It worked well, but obviously there are some changes and now it gives me this mistake.
Thank you so much
Post the whole function, so people could help you
-
Don't post pictures of code, they are too hard to read.
Please edit your post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor - When i is zero, array[i-1] does not exist. You would know that if you had used the debugger.
- Simplify your code by counting down.
for (i=last_index; i >= 0; --i){ if(profit > profits_list[i]) break; profits_list[i+1]=profits_list[i]; tickets_list[i+1]=tickets_list[i]; types_list[i+1]=types_list[i] } profits_list[i+1]=profit; tickets_list[i+1]=ticket; types_list[i+1]=BCDD::OrderType();
-
Don't post pictures of code, they are too hard to read.
Please edit your post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor - When i is zero, array[i-1] does not exist. You would know that if you had used the debugger.
- Simplify your code by counting down.
Thank you! I'll do it.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I need a little help. Some time ago, a friend of mine quickly made a module. It worked well, but obviously there are some changes and now it gives me this mistake.
Thank you so much