[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 324

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
borilunad:
Here is a question: Sometimes it happens on Real that ERR_COMMON_ERROR comes out, when a position is closed by Stop Loss and the Expert Advisor tries to close it by Close, and since the function provides for 3 attempts to close it, it tries up to 3 times. How can I stop it from trying?
Perform OrderSelect and check the OrderCloseTime before trying to close. If it is already higher than 0, the order is closed.
before attempting to close, execute OrderSelect and check OrderCloseTime. If it is already greater than 0, the order is closed.
I have Select, and where should I place OrderCloseTime? After Select or in CloseOrder()?
Looked in Doc. I don't have History Select, only Trad. So I will try to put this History Select after the close condition and before CloseOrder(). Thank you!
Inside the selection, after filters for symbol and magik (if there are any), that is, we check the order for closing time, if it is not equal to zero (the order is closed), then we prohibit to close it again
Thank you! I'll try the one above then!
Here, tried to insert, ran it in the demo, but something comes out more errors and different. I'm asking first, from the stove, on this code from Doka:
What is superfluous here, to insert between Selecta Trades, symbol checks, magik... и ... order type. Maybe datetime cmt and int ticket to introduce at the start? And the printer writes other errors.
And add a closing condition:
Help please!
Hi, could you give me a hint?
I want to open an order not immediately with stp and sl, but set stp and sl after the order is opened by modifying it
I did so:
}
I don't know what the hell I'm doing.
right?
Hi, could you give me a hint?
I want to open an order not immediately with stp and sl, but set stp and sl after the order is opened by modifying it
I did so:
}
I don't know what the hell I'm doing.
right?
And I don't get it and more! Use the SRC to outline the code, see above?
Thank you! I'll try the above then!
Here, tried to insert, ran it in demo, but something comes out more errors and different. I'm asking first, from the stove, on this code from Doki:
What is superfluous here to insert between Selecta Trades, symbol checks, magik... и ... order type. Maybe datetime cmt and int ticket to introduce at the start? And the printer writes other errors.
And add a closing condition:
Please help!
Eh, as the saying goes: "learn the student" (c)
Delete (comment) what is not needed.
A piece of code which opens an order and sets stop loss and take profit
terminal generates the following errors: EURUSD,M30: OrderSend error 130
EURUSD,M30: invalid ticket for OrderModify function
EURUSD,M30: OrderModify error 4051
EURUSD,M30: OrderSend failed with error #4051 bid:1.23674000 ask:1.23683000 Open:1.23674000 SL:1.2423 TP:1.2283 MODE_STOPLEVEL:0.00000000 LOT:0.01000000
What is the problem?