Basic Option Graph is now complete except for turning it into a stand-alone
program that does not need Visual Basic to run.
Before we create the final ".exe" file though, we should do a couple
First, check through all the "code behind", on "EquityOption.vb",
on "EquityShares.vb", on "Form1.vb", and on "OptionCalcs.vb",
and look for anything underlined with blue squiggly lines or red underscores.
A blue squiggly line usually means the Name of something has been
misspelled. If you find anything like that, go back to the step where
that item was added and check the spelling of the Name of the control.
A red underscore usually means something is missing or superfluous,
such as a ")" that should be there, or an extra one that should not
If you get any of these type of error marks and can't figure out what
the problem is, remove the function and re-paste it from the page where
it was supplied.
If you get error marks or error messages that you cannot figure out,
just copy the entire function where the problem appears and send it
in an e-mail to this contact
and we will take a look at it.
Second, Visual Basic provides a way to test your program from within
Visual Basic, without making it an .exe file first. This is called Debugging.
Look at the Visual Basic menu bar and you should see a green triangle.
If you hover your mouse over the green triangle it should say "Start
Debugging (F5). You can either click the button or press the F5 key
to start debugging your program.
Debugging your program will make it run, exactly as if it was a stand-alone
When the program first starts, it should show a generic Bull Call Vertical,
with the details in Legs 1 and 2, plus a graph with three time lines
Try setting up any strategy you normally trade. If you know the price
of the options, input the prices and use the "Find IV and Graph"
button. If you know the approximate IV of the options, input the IVs
and use the "Find Price and Graph" button.
Anytime you change any information about one of the Legs, you must
use one of the "Find and Graph" buttons. Just changing the
information does not update the option prices or the graph.
The rules for the Include Checkbox are simple: if you want to have
a leg be part of the graph, it must be Included. If you do not want
it to be Included in the graph, uncheck the Checkbox. This lets you
set up anywhere from one to four legs, plus a stock leg, and check various
strategies against one another just by Including the Legs or not.
To use the "Copy Leg1 to All" button, just set up Leg1 with
all the information that will be common between all the strategy Legs,
such as the number of contracts, stock price, and expiration date. Press
the Copy button to make all Legs the same as Leg1. Then you can change
whatever is different on each Leg, and Include the Legs you want.
The Copy button does not affect the Option Type, the Option Price,
nor the Included Checkbox, since those things will normally either be
different or need to be changed anyway.
If your Project passes testing, the next step is to make the final