Somente usuários que compraram ou alugaram o produto podem deixar comentários
Evgenii Zhivogliadov  
marcofi #:

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.

Arquivos anexados:
fransspin  
hello sir, can this utility be used in one chart or do i have to attach every pair i when opening positions?
Evgenii Zhivogliadov  
fransspin #:
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.

Evgenii Zhivogliadov  
Hello traders who use this utility.
After updating the "MetaTrader 5" terminal, the "Take Profit", "Stop Loss" and "Trailing Stop" parameters for positions opened by the standard functionality of the terminal are no longer set. In this regard, I am engaged in its alteration. Separate buttons "Buy" and "Sell" will be added to the utility, as well as an input field for determining the volume of a deal (lot).
_______________

Здравствуйте трейдеры, пользующиеся данной утилитой.

После обновления терминала "MetaTrader 5", перестали выставляться параметры "Take Profit", "Stop Loss" и "Trailing Stop", для позиций открываемых штатным функционалом терминала. В связи с этим, я занимаюсь ее переделкой. В утилиту будут добавлены отдельные кнопки "Buy" и "Sell", а также поле ввода для определения объёма сделки (лота).
Evgenii Zhivogliadov  

Описание торговой панели «eInTradePanel», с добавленным к ней «Trailing Stop»

Рис. 1. Элементы сигнализации и отображения/скрытия торговой панели

Рис. 1. Элементы сигнализации и отображения/скрытия торговой панели

Рис. 2. Элементы управления торговой панели

Рис. 2. Элементы управления торговой панели

  1. Кнопка включения отправки e-mail, при срабатывании «Stop Loss»/«Take Profit» и отложенных ордеров.
  2. Кнопка включения звуковой сигнализации, при тех же событиях, что и в п. 1.
  3. Кнопка отображения/скрытия торговой панели.
  4. Кнопки выбора типа ордера: «b» - рыночный «Buy», «s» - рыночный «Sell», «bs» - отложенный «Buy Stop», «ss» - отложенный «Sell Stop», «bl» - отложенный «Buy Limit», «sl» - отложенный «Sell Limit», «bsl» - отложенный «Buy Stop Limit», «ssl» - отложенный «Sell Stop Limit».
  5. Поле ввода объема ордера.
  6. Поле ввода/отображения значения «Stop Loss», в пунктах.
  7. Поле ввода/отображения значения «Take Profit», в пунктах.
  8. Поле ввода/отображения значения «Trailing Stop», в пунктах.
  9. Поле ввода/отображения значения «Trailing Step» (шага перемещения «Trailing Stop»), в пунктах.
  10. Кнопки открытия ордера.

Панель может использоваться в двух режимах: режим 1 (рис. 2) - открытие рыночной позиции со «Stop Loss»/«Take Profit» указанными в пунктах. Режим 2 (рис. 3 и 4) - открытие/установка любого типа ордера со «Stop Loss»/«Take Profit» и уровнями открытия, определяемыми положением горизонтальных линий. Если все кнопки выбора типа ордера отжаты, панель работает в режиме 1.

При нажатии на любую из кнопок выбора типа ордера вместо кнопок «Sell» и «Buy» появляется одна кнопка, соответствующая типу выбранного ордера и на графике появляются линии для определения уровней этого ордера, линии можно перемещать мышкой.

Рис. 3. Торговая панель в режиме 2 (выбран ордер «Buy Stop Limit»)

Рис. 3. Торговая панель в режиме 2 (выбран ордер «Buy Stop Limit»)

Рис. 4. Торговая панель в режиме 2 (выбран ордер «Sell Stop Limit»)

Рис. 4. Торговая панель в режиме 2 (выбран ордер «Sell Stop Limit»)

Линии

  • Оранжевая линия - уровень «Stop Loss» (цвет одинаковый у всех типов ордеров).
  • Зеленая линия - уровень «Take Profit» (цвет одинаковый у всех типов ордеров).
  • Голубая линия - уровень открытия ордеров «Buy Stop» и «Buy Limit».
  • Розовая линия - уровень открытия ордеров «Sell Stop» и «Sell Limit».
  • Синяя линия - уровень перехода ордера «Buy Stop Limit» в ордер «Buy Limit».
  • Красная линия - уровень перехода ордера «Buy Stop Limit» в ордер «Buy 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»

Рис. 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. Перемещение панели

Рис. 6. Перемещение панели

Позиция панели сохраняется для каждого графика и после перезапуска терминала.

Прочие функции

«Stop Loss»/«Take Profit» можно вводить не только в пунктах. Если в поле "sl" или "tp" после ввода числа ввести букву "s", то будет установлено значение в указанном количестве спредов. Можно просто ввести "s" и узнать величину спреда. Аналогично с буквой "m", в этом случае значение будет рассчитано в соответствии с указанным количеством минимальных стоп-уровней.

Если ввести букву "t", откроется окно сообщения со временем, прошедшим с начала текущего четырехчасового бара. Аналогично можно узнать время, прошедшее от начала бара других тайм-фреймов, всего возможны такие команды: "t2", "t3", "t4", "t6", "t8", "t12" - что соответствует тайм-фреймам H2, H3, H4, H6, H8, H12. Если ввести букву "d", можно узнать текущую дату и день недели.

Evgenii Zhivogliadov  

Description of the trading panel "eInTradePanel", with "Trailing Stop" added to it

Rice. 1. Elements of signaling and displaying/hiding the trading panel

Fig. 1. Elements of signaling and displaying/hiding the trading panel

Rice. 2. Trading panel controls

Fig. 2. Trading panel controls

  1. Button to enable sending e-mail when "Stop Loss"/"Take Profit" and pending orders are triggered.
  2. Button to turn on the sound alarm, for the same events as in paragraph 1.
  3. Button to show/hide the trading panel.
  4. Order type selection buttons: "b" - market "Buy", "s" - market "Sell", "bs" - pending "Buy Stop", "ss" - pending "Sell Stop", "bl" - pending "Buy Limit", "sl" - pending "Sell Limit", "bsl" - pending "Buy Stop Limit", "ssl" - pending "Sell Stop Limit".
  5. Order volume entry field.
  6. Input/display field of "Stop Loss" value, in points.
  7. Input/display field of "Take Profit" value, in points.
  8. Input/display field of "Trailing Stop" value, in points.
  9. Input/display field for the value of "Trailing Step" (travel step "Trailing Stop"), in points.
  10. Buttons for opening an order.

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. 3. Trading panel in mode 2 (order "Buy Stop Limit" selected)

Fig. 4. Trading panel in mode 2 (order "Sell Stop Limit" selected)

Fig. 4. Trading panel in mode 2 (order "Sell Stop Limit" selected)

Lines

  • Orange line - "Stop Loss" level (the color is the same for all types of orders).
  • Green line - "Take Profit" level (the color is the same for all types of orders).
  • Blue line - the level of opening orders "Buy Stop" and "Buy Limit".
  • Pink line - the level of opening orders "Sell Stop" and "Sell Limit".
  • Blue line - the level of transition of the "Buy Stop Limit" order into the "Buy Limit" order.
  • Red line - the level of transition of the "Buy Stop Limit" order into the "Buy Limit" order.
  • Vertical line - order expiration time. If the line is on the left, no expiration time is set for the order.

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"

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

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.

TooRich4me  
Can you set the stop loss and step on a trade that is already open?
traderspeed  
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
Evgenii Zhivogliadov  
traderspeed #:
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.

Somente usuários que compraram ou alugaram o produto podem deixar comentários