Hi, could you please tell me how to close all open orders at once, e.g. BAY or SELL, i.e. order type. How to close all open orders at once e.g. BAY or SELL, i.e. by order type. I cannot find a way to write this code. What should be the code?
I would like to thank you in advance!
Afternoon.
Just be honest: did you read the tutorial here or search for it yourself?
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.
Then it would be a good idea to change the wording of the question and attach the EA code. Maybe someone will correct it
i think it's clear what i need. i need the lots to increase when i open to one side
where to get it?
Write
Hi, could you please tell me how to close all open orders at once, e.g. BAY or SELL, i.e. order type. How to close all open orders at once e.g. BAY or SELL, i.e. by order type. I cannot find a way to write this code. What should be the code?
I would like to thank you in advance!
Afternoon.
Just be honest: did you read the tutorial here or search for it yourself?
I think it's clear what I need. for the lots to increase when opening to one side
Afternoon.
Be honest: have you read the textbook here or looked it up yourself?
where do we get it?
extern double LotFactor = 1;
SendOrder(0,lot,Ask,1,stop.loss,take.profit.0);
lt=NormalizeDouble(buy.last.lot+LotFactor,DG);
SendOrder(0,lot,buy.last-step[buy]*Pp,1,stop.loss,0);
extern double Lot = 0.01;
extern double LotFactor = 1;
SendOrder(0,lot,Ask,1,stop.loss,take.profit.0);
lt=NormalizeDouble(buy.last.lot+LotFactor,DG);
SendOrder(0,lot,buy.last-step[buy]*Pp,1,stop.loss)
this is a piece from my martingale
I've tried that, well if there's no easier way, I'll try it again. It also needs to include other include files from this tutorial
Bingo. To hell with textbooks... :-) The fifth function on this page: ClosePositions().
Google search rules.
Bingo. To hell with textbooks... :-) The fifth function on this page: ClosePositions().
Google search rules.
Thank you very much Roman!
Do you know how to use functions? :-)