![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
Please, can you tell me how to see how much memory Expert Advisor occupies and how it is reallocated?
The Windows Task Manager should be enough for you.
Check outthis article.
In general, take apart your Expert Advisor into scripts, make all functions work, and then assemble them in a pile.
And yet I can't figure out why levels are not created using ObjectCreate. All functions work, but no OBJ_TREND objects are created
There are variables defined on the global level:
string oRes, oSup, oPP, oRes1, oRes2, oRes3, oSup1, oSup2, oSup3, textPP, textR1, textR2, textR3, textS1, textS2, textS3;
The code that should create the levels:
Folks, help sort this out. PleaseLevels are created, only they are not visible)
Set the coordinates - time / price. You have zeros all over the place.
Levels are created, only you can't see them)
Set the coordinates - time / price. You have solid zeros set there.
It makes an object without bindings, then modifies it. Here.
The object is not created because of incorrect (not assigned) name. (Above already replied). Consequently, it can't be modified to see it.
Well, let's say you've declared variables at global level, have you assigned values to these variables?
If not, then you say to the program "create an object with such-and-such characteristics with the name..." and there is a problem - the name is not given. So it doesn't create it.
Wouldn't it be easier to specify it directly in the ObjectCreate code?
I can't get a fix for the array overflow error. I wrote about it on page 88. The Expert Advisor works for some time and crashes. To be more exact it works one pass from the beginning to the end of Expert Advisor and on the second pass in the loop below the array overflows indicating a string:
H=High[j];
Most importantly, I don't understand how the High[] array overflows, since a specific number of haves is specified? And why terminal indicates overflow in string H=High[j]; ?
Please, can you tell me how to implement it correctly? Is it possible to null High[] array or to write the high of a particular candle in variable H in some other way?
Try it this way:
Basis: array indexing starts at zero, so when Candle==100 the last element of the array is indexed by the number 99, not the number 100.
Try it this way:
Basis: array indexing starts at zero, so when Candle==100 the last element of the array is indexed by the number 99, not the number 100.
Good afternoon! I encountered the following problem... Generated an Expert Advisor... Run it on RTS index futures. And there, the lots are not fractional = no money management works, and the quotations are multiples of 10 = trailing stop does not work. Please advise, is it possible to solve this problem?
I know how to round iMa values to 10 or 5, as a last resort I think to run trailing stop separately.
The tool has a Volume_Step property. See if you can use it for non-fractional volumes.
For quotes divisible by 10, you just need to make the trailing stop step the same.
The tool has a Volume_Step property. See if you can use it for non-fractional volumes.
And for quotes divisible by 10, you just need to make the trailing stop step the same.