[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 292

 
Is there an EA that does not trade but just multiplies lots? (I mean martingale without trading) and I'll use another one to trade... Please give me a hint if there is one.
 

Good time all!

Please advise! I wrote a zigzag type indicator, it has three buffers which draw three lines. How can I get information from the desired buffer?

 

In principle, I understand the problem when it comes to

BuyTakeLotA

all the other queries are also checked,

and it turns out that

BuystopLotA

is the last one in the history and it matches the query,

NOW HOW TO MAKE IT CHECK THE LAST CLOSED BY TIME INSTEAD OF THE LAST ONE FROM THE HISTORY, WHICH FITS THE CONDITION.

 
Hi all, could you please tell me if it would be reliable to determine the order setting time by its order number in the list? (older ones have a lower number) or would it be better to use the order's setting time for this?
 
Pyro:
Hi all, could you please tell me if it would be reliable to determine the deadline for an order by its order number in the list? (older ones have a lower number) or would it be better to use the time the order was set for?

is the difference between pending and open orders principal?

if not, you can do it by order number (you can do a lot of things through "ass").

If yes, then no.
 

Good afternoon!

Dear Professionals, please help me.

I want to compare the opening price of current time with the opening price of the day.

int Cur_Hour = Hour(); // Server time in hours
double Cur_Min = Minute(); // Server time in minutes
double Cur_time = Cur_Hour + Cur_Min/100; // Current time

But I don't know how to pull the opening price of the day and the opening price of the current bar into the program. Please advise how to do it?

I would be very grateful.

 
Boneshapper:

Good afternoon!

Dear Professionals, please help me.

I want to compare the opening price of the current time with the opening price of the day.

int Cur_Hour = Hour(); // Server time in hours
double Cur_Min = Minute(); // Server time in minutes
double Cur_time = Cur_Hour + Cur_Min/100; // Current time

I do not know how to compare the opening price of the day with the opening price of the current bar. Please advise how to do it?

I would be very grateful to


current bar open price -- iOpen(Symbol(),Period(),0)

The open price of current day -- iOpen(Symbol(),PERIOD_D1,0)

Link to documentation https://docs.mql4.com/ru/series/iOpen

 
abolk:

is the distinction between pending and open orders fundamental?

if not, you can do it by order number (you can do a lot of things through "ass").

If yes, then no.


The difference does not matter, since the operation will be conducted only between pending orders. I.e., if there is an open position somewhere, it is not principal. It's just a question of reliability.

 

Help solve the problem, how to build a query so that the value is taken from the last closed instead of the last one in the history with the same values, the problem is opening a wrong order it is highlighted in red, then after it all is opened correctly

Time Type Order Volume Price S / L T / P Profit Balance
1 2011.03.28 00:00 buy 1 1.00 1.4048 1.4028 1.4058
2 2011.03.28 00:00 sell 2 1.00 1.4046 0.0000 0.0000
3 2011.03.28 00:36 s/l 1 1.00 1.4028 1.4028 1.4058 -200.00 9800.00
4 2011.03.28 00:36 sell 3 2.00 1.4028 1.4068 1.4008
5 2011.03.28 04:44 s/l 3 2.00 1.4068 1.4068 1.4008 -800.00 9000.00
6 2011.03.28 04:44 buy 4 3.00 1.4068 1.3668 1.4108
7 2011.03.28 16:34 t/p 4 3.00 1.4108 1.3668 1.4108 1200.00 10200.00
8 2011.03.28 16:34 sell 5 2.00 1.4109 1.4149 1.4089
9 2011.03.28 16:34 buy 6 1.00 1.4111 1.4091 1.4121

here is the advisor

Files:
test_07_2.mq4  18 kb
 
Reposted.

Invest777 31.03.2011 15:16



Can you advise whether the :

bool ObjectCreate(      
string name, int type, int window, datetime time1, double price1, datetime time2=0, double price2=0, datetime time3=0, double price3=0)

int window value, works only with the current chart on which the expert works, but if I want to create an object for GBPUSD, what should I set the window parameter?

sergeev 31.03.2011 16:3

synchronize windows look in the codebase