Awesome Eugene! Thank you.
There was one flaw in my original code. Since the variable Percent is being stored as an integer, it needs to be divided by 100 when calculating the average volume limit.
I also added a line to round the position down to the nearest 100 shares and cleaned up the formatting of the dialog box a little.
Here is my "final" code in case anyone else is interested. Please note, that I do NOT recommend trying to place orders as large as 1% of the average volume. I just used that number as an easy way to test the code.
CODE:
Please log in to see this code.
In order to compile this, Add References to:
C:\Program Files\Fidelity Investments\Wealth-Lab Pro 6\ControlLibrary.dll
C:\Program Files\Fidelity Investments\Wealth-Lab Pro 6\Fidelity.Components.dll
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll
C:\Program Files\Fidelity Investments\Wealth-Lab Pro 6\WealthLab.dll
C:\Program Files\Fidelity Investments\Wealth-Lab Pro 6\WealthLab.Indicators.dll
C:\Program Files\Fidelity Investments\Wealth-Lab Pro 6\WealthLab.PosSizers.dll