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 had just developed the code for tracking futures back when I first put this out and didn't get a lot of troubleshooting in on it. NYMEX and COMEX contracts had issues because the future contracts were being skipped in the code.
It's not too difficult of a fix, though there may be other issues I haven't seen yet. I've uploaded the spreadsheet because posting the code in the forum may not show the proper spacing and you can copy the code over to your existing spreadsheet. There are three areas to address ...
1) In MainCalculation module - add the bit about clsOpt.TypeB1:
'*********** TypeB ... option month details: dte, base volatility, delta scaling factor
Case 3
If InStr(rline, clsOpt.TypeB) = 1 Or InStr(rline, clsOpt.TypeB1) = 1 Then '170611 TypeB1 needed for loading COMEX/NYMEX Fut contracts
2) In COption class module - At the top add pTypeB1:
Private pTypeB As String, pTypeB1 As String, pType8F As String, pType8O As String, pType30
3) Down further in the COption class module - add this new set of code:
Public Property Get TypeB1() As String '170611 needed for loading COMEX/NYMEX Fut contracts
Select Case pCommodity
Case "CL": TypeB1 = "B NYMCL "
Case "GC": TypeB1 = "B CMXGC "
Case "HG": TypeB1 = "B CMXHG "
Case "HO": TypeB1 = "B NYMHO "
Case "NG": TypeB1 = "B NYMNG "
Case "RB": TypeB1 = "B NYMRB "
Case "SI": TypeB1 = "B CMXSI "
Case Else: TypeB1 = "XXXX"
End Select
End Property
I tucked it in between Public Property Get TypeB1() and Public Property Get Type8F(), but anywhere should do. There should be 8 spaces between the last letter of the B code and the last quotation mark.
This is Pawan Mishra. I'm new to PC-SPAN, but I know basics of batch scripting. I'm looking for how to process .spn/.pa2 file using scripting. I tried below suggested way, it is working for .spn / .pa2 span files. But, it is failing while loading .pos file.
1- Getting "Error processing script" while loading .pos file. What could be the reason?
2- How can I create .pos file from my existing .csv or .txt files?
The SpanPosConv from CME works great for that purpose. I use it every day to convert csv's to .pos (xml files).
However, it does not work consistently when going from .pos to csv. I recommend using the functionality in Excel with the proper xml map (xsd) for that.
I trade options on currencies futures. Some month ago 6A was the pair with less margin required so the ROI was the best one. Nowadays when I use the SPAN spreadsheet I can't find any pair. Does anyone know if margin in currencies futures has changed?
Actually, I was just noticing that issue this morning. It seems like the options are now structured like ES with one code for Mar, Jun, Sep & Dec options, another code for the off months, and another code for weekly options.
It'll take me a little bit to change the code to assimilate the new products.
There is some sight modifications to the COption Class Module and MainCalculation Module to add the new currency options contracts for months with no underlying futures contract (Jan, Feb, Apr, May, Jul, Aug, Oct, Nov). Option contracts with underlying futures (Mar, Jun, Sep, Dec) still use the older code.
The new codes are located on the Parameters tab (ADU, GBU, CAU, EUU, JPU).
So, if you were scanning for 6A options with 30-90 DTE on the Scan tab you would have one line with AD and one line with ADU to see if either contract meets your time-frame.
It seems to be working correctly, but there may be some bugs ... just let me know if there are any and I'll try to sort them out.
to @Dudetooth
HI,
some ES contract are displayed on Scan sheet but cann`t work on Track sheet, f.e. EWZ7 P 2565 (I use 05c version of XLS-SPAN). Please see attachment