Graphical Orders Manager
This is an irreplaceable assistant for manual trading providing maximum automation of daily routine calculations, convenient system of opening and maintaining trades and also their closure on reaching a specified adjustable level. The untility provides maximally clear and complete information on the current situation of each instrument separately and features the convenient trading panel as well as many additional functions in one program. The product works correctly with all instruments (Forex, CFD, Futures).
The program operation is performed by timer and does not depend on the incoming ticks, so the EA operates in any market activity and even on weekends. No heavy standard libraries. Minimum code - maximum functions. No delays in execution of orders.
- Target levels displaying a distance from the current price in points and total profit. All calculations are performed "on the go" when moving the lines
- Automated closing of trades upon reaching the adjustable level. You do not have to set StopLoss and TakeProfit if you do not want your broker to see them
- Convenient and compact trading panel with access to all program functions
- Automated lot size calculation by specified parameters, automated money management calculator
- Automated plotting of breakeven levels for buying and selling
- Closing all trades by clicking a single button
- Clearing a chart by clicking a single button
- Removing all pending orders by clicking a single button
- Automated placement of a hedging pending order
- Setting StopLoss or TakeProfit to a single level for all trades by clicking a single button
- Displaying closed trades on a chart
- Working with orders having a certain Magic Number
Functions, settings and operation features
- Manager uses two target lines. It has two operation modes:
- If there are no trades, the distance from the price to the line in points is specified. The lines cannot be placed nearer than double spread from the price. This is done for the safety of opening trades.
- If there are open trades, then the gross profit or loss with the consideration of commission, swap and spread is displayed near the line. The results are displayed in the deposit currency.
- Auto closing orders. Configurable from inside the manager. If this function is enabled, then the trades will be automatically closed when the Bid price reaches the target level. If the manager is not active for more than 10 minutes, this function automatically switches off. This is done for the safety of opened trades. Also the trades will not be closed while the left mouse button is pressed. This is for safety of moving the target lines near the current price. For if the line was moved beyond the price, the trades would be closed, as the condition of reaching the specified price would be met.
- The trading panel with the ability to open orders and access additional functions. During the configuration and the lot calculation, the manager automatically takes into account the minimum and maximum lots, as well as the change step. If the selected lot exceeds the margin requirements, then it will be displayed. Also, the trades will be opened with Magic, StopLoss/TakeProfit comment specified in the settings. The trading panel and all additional panels can be freely moved and placed in convenient locations. There are four lot calculation modes:
- Specified fixed Lot.
- Lot per 1000 units of the deposit. For example, if you specify 0.1 and deposit is $200, then the EA uses 0.02 lot.
- Risk per trade. The percentage of the deposit, which can be afforded to lose, is specified. Target levels are used as StopLoss. The lot will be automatically recalculated if they are moved.
- Martingale multiplier. If there are no trades, the minimum lot is specified. If there are open trades, then the specified multiplier will be applied to the maximum open lot. Buy and Sell are calculated separately.
- All important program settings are stored in the global variables. This means that you can freely switch the timeframe, deactivate or disable the manager of the terminal - all settings will be saved. Expiration date of settings is 4 weeks. Separate settings are stored for each instrument.
- When tracking open trades, the breakeven levels of Buy and Sell orders are displayed separately on the chart. Also the net open lot in each direction is displayed. This is useful if you have several open trades.
- Count pending orders. Configurable from inside the manager. Option to account the pending orders during the calculation of the results and breakeven levels.
- Show closed orders. Configurable from inside the manager. Option to display the trades closed by reaching the target levels on the chart.
- Adjustment of the StopLoss and TakeProfit values in points from within the manager for orders, opened by the manager. If the value is less than the allowed minimum, the stops will be automatically extended.
- Ability to work with MagicNumber. If the value greater than 0 is specified in the settings, the manager will work only with its own orders: open, calculate and close. At the value 0 it works with every order of the symbol. It does not apply to pending orders, as their Magic is 0.
- Program timer (ms). Configurable from inside the manager. Timer, which generates events and activates the calculation cycle. It cannot be less than 100 (high load) and greater than 3000 (meaningless).
- Pause for spread. Configurable from inside the manager. The number of the program's operation cycles to update the spread. If set to 1, the spread will be constantly updated, but this will lead to constant change in the results of the Sell orders, as the result is always corrected by the spread size.
- Use lines as stops. When activated, StopLoss and TakeProfit levels are automatically set according to the target lines.
- Use hedging orders. When activated, a hedging order is automatically placed in the opposite direction with a shift from the current price.
- Shift for hedging. Shift from a hedging order.
Remember that by leaving reviews and comments to the program, you help not only the author, but also all other users! Do not forget to leave the reviews and suggestions for further development of the program.
- Color of the upper target line - color of the upper target line and text to it
- Color of the lower target line – color of the lower target line and text to it
- Width of the target lines – width of the target lines
- Style of the target lines – style of the target lines
- Color for the breakeven level of buys – color of the breakeven level of the buy orders
- Color for the breakeven level of sells - color of the breakeven level of the sell orders
- Width for the breakeven levels – width of the breakeven lines
- Style for the breakeven levels – style of the breakeven lines
- Font size for text labels – font size of the text labels to the lines
- Font for text labels – font for text labels (drop-down list)
- Color theme for Panel – color theme of the program interface appearance
- Comment for new orders – comments for orders opened from the panel
Once the corresponding option is activated, the target line becomes inaccessible for manual movement, and it will follow the price at the distance set at the time the function had been activated.
When this function is disabled, the target levels become movable again.
The trailing is deactivated 10 minutes after the application closes.
+ Corrected the operation of order calculation per 1000 deposit. The check for the minimum and maximum lot size is disabled for entering a multiplier. But the check remains in the button for opening orders.
If the new level does not meet the requirements for the transfer, then it will be placed at the distance of double spread from the price.
+ Added the function of placing a hedging pending order. When the function is active and the offset for a hedging order is set, then if a new trade is opened, an opposite pending stop order will be placed automatically. The offset can not be set less than double spread. The pending order will be placed without the TakeProfit and StopLoss levels.
If there are any errors in the program operation or any suggestions on improvement, then please contact me via the private messages or the comments section.
- Fixed the calculation of the current profit. Now even with the pending orders accounting enabled the actual current profit is calculated by the actually opened orders.
- Started the formation of the info panel. Currently only the minimum deposit per 1 lot is displayed. The suggestions on the content of the panel are welcome.
- Added button to delete all pending orders of the instrument. The situation with Magic is identical - only works with the value set to Magic=0.
- Fixed a typo.
- Fixed lot calculation per 1000 of the deposit.
- StopLoss/TakeProfit can not be placed closer than the double spread. If a lower value is set in the settings, the level will be extended automatically to avoid errors.
- Almost all the settings have been transferred to the manager. Comments will be left in the external settings, since global variables do not store string values.
- Removed the preset indent for the initial placement of the lines, as it happens only once. Later the levels are taken from the stored values.
- Settings are saved separately for each symbol. It allows to restart the terminal and switch timeframes without loss of control. If the manager does not operate for 10 minutes, then the automatic trade closure is disabled. This is done for the safety of orders, the price of which went beyond the line while the terminal was not working.
- If there are no trades, then the target lines can not be placed closer than the double spread to the price. This is done for the safety of opening orders.
- The orders are not closed while the left mouse button is pressed. This is for safe moving of the target lines.
- Introduced the operation using the MagicNumber. If the value greater than 0 is specified in the settings, the manager will work only with its own orders: calculate and close. At the value 0 - every order of the symbol is considered.
- Implemented a fully functional trading panel with lot calculation. Four calculation modes: lot specified in the settings, lot per 1000 units of the deposit, lot based on risk using the Stop Loss (the target lines are used), increase of the maximum open lot by the specified multiplier. The trades will be opened with the Magic, StopLoss/TakeProfit and the comment specified in the settings.
- Added the function to quickly clear the chart of all graphical objects.
- Part of the setting have been moved to the manager, and they can now be configured without restarting the system. The list of flexible parameters will expand.
Features planned to be added:
- Deletion of the pending orders
- Ability to perform calculations with consideration of pending orders
- Additional pending order placement mode
- Setting SL/TP by target levels
- Additional information panel
- The levels are always displayed. If there are no trades - the amount of points from the current price is displayed. (In future it will be used in lot calculation by the specified risk).
- Added a movable control panel. Currently it only shows the symbol name and the current spread. The panel can be collapsed into a compact form. You can remove the manager using the close button on the panel.
In the future, the functionality of the panel will be significantly expanded. The functionality suggestions and bug reports are welcome.
- Added a configurable pause for the spread recalculation. This was done to avoid frequent changes of the total results for the Sell orders. The pause is specified as the number of cycles of the program iteration. If needed, the value can be set to 1, and the spread will be constantly recalculated.
- The entire program is now in an infinite loop. Before, the cycle only started when orders opened and finished once there were no orders. Now the cycle is infinite and it starts once the first tick arrives, but when there are no orders present, the pause is doubled. The infinite loop is necessary for the implementation of the upcoming features.
- Performed general optimization of the code.
Added options for the calculation of profit for CFD and Futures (calculation method is determined automatically).
Please report about bugs in the program.
A new settings item:
Show closed orders - show closed trades on the chart
- true - enabled
- false - disabled