Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1553

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
I have written a script that fills an array with time series values.
If you take the data of the current chart symbol, everything is fine
But how to specify another symbol of the instrument?
It gives the error 'Symbol' - wrong parameters count
I wanted to drop a fixed number of time series values into an array, and then work with this array. I understood that for this purpose either to write a loop into the array via
iOpen
for example. Or copy and paste a piece of history into an array via CopyOpen for example. Do I understand correctly?
Wrote a script that fills an array with time series values.
If you take the data of the current chart symbol, everything is fine
But how to specify another symbol of the instrument?
It gives the error 'Symbol' - wrong parameters count
Read more carefully the help on the used functions.
The Symbol() function returns a string with the name of the current symbol. If you need another one, you can specify it either as a string literal or create a string variable with the desired name and pass it to the iOpen() function.
Read more carefully the help for the functions used.
The Symbol() function returns a string with the name of the current symbol. If another symbol is needed, we specify it either as a string literal or create a string variable with the desired name and pass it to the iOpen() function.
Thanks. I have read the help, but I haven't found an example of specifying another character. Thank you. I'd like to put your example directly into the help below.
Everything is almost ready, the code is partially there, the idea of how to do it is there, but on the implementation of the mind is not enough, help me
Hey, everybody. Help. I have written a function to calculate the profit of closed orders. It does not work in the tester. Please tell me what the problem is and where to look.
Hi. Where does the Magic variable get its value? Is it global?
Of course it is. It's in external variables.
Hey, everybody. Help. I have written a function to calculate the profit of closed orders. It does not work in the tester. Please tell me what the problem is and where to look.
You have it all wrong, besides, an order cannot be closed/open, it can be set/deleted.
A position can be closed.