명시
Overview
I would like to have a custom Designed GUI built within MQ5 which will help make my trading easier to do. The main controls I will want within the GUI are Buttons, Dropdown Combo Boxes, List Boxes, text Boxes and Labels.
Not a Trading System
This is not a trading system that you are developing for me. I do my own analysis and will buy and sell at times I feel appropriate from my own analysis. However, there is some Stop movement I need to be done which is very systematic and limited in scope. I pyramid into my positions and move my stops as I do so. Any entries are done by clicking the Buy and Sell Buttons manually.
GUI in further Detail
There will be a main Container on which all the other components will sit. There are the following controls:
Symbol Listbox
- The user will be able to add new symbols, remove existing symbols and edit symbols to the list view box
- Each of the symbols within the Listbox will have their own associated Entry Sizes of which there will be 4 – Entry Size 1, Entry Size 2, Entry Size 3, Entry Size 4
o E.g
§ EURUSD – Entry Size 1 = 1 Lot
§ EURUSD – Entry Size 2 = 0.9 Lot
§ EURUSD – Entry Size 3 = 0.8 Lot
§ EURUSD – Entry Size 4 = 0.7 Lot
Buy Button
- The user will Press the Buy Button to Buy @ Market for whichever symbol is selected within the Symbols Listbox. Pressing Buy will Open a Position Long.
- The Entry size will be based upon how many Entries the user has already entered. E.g. If it is a new trade for the selected symbol, then the Entry size will be the Entry Size 1 size allocated to it. If it is the second entry on the selected symbol, then Entry Size 2 would be used etc
- After Trade entry 4 has been made, any subsequent entries will be done with Entry Size 4 also
- The buy button will not be used to close short positions
Sell Button
- The user will Press the Sell Button to Sell @ Market for whichever symbol is selected within the Symbols Listbox. Pressing Sell will Open a position Short.
- The Entry size will be based upon how many Entries the user has already entered. E.g. If it is a new trade for the selected symbol, then the Entry size will be the Entry Size 1 size allocated to it. If it is the second entry on the selected symbol, then Entry Size 2 would be used etc
- After Trade entry 4 has been made, any subsequent entries will be done with Entry Size 4 also
- The Sell button will not be used to close long positions
Flatten Button
- This button when clicked will close all open position and cancel all orders for the selected symbol selected in the Symbol Listbox.
- It will also then remove the Entry Level Line Drawing from the Chart and the Stop Line Drawings from the Chart.
· Average Weighted Entry Price Line Drawing on Chart
- After an Entry has been made, then the Charts which are open for this instrument will have a Horizontal line drawn on the chart at the price level that the order got filled. (This will be a custom drawing in addition to the automatic lines that MT5 add to the charts when opening a position).
- When multiple entries are made on an Instrument, the line drawn on the chart must be adjusted so that it is plotted at the Weighted Aggregated Price Level. E.g. if I bought 1 Lot EURUSD @ 1.0600 and then a further 3 Lots @ 1.0800 then the Weighted Aggregated price would be 1.075 and this is where the line would be moved to on adding a second or third …etc position.
- It must be possible for the User to choose the colour, weight, and line type e.g. Solid, Dotted, Dash of this chart drawing
- The Line will be labelled as 1xEntry, 2xEntry, 3xEntry, 4xEntry, 5xEntry etc depending on how many entries have been made on this instrument. The no. of entries could be infinite although in reality is likely to be less than 10.
- The line will also label the price level it is drawn at which will represent the Weighted Average Entry Price level
· Stop Price Line Drawing on Chart
- There will be a Stop in the market for any open position entered.
- The charts displaying the selected symbol in the Symbol Listbox will have a custom line added to the chart at the Price Level where the Stop is Positioned.
- This stop line can be dragged by the user to ‘Reposition’ the stop level and the Drag and Drop will send the appropriate update market orders to the broker to reposition these stop levels
- It must be possible for the User to choose the colour, weight, and line type e.g. Solid, Dotted, Dash of this chart drawing
- The Line will be labelled as 1xStop, 2xStop, 3xStop, 4xStop, 5xStop etc depending on how many entries have been made on this instrument. The no. of entries could be infinite although in reality is likely to be less than 10.
- The line will also label the price level it is drawn at which will represent the Stop Price level
- When the user drags the Stop level when there are multiple Stops at that level, ALL of the Stop orders will be moved with the same drag and drop for this instrument. The idea is that all stops are positioned in the same place and that the user only has to drag and drop one single line to have them all updated.
On Entering a Trade
- There are to be default configurable parameters which represent the Price level offset of the distance from the entry price of where to put Stop orders for Entry 1
- When a new trade is entered on clicking either the Buy or Sell Button, the Entry is opened with an attached Stop order at the configured no. of pips away from the Entry Price. This is the Behaviour for Entry 1.
- For Entry 2, once the user adds a second position to the selected symbol the following things need to happen:
- Calculate Weighted Average Entry Price and update Entry Line Drawing to the Weighted Average Entry Price Level
- Move both Stops (for each entry) to the Breakeven Price +1 pip in the direction of profit
- Update the Stop line drawing on the chart
- This is the behaviour for Entry 2.
- After the user has entered the second Entry on a selected symbol, nothing further needs to be done automatically by the script. The user will then manually adjust stops according to his own analysis.
There are another couple of buttons which include Locking and Unlocking the GUI for Trading, a Breakeven Button to move all stops to Breakeven and a Status MultiLine text box just to output the Entry levels and Stop levels however this is straight forward and I will explain this more once I have an idea of what Developers are interested in this job.
I have an idea and a draft GUI of how this will look but very flexible to ideas ad your own approach.
Thanks for reading.