
We are going to make Basic Option Graph a much more powerful tool than
the Option Calculator by allowing strategies of up to four option legs
to be calculated and graphed. We will also add a leg for a stock position,
so strategies such as covered calls and collars can be graphed. And
we will add a Control that lets you set a different value for the IV
on a date between the entry and the expiration, so you can see the effect
of higher or lower Implied Volatility after you enter a position. We
will call the date in between entry and expiration the "Check Date",
and the IV on that date the "Check IV".
We will also add a Control that lets you easily "Include" any leg,
or not. This will save a lot of time comparing strategies such as a
long call with a bull call spread. Instead of setting up the leg information
for a long call and a short call over and over, you will just be able
to "Include" the leg for the short call or not.
First, we will add a couple of controls to the Leg1 you should already
have from the Option Calculator.
In Visual Basic, click the tab that says "Form1.vb [Design]". Then
click anywhere on the background of the Panel Control that is showing
"Long Call", to select the Panel. In the Properties Window, set the
Size - Width of the Panel to 819.
Click on the header of Form1 and then drag the lower right corner
of the Form so that the Panel fits on the Form. Also make the Form a
few inches deeper to allow room for the new Leg Panels to be added later.
Click on the "Leg1IV" NumericUpDown control on the Leg1 Panel, directly
under the title "IV", to select it. Press CTRL-C to copy it. Then click
anywhere on the background of the Panel and press CTRL-V to paste a
copy of the Control. Use your mouse to move the new Control to the right
of the "Value" text box, then use your keyboard arrow keys to move it
to Location 716,15. In the Properties Window, change the Name of the
new Control to "Leg1CheckIV".
Now from the Toolbox on the left of your screen, click on the Control
called "Checkbox", and then click on the Leg1 Panel. Use your mouse
and/or arrow keys to move the Checkbox to Location 791,18. Change the
Name Property of the Checkbox to "Leg1Include". Delete the text that
is in the Text Property so that there is no text.
Click on the Panel that has the titles, and change the Size - Width
Property to 819. Now click on the Label Control in the Toolbox, and
add three new Labels to the Panel. Change the Text and Location Properties
as below:
|
TEXT
|
LOCATION
|
|
CheckIV
|
719,16
|
|
Include
|
770,5
|
|
Leg
|
786,16
|
Add another Label, but this time to the Leg1 Panel, and set the Properties
as follows:
|
TEXT
|
LOCATION
|
FONT-BOLD
|
BACKCOLOR
|
|
Leg1
|
5,1
|
True
|
Orange
|
Finally, click anywhere on the background of the top Panel and use
the size handles to drag it to the new wider size, and do the same for
the bottom Panel. You should now have a Form design that looks like
the picture below:

Save your Project.