Errors, bugs, questions - page 219

 

Hello, I can't perform a basic operation - change stop loss on an order with a position still open (transfer to lossless). I thought the search would give me a result, but it didn't.

Request is a global variable, a position is opened with it and then I want to move the stop loss

bool UpdateOrderSL(double sl) {
   request.order = P_order;
   request.action = TRADE_ACTION_MODIFY;
   request.sl = sl;
   OrderSend(request, result);
   if(result.retcode==10009 || result.retcode==10008) {
      Alert("Перенос SL");
      return true;
   } else {
      Alert("Запрос на изменение ордера не выполнен - код ошибки: ",GetLastError());
      return false;
   }

} 


Result

2010.12.05 13:23:18 Core 1 2007.12.04 20:00:00   Запрос на изменение ордера не выполнен - код ошибки: 4756
2010.12.05 13:23:18 Core 1 2007.12.04 20:00:00   failed modify order #8 buy 0.00 EURUSD at 0.00000 sl: 0.00000 tp: 0.00000 -> 1.46771, sl: 1.46771 tp: 1.47794 [Invalid request]

2010.12.05 13:23:18 Core 1 2007.12.04 12:00:00   Ордер Buy успешно помещен, тикет ордера #8


Why? The structure is filled with correct data, I change data I need to, but this is the result?

Документация по MQL5: Основы языка / Переменные / Глобальные переменные
Документация по MQL5: Основы языка / Переменные / Глобальные переменные
  • www.mql5.com
Основы языка / Переменные / Глобальные переменные - Документация по MQL5
 

Ais:

How about clicking here ?

On the column name.

From the screenshot you can see that the mouse was clicked on the adjacent column called "Profit". "About clicking the mouse" again makes no sense.
 
SergiusD:

result

2010.12.05 13:23:18 Core 1 2007.12.04 20:00:00   Запрос на изменение ордера не выполнен - код ошибки: 4756
2010.12.05 13:23:18 Core 1 2007.12.04 20:00:00   failed modify order #8 buy 0.00 EURUSD at 0.00000 sl: 0.00000 tp: 0.00000 -> 1.46771, sl: 1.46771 tp: 1.47794 [Invalid request]

2010.12.05 13:23:18 Core 1 2007.12.04 12:00:00   Ордер Buy успешно помещен, тикет ордера #8


Why? The structure is filled with the correct data, I change the data in it, but this is the result?

From the error code and the line "1.46771, sl: 1.46771 tp: 1.47794" it follows that the error may be in the coincidence of the first two values. The volume is zero, etc.
 
Yedelkin:
From the error code and the line "1.46771, sl: 1.46771 tp: 1.47794" it follows that the error could be in the coincidence of the first two values. The volume is zero, etc.

my bad, I didn't read the documentation, I should use TRADE_ACTION_SLTP to change levels....

 
Yedelkin:

Ais:

How about clicking here ?

At the name of the column.

From the screenshot, it can be seen that a mouse click was made on the adjacent column called "Profit". "About clicking the mouse" again doesn't make sense.

Not "again" but exactly the column indicated by the arrow, because:

Urain:
Yedelkin:
Where exactly do you click? On the column name or on the result of the calculation?
When you click on a column, all data is sorted in ascending order of this column, so that the pass that is somewhere down but close to the result is sorted next to it.

Note that the dot plot shows the data of the exact column you are asked to "click" on.

Hint: See "Balance max" scale values.

 
Ais:

It does, because:

Let's not argue about nonsense. The only difference between the two neighbouring columns is that "Result" = "Profit" + "Starting balance". Therefore it does not make sense to click again on the "Result" column, if the data in the table is already sorted by clicking on "Profit". The curious researcher will not get any new information by clicking again.

Hint: The "Start Balance" is fixed and will not change during the calculations.

 

As the vertical scale in the dot plot shows the data in the "Result" column, then:

1. the indicated table must be sorted by the same "Result" column;

2. the specified value must be in the middle of the table window so that both smaller and larger values can be seen at the same time.

Only if these conditions are met can conclusions be drawn.

 

Yes, yes, yes. And since on the dot plot the horizontal scale reflects the data of the "Pass" column, the said table also has to be sorted by the same "Pass" column :) From the series: "Click away!" :)

 

See:

sultanm:

Weird. This is the third time. There are two points on the graph that are close in value, but one in the results.

These are points close to the "Balance max" scale value representing the "Result" column data, not the "Pass" column, so the sorting must be by the "Result" column.

Hint, see points circled in red rectangles:

 
Ais:

We are talking about points close to the "Balance max" scale, which represents the "Result" column data, not the "Pass" column, so the sorting should be by the "Result" column

Of course :) Probably because of the circled hints "the specified value mustbe in the middle of the table window so that both smaller and larger values are visible at the same time" :)

sultanm, for fun, click on the table again (this time the "Results" column) to convince your colleague that the data is identical.

Reason: