Questions from Beginners MQL5 MT5 MetaTrader 5 - page 89

 

Unfortunately, I couldn't find a "step" setting for either the trailing or the lot

 
oldiol:

Unfortunately, I couldn't find a "step" setting for either trailing or lot

How do you need a lot for trailing stoploss?
 
oldiol: Unfortunately, I couldn't find a "step" setting for either trailing or lot
Oh, so I meant making changes to the existing code of your program. It turns out that your program is built using the"MQL5 Wizard" application. I can't help you here, because I've never played with this builder, and I'm not familiar with its program structure.
Мастер MQL5: Создание эксперта без программирования
Мастер MQL5: Создание эксперта без программирования
  • 2010.12.15
  • MetaQuotes Software Corp.
  • www.mql5.com
Вы хотите быстро проверить торговую идею, не тратя времени на программирование? Выберите в "Мастере MQL5" нужный тип торговых сигналов, подключите модули сопровождения позиций и управления капиталом - на этом вся работа закончена. Создайте свои реализации модулей или закажите их через сервис "Работа" - и комбинируйте новые модули с уже существующими.
 

sergeev:
а лот в трейлинге стоплоса каким боком нужен? 

A lot is needed in money management

 
Please advise how to close position (e.g. buy EURUSD 0.7 lot)? Through OrderSend() with opposite type of sell and volume 0.7 or is there a better option?
 
WindSW: Please, advise how to close position (e.g. buy EURUSD 0.7 lot). Is it via OrderSend() with the opposite type of sell and volume 0.7 or are there more correct variants?

Yes, opposite orders with a total volume equal to the volume of the position to be closed.

There is also CTrade trade class from the Standard Library. There is a position closing method there. But the principle is the same.

 
Yedelkin:

Yes, opposite orders with a total volume equal to the volume of the position to be closed.

There is also CTrade trade class from the Standard Library. There is a position closing method there. But the operating principle is the same.

What should OrderSend() look like? More precisely, what parameters should be entered in the request, the same as when opening a position, except for sl and tp?
 
WindSW:
And what should OrderSend() look like? More precisely, what parameters should be entered into the request, the same as when opening a position, except for sl and tp?

Is the mother of laziness in your life?

https://www.mql5.com/ru/docs/constants/structures/mqltraderequest

Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса
Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса
  • www.mql5.com
Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса - Документация по MQL5
 
sergeev:

Is the mother of laziness in your life?

https://www.mql5.com/ru/docs/constants/structures/mqltraderequest

Not at all, I've seen it, but it doesn't say anything about the composition of the request when closing. It lists all the options except closing. That's why I'm asking.
 
WindSW: it does not say anything about the composition of the request when closing. It lists all the options except closing. That's why I'm asking.
There are mandatory fields for each type of trade request. They must be filled in. "Opening a position" or "Closing a position" are just the result of a specific trade request, the rules for filling them are the same. I.e. take your working variant of the "open" request and change the order type. Fill in the unnecessary mandatory fields with zeros.