Step trailing stop
FREE
Publicado:
1 setembro 2022
Versão atual:
1.4
Não encontrou o robô certo? Encomende um para você
no serviço Freelance.
Ir para o Freelance
no serviço Freelance.
Como comprar um robô de negociação ou indicador?
Execute seu EA na
hospedagem virtual
hospedagem virtual
Teste indicadores/robôs de negociação antes de comprá-los
Quer ganhar dinheiro no Mercado?
Como apresentar um produto para o consumidor final?
Você está perdendo oportunidades de negociação:
- Aplicativos de negociação gratuitos
- 8 000+ sinais para cópia
- Notícias econômicas para análise dos mercados financeiros
Registro
Login
Você concorda com a política do site e com os termos de uso
Se você não tem uma conta, por favor registre-se

Utility not work in strategy tester
Utility not work in strategy tester
Hello! Of course, it does not work, because positions need to be opened manually, and the strategy tester does not allow you to do this, unfortunately.
In the process of writing the code, I created buttons that allowed opening positions in the tester for debugging the utility, but I considered that they would be superfluous in real trading, since such functionality is present in the MetaTrader 5 terminal.
I don't even know how to be. Maybe you can attach the file separately, here on the "Discussion" tab? I'll try.
I made the lot size 0.01, it is not important for testing.
I hope the utility will be useful.
hello sir, can this utility be used in one chart or do i have to attach every pair i when opening positions?
Hello.
I didn't understand what pair i was talking about.
If you mean is it possible to open several positions on one chart, then of course you can.
There must be only one currency pair.
Описание торговой панели «eInTradePanel», с добавленным к ней «Trailing Stop»
Рис. 1. Элементы сигнализации и отображения/скрытия торговой панели
Рис. 2. Элементы управления торговой панели
Панель может использоваться в двух режимах: режим 1 (рис. 2) - открытие рыночной позиции со «Stop Loss»/«Take Profit» указанными в пунктах. Режим 2 (рис. 3 и 4) - открытие/установка любого типа ордера со «Stop Loss»/«Take Profit» и уровнями открытия, определяемыми положением горизонтальных линий. Если все кнопки выбора типа ордера отжаты, панель работает в режиме 1.
При нажатии на любую из кнопок выбора типа ордера вместо кнопок «Sell» и «Buy» появляется одна кнопка, соответствующая типу выбранного ордера и на графике появляются линии для определения уровней этого ордера, линии можно перемещать мышкой.
Рис. 3. Торговая панель в режиме 2 (выбран ордер «Buy Stop Limit»)
Рис. 4. Торговая панель в режиме 2 (выбран ордер «Sell Stop Limit»)
Линии
Поле ввода объема позиции
Позиция 5 на рис. 2. Если щелкнуть на надписи "lot" в поле будет установлено значение минимального лота символа, на котором работает торговая панель. Если же есть открытая позиция, будет установлен объем открытой позиции, что позволит выполнить открытие встречной позиции с равноценным объёмом.
Поля ввода «Stop Loss», «Take Profit», «Trailing Stop» и «Trailing Step»
Позиции 6 и 7 на рис. 2. При работе в режиме 1 в эти поля вручную вводятся значения «Stop Loss» и «Take Profit», в пунктах. При нулевых значениях позиция будет открываться без «Stop Loss»/«Take Profit». Если щелкнуть на надписи «sl» или «tp», автоматически будет установлено минимально-возможное значение «Stop Loss»/«Take Profit». Значение в этих полях непрерывно контролируется, при изменении рыночных условий, если значения в этих полях оказываются недопустимыми, они отмечаются красным цветом, так же выполняется проверка значений после вводу вручную (рис. 5).
Рис. 5. Недопустимые «Stop Loss» и «Trailing Stop»
В режиме 2 в полях "sl" и "tp" отображаются значения «Stop Loss»/«Take Profit», в пунктах, соответствующее положению линий «Stop Loss» и «Take Profit».
Аналогично полю «sl» («Stop Loss»), работает поле ввода/отображения «tstop» («Trailing Stop»). «Trailing Stop» автоматически включается в работу, когда его значение больше ноля. При нулевом значении он выключен.
Поле ввода/отображения шага перемещения «Trailing Stop» – «tstep» («Trailing Step»), может изменяться начиная с нулевого значения. При нулевом значении, «Trailing Stop» будет двигаться синхронно с движением цены.
Последние значения объема ордера, «Stop Loss», «Take Profit», «Trailing Stop» и «Trailing Step» сохраняются при завершении работы терминала и будут установлены при новом запуске терминала. Последние значения сохраняются отдельно для каждого символа на которых используется торговая панель.
Перемещение панели
Панель можно перемещать по графику. Для перемещения панели необходимо выделить прямоугольник, на котором расположены элементы управления (дважды щелкнуть на левом верхнем углу прямоугольника или в любом свободном месте прямоугольника). При выделении прямоугольника все элементы управления исчезнут (рис. 6.), после перемещения вновь появятся. Если нужно вновь отобразить элементы управления не перемещая прямоугольник, нужно дважды щелкнуть в любом месте графика.
Рис. 6. Перемещение панели
Позиция панели сохраняется для каждого графика и после перезапуска терминала.
Прочие функции
«Stop Loss»/«Take Profit» можно вводить не только в пунктах. Если в поле "sl" или "tp" после ввода числа ввести букву "s", то будет установлено значение в указанном количестве спредов. Можно просто ввести "s" и узнать величину спреда. Аналогично с буквой "m", в этом случае значение будет рассчитано в соответствии с указанным количеством минимальных стоп-уровней.
Если ввести букву "t", откроется окно сообщения со временем, прошедшим с начала текущего четырехчасового бара. Аналогично можно узнать время, прошедшее от начала бара других тайм-фреймов, всего возможны такие команды: "t2", "t3", "t4", "t6", "t8", "t12" - что соответствует тайм-фреймам H2, H3, H4, H6, H8, H12. Если ввести букву "d", можно узнать текущую дату и день недели.
Description of the trading panel "eInTradePanel", with "Trailing Stop" added to it
Fig. 1. Elements of signaling and displaying/hiding the trading panel
Fig. 2. Trading panel controls
The panel can be used in two modes: mode 1 (Fig. 2) - opening a market position with "Stop Loss"/"Take Profit" specified in points. Mode 2 (Fig. 3 and 4) - opening / placing any type of order with "Stop Loss" / "Take Profit" and opening levels determined by the position of horizontal lines. If all buttons for selecting the type of order are released, the panel works in mode 1.
When you click on any of the buttons for selecting the type of order, instead of the "Sell" and "Buy" buttons, one button appears corresponding to the type of the selected order and lines appear on the chart to determine the levels of this order, the lines can be moved with the mouse.
Fig. 3. Trading panel in mode 2 (order "Buy Stop Limit" selected)
Fig. 4. Trading panel in mode 2 (order "Sell Stop Limit" selected)
Lines
Position volume entry field
Position 5 in fig. 2. If you click on the inscription "lot", the value of the minimum lot of the symbol on which the trading panel works will be set in the field. If there is an open position, the volume of the open position will be set, which will allow opening an opposite position with an equivalent volume.
Input fields "Stop Loss", "Take Profit", "Trailing Stop" and "Trailing Step"
Positions 6 and 7 in fig. 2. When working in mode 1, these fields are manually entered values "Stop Loss" and "Take Profit", in points. If the values are zero, the position will be opened without "Stop Loss"/"Take Profit". If you click on the inscription "sl" or "tp", the minimum possible value "Stop Loss" / "Take Profit" will be automatically set. The value in these fields is continuously monitored, when market conditions change, if the values in these fields turn out to be invalid, they are marked in red, the values are also checked after entering manually (Fig. 5).
Fig. 5. Invalid "Stop Loss" and "Trailing Stop"
In mode 2, the "sl" and "tp" fields display the "Stop Loss"/"Take Profit" values, in points, corresponding to the position of the "Stop Loss" and "Take Profit" lines.
Similar to the "sl" ("Stop Loss") field, the "tstop" ("Trailing Stop") input/display field works. "Trailing Stop" is automatically enabled when its value is greater than zero. When set to zero, it is disabled.
The field for input/display of the travel step "Trailing Stop" – "tstep" ("Trailing Step"), can be changed starting from zero value. If set to zero, "Trailing Stop" will move in sync with the price movement.
The last values of the order volume, "Stop Loss", "Take Profit", "Trailing Stop" and "Trailing Step" are saved when the terminal is closed and will be set when the terminal is restarted. The latest values are saved separately for each symbol on which the trading panel is used.
Moving the panel
The panel can be moved around the chart. To move the panel, you need to select the rectangle on which the controls are located (double-click on the upper left corner of the rectangle or in any free place of the rectangle). When a rectangle is selected, all controls will disappear (Fig. 6.), after moving they will reappear. If you want to re-display the controls without moving the rectangle, double-click anywhere in the graph.
Fig. 6 (see below) . Moving the panel
The position of the panel is saved for each chart even after restarting the terminal.
Other functions
"Stop Loss"/"Take Profit" can be entered not only in points. If you enter the letter "s" in the "sl" or "tp" field after entering the number, the value will be set to the specified number of spreads. You can simply enter "s" and find out the spread. Similarly with the letter "m", in this case the value will be calculated according to the specified number of minimum stop levels.
Entering the letter "t" will open a message box with the time elapsed since the start of the current four-hour bar. Similarly, you can find out the time elapsed from the beginning of the bar of other timeframes, the following commands are possible: "t2", "t3", "t4", "t6", "t8", "t12" - which corresponds to H2 timeframes, H3, H4, H6, H8, H12. If you enter the letter "d", you can get the current date and day of the week.
Bom dia, Excelente seu Utilitário, obrigado por deixa-lo gratuito, mas para ficar nota "100" vc deveria deixa-lo "Virtual" tanto o Stop Loss, o Stop Gain, ou o Traling Stop e também, deixar as linhas deslizar para podermos colocar o preço que achamos justo, sem ter que ir no painel para colocar o valor, igual ocorre com o do próprio Meta Trader e se o próprio Utilitário também for "Virtual" ai ficaria "Fantástico" como ocorre com as linhas de tendência do Meta Trader
Olá.
Vou ver o que posso fazer.