[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 159

 
Vinin:

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
 
bikrus13:

where to get it?

Write
 
anton777:

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?

 
bikrus13:

I think it's clear what I need. for the lots to increase when opening to one side
I'm going to post a piece of code now.
 
Roman.:


Afternoon.

Be honest: have you read the textbook here or looked it up yourself?

I tried that, well if there's no easier way, I'll try again. It also needs to include the other include files from this tutorial
 
bikrus13:

where do we get it?
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,0);

 
anton777:
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

 
anton777:
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.

 
Roman.:


Bingo. To hell with textbooks... :-) The fifth function on this page: ClosePositions().

Google search rules.

Thank you very much Roman!
 
anton777:
Thank you very much Roman!

Do you know how to use functions? :-)