Lot by Risk
- Utilities
- Sergey Vasilev
- Version: 1.8
- Updated: 28 September 2023
The Lot by Risk trading panel is designed for manual trading. This is an alternative means for sending orders.
The first feature of the panel is convenient placing of orders using control lines. The second feature is the calculation of the order volume for a given risk in the presence of a stop loss line.
Control lines are set using hot keys:
take profit –T key by default;
price –P key by default;
stop loss – S key by default;
You can configure the keys in the settings of the trading panel.
Algorithm:
1) – place the levels in the desired locations (it is not necessary to place all the levels);
2) – specify the risk (optional);
3) – click the green send order button;
4) – wait for the order to be placed, or an alert will appear with an error message;
5) – if we want to close all orders for the current symbol that are linked to the expert Advisor by magic, then click the close orders button.
Do not click the send order button many times. Once is enough. After placing an order, the button will take the "not pressed" state.
To send an order with risk calculation, you must set the stop loss line and set the risk in the "Risk" field of the trading panel. Otherwise, the order will be placed with the minimum lot for the current trading instrument.
The risk is calculated from the account balance. You will not be able to make 100% risk due to the broker's restrictions related to the specifics of margin trading.
Fractional numbers are allowed in the" Risk " field (for example, you can trade at a risk of 0.5% of the balance).
If the specified risk is lower than the allowed lot, the order will be placed with the minimum lot for the current trading instrument.
To place an order on the panel, you must have a take profit or stop loss line.
If you do not place the price line, the order is placed by the market.
If stop loss is not set, orders will be placed with the minimum lot for the current trading instrument.
If stop loss is specified, but the Risk is not specified in the "Risk" field, the order will also be placed with the minimum volume.
Pending orders are placed indefinitely.
To trade the minimum lot, simply delete the contents of the "Risk" field.
Inputs:
magic = 111 – the magic number for orders;
slippage = 5 – slippage for market orders (set in pips);
comment = “ ” – comment on the placed orders;
font = 7 – font for graphic objects;
HK_TP = “T” – hotkey for the take profit control level (only A-Z, a-z, 0-9);
HK_SL = “S” – hotkey for the stop loss control level (only A-Z, a-z, 0-9);
HK_PR = “P” – hotkey for the price open control level (only A-Z, a-z, 0-9).
important!!!
1) the hotkey characters must differ from each other.
2) to place a order, you must have a take profit OR stop loss line.
Классный советник! Прошу автора добавить быструю клавишу также и для размещения ордеров.