Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 267

 
STARIJ:

What's the profit? And also this piece with the empty function can be thrown away. Try it...

And how many times does this action increase the profit?:))))

 
Alexey Viktorov: And how many times does this action increase the profits?:))))

Measuring. Expect a lot. Reply in person

 
Afternoon. How can I view several closed orders for the number of losing trades before the first profit trade and how much was the total loss on the losing trades ?
 
Lowech:
Afternoon. How to view several closed orders for the number of losing trades before the first opening and how much was the loss on the losing trades in total ?

Do you want to do this programmatically?

 
STARIJ:

What is the profit? And also this piece with empty function can be discarded. Try it...


Profit 300 pips set. Thanks a lot I will do...... One more question, you must have heard about the trading system "Bourjouille" ..... I want to automate it. If I have any questions, I will be able to ask?

 

Citizens, help me implement this!!!


If I open the first order at 1.20050 with Stop loss 1.20060, then the second order at 1.20030 with Stop loss 1.20040 and the second order too TP has changed on 1.20040 to 1.20060 and if I open the third order, then the second and third TP have changed as the first one....


I heard that the similar scheme of work is at the adviser of Ilana....


Help...

 
sviter-pro: Citizens, help me implement such a thing!!!

Has opened the first order on buy at the price of 1.20050 with ТР 1.20060, then opened the second order at the price of 1.20030 with ТР 1.20040 and that the second order too ТР has changed on with 1.20040 on 1.20060 and if the third order has opened that at the second and third ТР has exchanged as at the first.... I heard that the similar scheme of work is at adviser Ilana....

It makes sense to write another simple EA and put it on another chart. It will find the best TP among open orders and set it for the others. Stages of development: 1) At every tick the EA will give an alert on the number of open orders of one direction. 2) .... TP of all orders of one direction 3) . Best TP 4) Modification

 
LRA:

do you want to do it programmatically?

Yes, can you tell me which functions to use?

 
Lowech: Look through several closed orders for the amount of losing trades before the first profit and how much loss on unprofitable trades totaled ?

First of all, we need to know the number of available orders. We write a script:

//+-------------------------------------------------------+
//| Проверка ордеров                           PRVERKA.mq4|
//+-------------------------------------------------------+
#property strict
void OnStart()
{
// количество закрытых и удаленных ордеров в истории, загруженной в терминале.
   Alert("Всего ордеров в истории:  ", OrdersHistoryTotal());  
}

Throw the script on any chart, remember the result. It depends on the terminal settings. We select the Account History tab, right-click and select a period. We should check that, depending on the period selected - Today, Last 3 days, ..., The whole history - the number of orders will be different. Adjust the history as needed.

Next. The program can be simple and working - if you need to view it once, or more complex and guaranteed to work. The thing is that the orders in the history are sorted out by time. But there is no guarantee of that. A simple version would be something like

void OnStart()
{
  int Номер=OrdersHistoryTotal()-1;

  for( ; Номер>=0; Номер--)
  {
    if(!OrderSelect(Номер, SELECT_BY_POS, MODE_HISTORY)) continue;
    Alert(Номер, "  Тикет = ", OrderTicket(),"  T =",OrderOpenTime()  /* или OrderCloseTime */, "  Профит = ", OrderProfit());
  ..........
  }
......
}
Настройки платформы - Начало работы - Справка по MetaTrader 5
Настройки платформы - Начало работы - Справка по MetaTrader 5
  • www.metatrader5.com
Торговая платформа обладает множеством настроек, что позволяет организовать работу в ней так, как это удобно именно вам. Выполните команду...
 
STARIJ:

First of all, we need to know the number of available orders. We write a script:

Throw the script on any chart, remember the result. It depends on the terminal settings. We select the Account History tab, right-click and select a period. We should check that, depending on the period selected - Today, Last 3 days, ..., The whole history - the number of orders will be different. Adjust the history as required.

Further. This program can be simple and working - if you need to check it once, or more complex and guaranteed to work. The matter is that orders in the history are sorted out by time. But there is no guarantee of that. A simple version would be something like

Thanks a lot) and how can you sum up the loss of all last closed losing trades before 1 closed profitable order?
Reason: