Questions from Beginners MQL5 MT5 MetaTrader 5 - page 536

 
Vladimir Tkach:
is in mql5, and in mql4?
You can't do it in mql4.
 
Alexey Volchanskiy:
In quadruple, you cannot.
In quadruple, you can load a template with an indicator. But this is a Kostylich Kostylov crutch with very limited capabilities. Either read via iCustom and objects output the desired buffer values on a small section of history, visible at least.
 
Artyom Trishkin:
In the four it is possible to load a template with the indicator. But it is a Kostylich Kostylov with very limited possibilities. Either read via iCustom and output the required buffer values on a small part of history, visible at least.

That's true. But the question was specific. On the other hand, is it really necessary? The user may set it manually if he wants to track it visually and use iCustom in the Expert Advisor anyway. I have only had one client who has asked for the EA to load an indicator and for the EA to be able to manage indicator parameters on a chart. But this guy had an obvious bug.

The second one I have done through the global variables of the terminal and explained him that there is no way to place the indicator on the chart.

 
Alexey Volchanskiy:

That's true. But the question was specific. On the other hand, is it really necessary? The user may set it manually if he wants to track it visually and use iCustom in the Expert Advisor anyway. I have only had one client who has asked for the EA to load an indicator and for the EA to be able to manage indicator parameters on a chart. But this guy had an obvious bug.

The second one I have done through the global variables of the terminal, and about the placement of the indicator on the chart I have explained that it is impossible.

It is not necessary for the program and is harmful in some way. I see these two methods for the user's convenience. Maybe there are others, but I'm not interested in it just for the sake of interest.
 

Hello! Could you please tell me how to use this function? How do I use the "OrderClose()" function?

Can you tell me what my mistake is?

This is a primitive example! I just need to know how to write OrderClosr() correctly;

We open an order:

OBUY = OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,",1502,0,Green);

Close the order:

OrderClose(OBUY,0.1,Ask,3,Blue);

=================================================================

I also tried this example with a magic number:

Open order:

OBUY = OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,",1502,0,Green);

Close the order:

OrderClose(1502,0.1,Ask,3,Blue);

These two methods do not close the open order! Do not pay attention to ST and TP, I wrote a simple example.

 
joncharov:

Hello, Could you please tell me how to correctly use the Order function? How do I correctly use the "OrderClose()" function?

Can you tell me what my mistake is?

This is a primitive example! I just need to know how to write OrderClosr() correctly;

We open an order:

OBUY = OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,",1502,0,Green);

Close the order:

OrderClose(OBUY,0.1,Ask,3,Blue);

=================================================================

I also tried this example with a magic number:

Open order:

OBUY = OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,",1502,0,Green);

Close the order:

OrderClose(1502,0.1,Ask,3,Blue);

I cannot close the open order using these two methods! Do not pay attention to ST and TP, I wrote a simple example.

The first variant is correct, but we are missing various error checks by the trade server. While writing this, I found a mistake. The buy order should be closed by a bid.

Открываем ордер:

OBUY = OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,"",1502,0,Green);

Закрываем ордер:

OrderClose(OBUY,0.1,Bid,3,Blue);
 

Hi

Answer a couple of questions if you can

1-How to clear the log in which the data is written with the printf command

2-Working with stock data-how do I get the flow of trades for an instrument (not mine but all of them)

 
Nemoys:

Hi

Answer a couple of questions if you can

1-How to clear the log in which the data is written using the printf command

2-Working with stock data- how do i get a flow of trades for an instrument (not mine but all of them)

1. Right-click in the magazine and select "Clear".

2. 2. Click on "Clear" in the context menu.

 
Vitalii Ananev:

1. Right-click in the logbook and select "Clear" from the context menu that appears.

2. This one I don't know.

Vitalii Ananev:

1. Right-click in the Journal and then select "Clear" from the context menu that appears.

2. 2. I do not know this one.

The forum is calledforex experts, trading robots and advisers

I do not see the right click as a robot :)

Of course the question was how to clear the log from the code :)

The second question still stands

 
Nemoys:

So in your question I didn't see that you want to clear the log from the Expert Advisor.

You can't do it with MQL tools. If only by means of Win API. I didn't think about it, I didn't need it.

Reason: