To include Stock information in an option strategy, we must provide
a way for the information to be entered, so we will add a Panel for
a Stock Leg.
In Form1 Design, move the bottom Panel that has the two "Find" buttons
on it out of the way.
Using the Toolbox, click on the Panel Control, which is in the Containers
grouping. Then click on the background of Form1 to place a new Panel.
Change the Size Property of the Panel to 819,42 and move it into position
under the Leg4 Panel.
Add the following Controls to the new Panel, with their Properties
set as indicated:
| CONTROL |
NAME |
LOCATION |
SIZE |
DECIMALPLACES
|
INCREMENT
|
MINIMUM |
MAXIMUM |
VALUE |
| ComboBox |
StockLegType |
3,15
|
67,21 |
|
|
|
|
|
| NumericUpDown |
StockLegShares |
94,15
|
68,20 |
|
|
1
|
50000
|
100
|
| NumericUpDown |
StockLegStockPrice |
243,15
|
59,20 |
2
|
.01
|
.01
|
999
|
1
|
| TextBox |
StockLegValue |
619,15
|
89,20 |
|
|
|
|
|
| CheckBox |
StockLegInclude |
791,18
|
|
|
|
|
|
|
|
CONTROL
|
LOCATION
|
TEXT
|
BACKCOLOR
|
FONT-BOLD
|
|
Label
|
5,1
|
StockLeg
|
Orange
|
True
|
|
Label
|
104,1
|
Shares
|
|
|
|
Label
|
244,1
|
Entry Price
|
|
|
On the StockLegType Control, in the Items Collection, add Long on
one line and Short on the next line. Set the Text Property to Long.
As the picture shows, we changed the BackColor Property on alternating
Panels to give them some separation and highlight the fact that they
are different legs of the strategy. We used the colors LightGreen and
Wheat. You can use whatever colors you like. The colors of Panels have
no affect on code.
Save your Project.
