Specification
The Trade Assistant is a trading panel designed for manual trading. The panel allows you to calculate risk, manage positions using the Trailing Stop functions, and close positions in parts. And other useful features.
List of main functions
Risk management
- Calculates the volume of a trade taking into account the specified risk and the size of the Stop Loss.
- Calculates the volume of a trade taking into account the broker's commission and spread.
- Displaying the profit of an open position , taking into account the broker's commission and spread.
- Function for setting the profit-to-loss ratio.
Position and order management
- The panel supports market and pending orders.
- Trade time manager - opening or closing by time.
- Closing a position in parts - closes a part of the order as a percentage of the set volume.
- Trailing Stop - 7 control options Stop loss order (in points, Fractals, MA, Parabolic SAR, ATR, Partial Close, High Low Bar).
- Breakeven - transferring Stop Loss to the level without loss.
- Trailing Limit Order - moves a limit order following the market price at a distance.
- OCO Order - the function of canceling several pending orders when one of them is activated.
- Virtual Pending Orders.
- Virtual Stop Loss and Take Profit - Hide SL TP.
- Management of open positions for all symbols from one chart.
- Closing positions by order type.
- Closing positions upon reaching the specified profit.
Graphics panel functions
- Main Panel - Contains a tabbed menu for setting up and using functions.
- Lines function - displays the opening line, Stop Loss , Take Profit on the chart. With this function, it is easy to place a new order and see its additional characteristics before opening.
- Displaying open positions and orders - the function shows the opening line, Stop loss , Take Profit with additional useful information.
- Context menu - allows you to change the settings of the selected order without affecting the settings of other orders.
Interface
Description of the main tabs and interface elements.
Trade Tab
- Symbol is a trading instrument of the current chart. Allows you to switch to another character.
- Program version.
- Take screenshot button
- Button to minimize / expand the panel.
- Close panel button.
- Trade server time.
- Tabs for switching the main menu.
- The button hides / shows orders and trade levels.
- Trade time manager - the function opens / closes trades by time.
- Set Alert - the function sets a line with different alert activation conditions on the chart.
- The button enables / disables lot calculation.
- Lines button - shows lines for marking a future order.
- Risk entry - here you can enter the risk percentage per trade. On the Settings tab, select the Risk calculation type.
- Entry - entry field for the entry price of a pending order. If in points, the entry price will be postponed at the specified distance from the market price.
- Enter Stop Loss - if 0 then the position will be set without Stop Loss.
- Price button - enables the entry of the Price for the Entry, Stop Loss, Take Profit fields.
- A group of buttons, when pressed, places an order of the corresponding type.
- Entering Take Profit - if 0 then the position will be set without Take Profit.
- Volume input. To open deals with a fixed lot.
- Entering a comment for the order.
- Entry to set the profit-to-loss ratio for TP SL. RR button - enables / disables the function.
- Display of the current spread and commission.
- Arrow - indicator of the last tick, green arrow - positive last price change, red arrow - negative last price change.
- The button hides / shows the menu of additional functions.
- Close Sell - closes all Sell orders.
- Close All - closes all Sell and Buy orders.
- Close Buy - closes all Buy orders.
- Delete Orders - closes all pending Limit, Stop and virtual orders.
- Close% - closes part of the order as a percentage of the volume. (Valid for the last open deal)
- Breakeven - moves Stop Loss to the level without loss, taking into account the settings of the Breakeven profit function. (Valid for the last open deal)
Close Sell, Close All, Close Buy, Delete Orders are executed taking into account the Symbols All parameter on the Close tabs.
The commission is displayed after the calculations. It is calculated based on the last deal of the current symbol in history. If there are no transactions in the history for the current symbol, then the commission will not be calculated.
Close tab
The Close tab contains functions for closing orders of different types. Closing by type is done in the form of a table where information on profit and the number of orders of this type is displayed.
- Type - the column contains buttons for closing by order type.
- Profit - the column displays profit.
- % - the column displays profit as a percentage of the balance.
- Total - shows the number of orders.
- Close Buy - when clicked, all Buy positions are closed.
- Close Sell - when clicked, all Sell positions are closed.
- Close All - when clicked, all Buy and Sell positions are closed.
- Close Profit - when pressed, all positions are closed with a profit.
- Close Loss - when pressed, all positions are closed with a loss.
- Close Stop - when pressed, all Stop orders are closed.
- Cose Limit - when clicked, all Limit orders are closed.
- Symbols All - enable if you want to close the positions of all symbols opened by this program.
- ID all - enable if you want to close positions set manually or by another program.
- Enabling / disabling the function, Profit on - the function closes all Buy and Sell positions when the specified profit is reached.
- Enabling / disabling the function, Loss on - the function closes all Buy and Sell positions when the specified loss is reached.
- L - Button to call the line for placing stop orders.
- M - the button will place stop orders for current positions at the selected price.
- ! M - stop orders cannot be placed at the current price (when pressed, the line will be deleted).
- X - line deletion.
Close All if function - the function closes all Buy and Sell positions upon reaching the specified profit / loss for the current Symbol.
When buttons 14, 15 are activated in the On mode, the function starts its work, namely in real time to monitor the conditions:
Profit > = Value , Loss > = Value .
Important: If you activate the function and switch to another symbol, you run the risk of closing positions. Since the function keeps track of the current Symbol.
To avoid this, use the placement of stop orders using the buttons 16.
Settings Tab
The Settings tab contains settings for additional and basic functions.
- Risk calculation - selection of the risk calculation method.
- Custom value - specify from what amount to calculate the risk percentage (used for% Custom value).
- Spread limit - the function limits the opening of trades if the spread is greater than the set one.
- OCO order - an order canceling another order. The function must be enabled for a pair of pending orders or more. When one of them is activated, the others will be canceled.
- Hide SL TP - the Hide SL TP function.
- Virtual pending order - virtual pending orders.
- Apply - applies the function settings (OCO order, Hide SL TP, Virtual pending order, In parts, TS, BE) to the current open positions.
Risk calculation
Methods for calculating the risk per trade. The Risk input field (Trade tab) indicates the risk per trade, depending on the method.
- $ Currency - in the currency of the deposit, the desired risk in the currency of the deposit is indicated in the Risk input field (Trade tab).
- % Balance - as a percentage of the balance.
- % Equity - as a percentage of funds.
- % Free Margin - from free margin.
- % Custom - as a percentage of its Custom value.
- % B prev Day - as a percentage of the previous Day's Balance.
- % B prev Week - as a percentage of the previous Week's Balance.
- % B prev Month - as a percentage of the previous Month's Balance.
% Balance methods per Day, Week, Month is the balance value at the end of the previous Day, Week, Month. This allows you to trade a fixed risk throughout the Day, Week, Month.
Partial Close
The function allows you to close a position in parts.
Volume of closing part of the order
- Lot% in - as a percentage of the initial lot.
- Lot% - as a percentage of the current order lot.
- Lot - in lots.
Closing price
- Auto - the partial close prices are distributed evenly from the open price to the stop order. To use this method, TP and SL must be installed.
- Points - the price is calculated in points from the opening price.
- Price - set by price.
- RR - the price is calculated in relation to the risk. SL must be installed for this method.
- Change% - the price is calculated as a percentage of the open price.
If the order has a minimum lot, then it is impossible to close part of the position.
TS tab
Trailing Stop and Trailing Limit Order functions.
Trailing Stop - the function is implemented in different versions:
- Trailing Stop is a classic setting in points.
- Trailing Stop Fractal - the Fractal indicator is used.
- Trailing Stop MA - the Moving Average indicator is used.
- Trailing Stop Parabolic SAR - the Parabolic SAR indicator is used.
- Trailing Stop ATR - the ATR indicator is used.
- Trailing Stop by Partial Close - the function of Closing in parts is used.
- Trailing Stop High Low prev bar - the High Low prices of the previous bar are used.
Trailing Stop
- Start - the level from which the function starts to work, if 0 then the function works immediately, if> 0 - the function works when the position profit in points is greater than this value.
- Distance - distance from the market price to placing a Stop Loss order.
- Step - sets the step in points from the previous Stop Loss value to the next one.
Trailing Stop Fractal
- Fractals Scan bar - the number of bars on which the nearest fractal is being searched.
Trailing Stop MA
- Period - period of the Moving Average indicator.
- Method - the method for calculating the indicator.
- Apply to - calculation prices.
Trailing Stop Parabolic SAR
- Step - indicator step.
- Maximum - the maximum of the indicator.
Trailing Stop ATR
- Period - period of the Average True Range indicator.
- Coefficient - multiplier.
Stop Loss = Bid + - ATR * Coefficient ;
Trailing Stop by Partial Close - for the function to work, the Trailing Stop by Partial Close function is required. Stop Loss moves to the previous partial close level.
- at TP1 modify sl: price open - on / off when TP1 closes, change SL to the open price.
Trailing Stop High Low prev bar - moves Stop Loss to the High or Low price of the previous bar.
- Distance - distance in points from the High or Low price of the previous bar.
Trailing Limit Order - the function moves Limit orders following the market price.
- Distance - distance to the limit order from the market price.
Breakeven function
Breakeven - the function allows you to move a Stop Loss order once.
Condition: When position profit (pips)> = Start
Function execution result: new Stop Loss level = open price + Profit.
Order menu
This menu allows you to change the settings of the selected order.
Lines
Marking an order using lines. This function draws entry, Stop Loss and Take Profit lines on the chart, moving these levels can be configured for any type of order.
The lines indicate the information with which parameters the future order will be opened, and in the additional parameters you can choose what information will be displayed.
- Take Profit line.
- Open line.
- Stop Loss line.
- Lock TP SL button - locks the line at the price.
- R - expand.
- Place - a button to open a position or order.
- X - the button removes lines from the chart.
By default, the entry line is magnetized to the Bid or Ask market price, depending on the order type. You can adjust the magnetization using the Magnet to the price parameter in the additional settings. To remove magnetization, set the value to 0.
An example of marking and opening a position.
Expiration Time
The function of canceling an order after the expiration of time.
Trade Assistant allows you to set this property with a single movement of the mouse.
Trade time manager
The function allows you to schedule the opening / closing of orders at a specified time.
- Time - the time the order was opened or closed. Input format: date and time "yyyy.mm.dd hh: mi: ss" or time "hh: mi: ss".
- Order - a list of trade functions.
- Repeat - repeat by days of the week at a specified time, the day of the week and activation time are used.
- Add - add to the list.
Trade operations with disabled replay are removed from the list after execution.
Close functions are executed taking into account the Symbols All parameter on the Close tabs .
OCO Order ('One Cancels the Other' orders)
The function cancels pending orders if one of the pending orders has been activated.
Hide SL TP
Hidden Stop Loss and Take Profit are drawn on the chart as lines.
When the market price crosses the line, an order is sent to the broker to close the position.
Hotkeys
Available functions for installation.
- KEYS "Open Buy"
- KEYS "Open Sell"
- KEYS "Close Buy"
- KEYS "Close Sell"
- KEYS "Close All"
- KEYS "Close Profit"
- KEYS "Close Loss"
- KEYS "Close Limit"
- KEYS "Close Stop"
- KEYS "Delete Orders"
- KEYS "Close%"
- KEYS "Breakeven"
- KEYS "Lines"
- KEYS " Lines Buy / Sell"
- KEYS " Place (open order)"
- KEYS Edit Comment Order
- KEYS Chart period M1
- KEYS Chart period M5
- KEYS Chart period M15
- KEYS Chart period M30
- KEYS Chart period H1
- KEYS Chart period H4
- KEYS Chart period D1
- KEYS Chart period W1
- KEYS Chart period MN
- KEYS Next Symbol
- KEYS Previous Symbol
- KEYS Chart Type (Bar, Candles, Line)
- KEYS Chart Zoom +
- KEYS Chart Zoom -
- KEYS Alert if: Bid> Line
- KEYS Alert if: Bid <Line
- KEYS Alert if: Bid> TrendLine
- KEYS Alert if: Bid <TrendLine
- KEYS Alert if: Ask> Line
- KEYS Alert if: Ask <Line
- KEYS Alert if: Ask> TrendLine
- KEYS Alert if: Ask <TrendLine
- KEYS ScreenShot
The function is case sensitive and language sensitive.
Screenshots
The function allows you to take screenshots at the touch of a button from the panel, or automatically when performing trade operations.
Input parameters:
- Name Folder - The name of the folder.
- Auto ScreenShot - enable / disable automatic saving of screenshots when performing trade operations.
Screenshots are saved along the way:
In the terminal, open: File / Open data directory / MQL5 / Files / TA ScreenShot
For MT4 terminal: File / Open data directory / MQL4 / Files / TA ScreenShot
Panel color
Dark
Light
To change the color of the panel, load the settings files: black.set, white.set (files at the end of the description).
Description of input parameters
These are the input parameters with which the program is loaded.
But in addition to these parameters, the trading panel saves the parameters to a separate file. Parameters that can be changed from the graphic part of the program are saved separately. The saved parameters are loaded when the program is restarted, the symbol is changed, the period is changed, the terminal is restarted.
The settings are saved for a specific chart window to which the program is attached. If you delete a chart window and create a new one, another save file will be created for the new window.
To use only input settings or set files, you must disable saving parameters, set the Save Settings parameter to false in the input settings.
Trade | Trade |
---|---|
Point Option | Multiplier for entering points Point Point * 10 Point * 100 |
Lines Type (Buy / Sell) | Direction of the markup lines to buy or sell |
EXPERT ID | Expert ID. Each Expert Advisor can set its own unique identifier when sending a trade request. By default, it works with positions that contain this magic number. If 0 then works with all magic numbers. |
Deviation (point) | Maximum acceptable deviation from the asking price, set in points |
Sounds of trading | Trading sounds |
Risk button (Increment / Decrement) | For buttons add / subtract value |
TP SL Entry button (Increment / Decrement) | For buttons add / subtract value |
Settings | Settings |
---|---|
Add commission to profit / risk calculations | Adds commission to profit and lot calculations |
Add spread to profit / risk calculations | Adds spread to profit and lot calculations |
Trailing Stop | Trailing Stop |
---|---|
Trailing Timer | Trailing Stop check timer. Sec - every n seconds, if 0 then it works on every new tick. New Bar - works at every new bar. |
Sec | Number of seconds for Trailing Timer |
Panel | Panel |
---|---|
Panel_X | X position of the panel (from the upper left corner) |
Panel_Y | The position of the panel along the Y coordinate (from the upper left corner) |
Panel_SCALE | Panel scaling. |
PanelTurn | Turns on the collapsed panel. |
Symbol Switch | Symbol Switch |
---|---|
Size column | number of characters in a column |
All Chart | enables setting the selected symbol for all charts |
Close all if: Profit Loss | Close all if: Profit Loss |
---|---|
Send Alert if Close All | sends Alert after closing all positions |
Delete orders | deletes all pending orders additionally |
Alert | Alert |
---|---|
Alert Type | Notification type
|
Maximum iterations | Number of repetitions |
Time Out (sec) | Break time between repetitions |
Alert - Show All TimeFrames | display of the Alert line on all chart periods |
Dashboard position | Dashboard position |
---|---|
Position Align Create | Initial position of the artwork for the open position |
Menu display angle | Menu location |
Confirmation close position | Enable / Disable confirmation of closing a position |
Move SL TP with the mouse | Moving SL TP lines with the mouse |
Draw objects Expiration order | Enables the display of objects for placing an Order Expiration |
Draw All Objects | When an order is opened, the SL TP lines are drawn immediately without the need to click on the order |
Draw Button BE TS | Shows additional BE TS buttons |
Range TP SL Show | Shows the highlighting of the TP SL zones |
Range TP SL full width | Shows the full width of the window |
LINES | LINES |
---|---|
Align Mode | Position of lines on the chart |
Pricing markers | Highlighting prices on the price scale, for TP, SL, Open lines |
Show Line Partial Close | Shows Partial Close lines |
Hide line | Hides Layout Lines after opening a position |
Hide position | Hides positions if Layout Lines are on |
Hide trading levels | Hides trading levels if Markup Lines are enabled |
Lock TP | Blocks TP line on price |
Lock SL | Blocks the SL line on the price |
Magnet to the price | Distance in pixels to the market price at which the open line is magnetized to the price. |
Range TP SL Show | Shows the highlighting of the TP SL zones |
Range TP SL full width | Shows the full width of the window |
Show Line All Chart | Shows TP, SL, Open lines on all charts of exactly the same symbol from which the marking lines are included. |
Hide_SLTP | Hide_SLTP |
---|---|
Activation price | The price at which virtual SL TPs are closed. true - activation at the Bid price false - activation at Bid / Ask prices, depending on the type of position, as real SL TP. |
System parameters | System parameters |
---|---|
SystemFilling | trade request execution policy |
Save Settings | Saving panel settings for next load |
Note
The functions performed by the Trade Assistant program are performed on your computer, if you disable the program, the functions will cease to be performed.
The functions for calculating risk and reward may not work correctly for various reasons, therefore it is recommended to check this using pending orders and verify it with the terminal's calculations. (MT4 only)