[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 344
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Variables. I asked to give either arrays or variables different names. But they didn't seem to understand me.
I haven't understood it till now. >> Please explain.
The logic of the indicator is clear to me. I can't write it in code yet, as I have little knowledge and experience in programming.
I have understood the limitation of the number of bars in the calculation. I will take it into account, thanks.
Please advise how to deal with error 4054. It keeps popping up in the indicator when iTime() is accessed after a character change.
Thank you.
I still don't get it. Please explain.
If they are arrays, there will be holes in them and expressions like:X[i]=Z[i]+X[i+1] are meaningless.
If they are variables, it's very simple:
for(i=0;i<ArraySize[z];i++)
if(Z[i]>=0)X+=Z[i];
else Y+=Z[i];
Please advise how to deal with error 4054.
Correctly write the code.
Correctly write the code.
First of all, learn how to answer on the merits. Comments like yours are of no use to anyone.
First and foremost, learn to answer substantively. Comments like yours are of no use to anyone.
Well, if my answer is not substantive, let's wait to see who can give you an answer on your scant information.
First of all, learn to answer correctly. Nobody needs comments like yours.
Well, if my answer is not on point, let's wait to see who can give you an answer on your scarce information
.Break!!!
Silen, did GetLastError return the 4054 error to you or did you see it in the logs? Please also give me a piece of code where the error is coming out
Please, advise how to know the profit of the last and penultimate closed order, is it real?
OrderSelect (0,SELECT_BY_POS, MODE_HISTORY) - selects the last order in the history
OrderSelect (1,SELECT_BY_POS, MODE_HISTORY) - the last but one order
respectively, for each of them you can find OrderProfit()