Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I came across this over the weekend as well. I tracked it down to the SaveWebFile function ... I think that the process it uses ("MSXML2.XMLHTTP") is causing the hit for the anti-virus software. I submitted a copy to a couple of sites to have it checked just to be sure.
In the mean time, you can get the spreadsheet operational again by doing the following:
-Delete the SaveWebFile function, should be in the Functions module
-Add the following code to the top of the Funtion module:
Private Declare Function URLDownloadToFileA Lib "urlmon" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Private Function SaveWebFile (URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFileA(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
This method of downloading the PA2 file does not seem to cause any grief with the anti-virus software and should be all the editing that is needed (not sure which version of the spreadsheet you have). If it doesn't work, just let me know which version you are using and I should be able to get it fixed up for you.
Hope this helps.
Note: If Avast keeps auto-deleting your file (placing it in the virus chest) you can turn Avast off temporarily, restore the spreadsheet, edit the code, and then turn Avast back on.
Update...
Sorry, small mistake ... code should look like this:
Private Declare Function URLDownloadToFileA Lib "urlmon" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Private Function SaveWebFile (URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFileA(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then SaveWebFile = True
End Function
Sorry Dudetooth - old guy here, I've never used Visual basic before
I've gone to the Functions page and deleted the section of text that contains SaveWebfile, and added your new code at the top of the page. I get a
"Compile error: Only comments may appear after the End Sub, End Function or End Property"
and the following text is highlighted:
" Private Declare Function GetWindowLong _
Lib "user32.dll" _
Alias "GetWindowLongA" _
(ByVal hwnd As Long, _
ByVal nIndex As Long) As Long "
I'm not sure how to find out which version of the spreadsheet I have, so I tried downloading the latest version from the first page of this thread. I had the same issue again, but when I try to download it now I get a "The file is corrupt and cannot be opened" error.
Here is a patched version of the last XLS-SPAN that uses a different download method that is not throwing false positives with the anti-virus.
I did check the code with the VirusTotal that Big Mike suggested. Off 53 anti-virus programs, the code caused hits on four, including Avast. After the code used to save web files was switched out with the code used in the attached spreadsheet only one anti-virus still showed a hit ... TheHacker. From a quick search online it seems as though TheHacker has a bit of a history with false positives.
I also submitted the file to Avast. They recommended that I try updating my version of Avast and virus definitions to alleviate the false positive.
I've been using your excel sheet here - and decided to move over to the 04b excel sheet as the "track all" feature would save me a lot of time with each of my spreads/strangles.
I'm getting different calculations for margin though between the two excel files - heres an example of my CL strangle:
version 3 sheet - $86 margin:
version 4b - $53 margin:
All of the settings on the first sheet are the same: path, Total IM, commissions, save dates. Also, the scan date is the same 8/29/2014.
Thanks for finding this error ... the 4b version was not adding the short option minimum for both legs ... $86 is correct. You won't normally see this unless you are very far out of the money (which these are) and then the short option minimum is greater than the risk scenarios so that it becomes the basis of the initial margin. I've fixed this issue and have re-posted the spreadsheet.
I use win8 64 bit. I have downloaded pc-span 4.5 from CME yet can't install it. The message says unexpected error with the package?? error code 2502 and 2503.
There is no issues with Win7 64bit, but it could be Win8 security ... found this referring to error 2502 and 2503:
Windows 8 has increased security measures which prevent standard users from installing 3rd party applications. If you see error 2502 or 2503 while installing, that means your account does not have administrator permissions to install software.
Solution 1:
Make sure your Windows account has the highest level of security permissions. Refer to Windows documentation for your operating system on how to do this.
Solution 2:
Run the installation file "As Administrator":
1. Find the installation file on your computer. Normally you have the option to save or run an installation file when downloading from the Internet. If you do not know where the file was downloaded, check the Downloads folder in File Explorer.
2. Right-click the file and select Run As Administrator* from the pop-up menu.
I have a selfish request unrelated to the issue immediately above.
Would it take a lot of work to add the Kansas City (KE) wheat contract to your application? It doesn't have the liquidity of the Chicago contract, but now that they're both under the CME umbrella, that may change.
No rush ... I can keep tabs on my KE positions elsewhere, but if it fits into a future release, great!