[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 19
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
And if I write it as a global variable, should I assign a value directly there?
In these, all the more so because they don't reset to the desired 0 after deinit().
it's better to initialize them in init().
I have to change the ideology of the program. when the middleSL is sent to stoploss, it is normalized, i.e. rounded to a certain sign, when divided by 2 it will happen so, it is inevitable.
I slightly complicated the code, for the entire transaction from opening to closing only 3 times gave an error, now in real time I will look at the conditions under which they occur, they basically do not bother me, everything works like clockwork, but I'm afraid that the server will banish when I go to a real account
and if I write it as a global variable, should I assign the value directly there?
You can, but it makes no sense, because it won't be the same as a normal variable. When you drag the svetnik onto the chart, a window will pop up, go to the next tab "Input parameters" and specify the required values, and the svetnik will memorise them
If you want the value to be constant for each cycle of the EA, just enter this immediately after the start, e.g.
please tell me, or i'm about to burst!!!
can an EA delete pending orders because it has insufficient funds?
please tell me, or i'm going to burst now!!!
can an EA delete pending orders because it does not have enough funds?
if you require it to check the balance and close the order in case of insufficiency, then yes, otherwise it will issue an error or something else, and maybe it will close, but it is always better to provide all options and prescribe it in the code
"ERR_NOT_ENOUGH_MONEY 134 Not enough money to execute a transaction" it can give out this, but will the order be deleted or will it hang around I don't know
I made the code a bit more complicated, for the whole transaction from opening to closing it only gave out 3 errors, now in real time I will look at the conditions under which they occur, they do not bother me in principle, everything works like clockwork, but I am afraid that the server will ban when I go to a real account
If you require it to check the balance and close the order when there is a deficit, then yes, otherwise it will give an error or something else, or maybe it will close it, but it is always better to consider all options and prescribe it in the code.
The thing is, I don't really need it, but my orders get deleted in a weird way, I'm looking for an error the whole evening.
i'm sure it's a large lot and not enough free money, or many orders have already been opened (if you let it open more than one).
If you are working in a tester or on a demo, try increasing the amount of money and setting a minimum lot
please tell me, or i'm going to burst now!!!
can an EA delete pending orders because it has insufficient funds?
yes ! take a look at the log.
more than sure that too big a lot is set and he does not have enough free money, or a lot is already open (if you allow him to open more than one order)
if you are working in a tester or demo, try to increase the amount of money and put the minimum lot