Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 400
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
Thank you, Yuri.
I will try to use your code, but later, as I need to take it apart and understand the principle of operation.
Above described step is not difficult, then I will have to take apart each custom function of Mr. "N", and this has the highest degree of complexity, respectively, will take a lot of time, from 3 to 10 hours (as they say: - One day. -).
I'll finalise my code, it's "my habitat" and there's nothing to study in it.
Thanks again, Yuri.
Good afternoon!
Could you please tell me, does the AccountEquity() function make a request to the terminal or to the broker?
The question is prompted by the assumption that calling this function on every tick may irritate the broker (especially when running the EA on several charts at the same time) and consequently block the account?
Good afternoon!
Can you tell me, does the AccountEquity() function make a request to the terminal or to the broker?
The question is caused by the assumption that calling this function on every tick may irritate the broker (especially when running the EA on several charts simultaneously) and consequently block the account?
Yes to the broker of course)))
The terminal doesn't care.... Will give you the last known data...
The question is whether we should pass Magic into the functionor not.
This can be understood if you know what the wizard is for. It is needed for the EA to be able to distinguish its own orders from the orders of another EA or manually opened orders. If you have several buy-stop orders and there are various magicians or manual orders (without a magician) among them, the magician is needed for the function. In general, it would be better to set a magik as a parameter for a function to universalize its functions. For instance, it should be set to -1 by default.
Actually, since your function's code determines the setting price of the first buy-stop order in the loop only, the loop itself is not needed in principle.
It is not necessary to go into the code of each function to begin with. It is enough to understand the parameters that are used in the function, its purpose and use. I did not actually go into the innards of each function myself. I delved into it only when I had to change it in some way. I believe that you successfully use mobile phones, computers and televisions, without knowing their exact schemes and how they work, but that doesn't stop you from using them for your own purposes. In this case, the main thing is to know how to use these functions. All the functions and their functions are described here . You will learn how to use them from the tests, which are given for each function. You will become a programmer faster if you follow this path. But reinventing your own bicycle is a long and unproductive path. Building an expert - according to your version - is like building a house with no building materials. You have to invent everything yourself. It is much faster to build a house when there are building blocks (functions).
You are a wise man, able to explain and change your mind if need be. :)
That said, I thank you again.
In that case, I leave the construction of a house from eukaryotic cell organoids and use ordinary building materials for its construction.
Please check two functions for errors in them.
The essence of the first: should calculate a lot required to exit the drawdown after closing a grid of orders (open on margin), if the price passes a certain number of points (TP-points) in the right direction.
The essence of the second: it should close half of the orders of the grid, starting with the oldest.
Can you tell me, does AccountEquity() query the terminal or the broker?
I may not be asking exactly, I mean will the function see a magik which is set in a global variable
or should it be passed into a function, although I suspect it shouldn't since it's global
I may not have asked exactly what I meant, I mean, will the function see a magik that is set in a global variable
of course it will.
Global variables are global because they are globally visible.
what's not clear?
----
but following the good manners - pass all the parameters into the function which will make it more independent of the calling environment.
The reason for this is to abstract the names of the variables inside the function from the global variable names.