Object Trader MT5
- Utilities
- Maksim Novikov
- Version: 1.0
- Activations: 20
Object Trader MT5 is a unique trading utility that changes the approach to managing pending orders. Instead of entering prices manually, you simply create graphic objects on the chart, and the utility itself places and updates orders attached to these objects.
Work Concept
The utility allows you to "attach" trading orders to three types of graphic objects:
Rectangles — for placing paired orders (Buy Stop and Sell Stop)
Lines — for placing single pending orders
Trailing lines — for managing stop losses of open positions
Control Panel Interface
The panel contains the following elements:
| Element | Purpose |
|---|---|
| Lot | Volume for placed orders |
| Stop Loss | Distance to Stop Loss in points (from order price) |
| Take Profit | Distance to Take Profit in points (from order price) |
| Name Rect | Name of the rectangular object on the chart |
| Name Line D 1/2 | Names of lines for pending orders |
| Name Line T 1/2 | Names of lines for trailing |
Two buttons are provided for each object:
"[Object] Only" — single execution of an action
"[Object] On/Off" — enabling/disabling automatic mode
Operating Modes
-
Working with a Rectangle
The rectangle defines a price range with two levels:
Upper boundary — for Buy Stop order
Lower boundary — for Sell Stop order
How it works:
Create a rectangle on the chart ("Rectangle" tool in the terminal)
Specify the rectangle name in the panel (e.g., "Rectangle 1")
Press "Rect Only" for a single placement of orders
Or enable "Rect On" for automatic mode
In automatic mode:
When moving the rectangle, orders are automatically updated
Buy Stop follows the upper boundary
Sell Stop follows the lower boundary
SL and TP are recalculated from new order prices
Order parameters:
Buy Stop: price = upper boundary, SL = price - (SL×Point), TP = price + (TP×Point)
Sell Stop: price = lower boundary, SL = price + (SL×Point), TP = price - (TP×Point)
-
Working with Lines for Orders (Line Deneme)
Lines are used for placing single pending orders. The order type is automatically determined depending on the line's position relative to the current price:
| Line Position | Order Placed |
|---|---|
| Above current price | Buy Stop (buy from level) |
| Below current price | Sell Stop (sell from level) |
How it works:
Create a vertical line on the chart ("Vertical Line" tool or trend line)
Specify the line name in the panel (e.g., "Line 1")
Press "Line D1 Only" for a single order placement
Or enable "Line D1 On" for automatic mode
In automatic mode:
When moving the line, the order automatically updates its price
The order type may change if the line crosses the current price
SL and TP are recalculated from the new order price
-
Working with Lines for Trailing (Line Trailing)
Trailing lines are used to manage stop losses of open positions. When moving the line upward, position stop losses are automatically pulled up to the new level (but only if the new level is higher than the current SL).
How it works:
Create a line on the chart
Specify the line name in the panel (e.g., "Line 3")
Press "Line T1 Only" for a single stop loss update
Or enable "Line T1 On" for automatic mode
In automatic mode:
When moving the line upward, stop losses of all positions are pulled up to the new level
Only positions with a new SL higher than the current one are updated
Usage Examples
Example 1: Trading from a Range
You expect the price to break the resistance level 1.1050 or support 1.0950:
Draw a rectangle from 1.0950 to 1.1050
Name it "Range"
In the panel, specify:
Lot: 0.1
SL: 50
TP: 100
Press "Rect Only"
Result:
Buy Stop placed at 1.1050 with SL 1.1000 and TP 1.1150
Sell Stop placed at 1.0950 with SL 1.1000 and TP 1.0850
Example 2: Trading from a Level
You expect a bounce from level 1.1000:
Draw a vertical line at level 1.1000
Name it "Level"
In the panel, specify Lot: 0.1, SL: 30, TP: 60
Enable "Line D1 On"
Result:
If price is above 1.1000 → Sell Stop placed at 1.1000
If price is below 1.1000 → Buy Stop placed at 1.1000
When moving the line, the order is automatically updated
Example 3: Trailing Stop
You have an open position with profit and want to protect the profit:
Draw a horizontal line at the level of current price + 20 points
Name it "Trail"
Enable "Line T1 On"
As the price rises, move the line upward
Result:
The position's stop loss automatically pulls up to the line
Profit is protected even if the price reverses
Input Parameters
| Parameter | Description |
|---|---|
| Magic_Rect | Unique identifier for orders placed from the rectangle |
| Magic_Line_1 | Unique identifier for orders from the first line |
| Magic_Line_2 | Unique identifier for orders from the second line |
Magic Numbers allow separating orders from different objects and avoiding conflicts with other advisors.
