If instead ofOrderOpenPrice() I point 0.1 or OrderLots() there is an error: OrderClose error 138
What's the problem?
Judging by the documentation, it's very hard to write a much wackier close.
boolOrderClose(
int ticket, // номер ордераdouble lots, // количество лотовdouble price, // цена закрытияint slippage, // максимальное проскальзываниеcolor arrow_color // цвет
);
Instead of ticket written magik, instead of volume written open price. Read the documentation and feel free to look into it more often when writing code.
Greetings all! I'm a newbie, trying to create an EA. I wrote a simple one to see how it would work. When a signal appears, the alert does not work. I do not know what is the error. I do not know what exactly the error is.
Greetings all! I'm a newbie, trying to create an EA. I wrote a simple one to see how it would work. When a signal appears, the alert does not work. I do not know what is the error. I do not know what exactly the error is.
I have compiled the Expert Advisor and I am using it on a minute chart. The cloud changes colour but the alert window does not open. Could it be a software error?
Hello everyone, here is the situation: I open an order with a certain TP and OD. but OD triggers and a second order opens at the OD price of the first order in the opposite direction (OD is equal to the number of pips lost on the first order). In the case of a secondary SL, the third order should be opened in the opposite direction to the second order with the price equal to the value of the second order (Stop loss). Question: How to make this cascade of opening these three orders?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
See SymbolSelect function.
Thank you!
Forum on trading, automated trading systems & strategy testing
Any questions for newbies on MQL4, help and discussion on algorithms and codes
labvic, 2018.03.12 14:43
Hi all, I am facing such a problem:
I open a trade without stoploss and takeprofit:
I want to close this order.
OrderClose(Magic,OrderOpenPrice(),Ask,0,Red);I get this error: OrderClose error 131
If instead ofOrderOpenPrice() I point 0.1 or OrderLots() there is an error: OrderClose error 138
What's the problem?
Judging by the documentation, it's very hard to write a much wackier close.
Instead of ticket written magik, instead of volume written open price. Read the documentation and feel free to look into it more often when writing code.Please advise how to shift the chart even more to the left programmatically.Thank you!
I need to disable autoscroll and offset (chart properties CHART_AUTOSCROLL and CHART_SHIFT respectively) and then use ChartNavigate().
Need to disable autoscroll and offset (chart properties CHART_AUTOSCROLL and CHART_SHIFT respectively) and then use ChartNavigate().
Thank you!
Greetings all! I'm a newbie, trying to create an EA. I wrote a simple one to see how it would work. When a signal appears, the alert does not work. I do not know what is the error. I do not know what exactly the error is.
Sincerely Andrei.
Greetings all! I'm a newbie, trying to create an EA. I wrote a simple one to see how it would work. When a signal appears, the alert does not work. I do not know what is the error. I do not know what exactly the error is.
Regards Andrew.
Is it working! Do you check it in the tester?
It's working! Do you check with a tester?
That's what I thought, for some reason.
No, I haven't figured out the tester yet.
I have compiled the Expert Advisor and I am using it on a minute chart. The cloud changes colour but the alert window does not open. Could it be a software error?
Thank you!