Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 870
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
Good present!
is ret_code a local variable or aglobal variable ?isret_code reset after a terminal restart?
There can be as many magicians as you like, each condition is different.
Good present!
is ret_code a local variable or aglobal variable ?isret_code reset after a terminal restart?
They are all reset after restart, only terminal GPs (those GlobalVariable) retain their values. And ret_code is global only within code, i.e. visibility from any line and initialization only on startup.
I probably haven't got to the bottom of it somewhere else. All the examples I've found with the magician do not fit my strategy.
... ...a magik that matches the condition...
i.e. I can enter any number of magik (including 1, 2 and 3) in the open command and then the same number in the close command?
So I don't understand the magician at all... Why is it then called a magician? I thought it was an order number assigned automatically on opening.
Can you explain the magician to me? Is it really clear to all beginners if I am the only one who is such an idiot?
And what is worse than identifying the order with a ticket?
i.e. I can enter any number of magik (including 1, 2 and 3) in the open command and then the same number in the close command?
So I don't understand the magician at all... Why is it then called a magician? I thought it was an order number assigned automatically on opening.
Can you explain the magician to me? Is it really clear to all beginners but only to me?
And what is worse than identifying the order with a ticket?
i.e. I can enter any number of magik (including 1, 2 and 3) in the open command and then the same number in the close command?
So I don't understand the magician at all... Why is it then called a magician? I thought it was an order number assigned automatically on opening.
Can you explain the magician to me? Is it really clear to all beginners if I am the only one who is such an idiot?
And what is worse than identifying an order with a ticket?
What you are thinking of is a ticket - an order identification number. It is unique for each order and is not repeated. A magik is a user identifier that can be used to "flag" any order. These magics can be the same for every order of a certain program or can be different in one program. For example: You have an EA that is displaying a flat and a trend. For a flat we will use a strategy with magic number 123 and for a trend we will use a strategy with magic number 124. By these magicians the EA will be able to find out which strategy the selected order belongs to and make a decision to do something with it at this very moment (that is exactly what I told you about). But the other advisors working at your account must have any magicians except 123 and 124 in order not to allow the other advisor to touch orders "alien" to it and work only with its own orders, for example, with magic number 125.
And yes, you may use any integer number - 1, 2, 3 or 100500 ... as long as the wizard does not duplicate the wizard of another EA working on the same account. The wizard can be zero in the EA, but in this case the EA will consider as its own those orders that you opened manually.
r772ra andartmedia70, thanks for the clarification.
My understanding is that magic is needed mainly when a trader uses several EAs, with several open orders, on several currency pairs, accounts, etc. (right?)
I do not think so, and if I think that my Expert Advisor will work in profit, it will be enough for me. I am still developing it for one pair, one account at one brokerage company and only one order should be open and a magician (or any other identifier for an open position) is needed so that it would be closed only upon the occurence of certain conditions for this very order and other conditions which are valid for closing other orders (which may be open only after the closure of this order) would not be valid for this order.
For example, an order may be open when conditions (a+b+c+d+d) or (a+d+e) or (f+c+i+c) appear and, depending on the conditions on which the BAY is open, it should close according to its own conditions:(a+b+c+d) by (f+j+l),(a+d+e) by (h+l+m+n),(g+z+i+k) by (p+r+c+t) .
It seems to me that the order loop is not needed here either. There has to be some simple solution that does not take much space. I stated my vision above, but haven't got to analysis yet, and besides logical errors I must have syntax errors (there may be brackets missing or wrong variable set, etc.).
Don't consider it a problem, please help. I'm stuck without it. Thanks
Below is the finalized version.