NexusFi: Find Your Edge


Home Menu

 





PC-SPAN


Discussion in Options

Updated
      Top Posters
    1. looks_one Dudetooth with 218 posts (213 thanks)
    2. looks_two ron99 with 116 posts (55 thanks)
    3. looks_3 CafeGrande with 30 posts (4 thanks)
    4. looks_4 BlueRoo with 24 posts (5 thanks)
      Best Posters
    1. looks_one Dudetooth with 1 thanks per post
    2. looks_two SMCJB with 1 thanks per post
    3. looks_3 ron99 with 0.5 thanks per post
    4. looks_4 BlueRoo with 0.2 thanks per post
    1. trending_up 188,781 views
    2. thumb_up 317 thanks given
    3. group 75 followers
    1. forum 610 posts
    2. attach_file 159 attachments




 
Search this Thread

PC-SPAN

  #271 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


Mo111 View Post
The Track all code worked great!! Thank you! This is going to save me lots of time!

As for the margin for that spread did you mean to say $455 is the correct amount? I got $455 with v4b and $461 with v3.

I apologize. I almost have to re-learn my old code when I go back through it and I got that one messed up.

The issue was in the option value function. It was fine with v3 and v4b was off, but it wasn't just as simple as cut and paste from one to the other (the structure changed), so replace the function optionvalue with the code in the attached text file.

I gave it a quick check and it seemed to work, but let me know if you find any other issues.

Attached Files
Elite Membership required to download: optionvalue.txt
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Are there any eval firms that allow you to sink to your …
Traders Hideout
Deepmoney LLM
Elite Quantitative GenAI/LLM
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
36 thanks
NexusFi site changelog and issues/problem reporting
25 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #272 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,647 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338

Is anyone else having a problem with 10/3 data from CME in @Dudetooth 's spreadsheet? I can get ICE data to work, but not 10/3 CME data.

Follow me on Twitter Reply With Quote
  #273 (permalink)
 ron99 
Cleveland, OH
 
Experience: Advanced
Platform: QST
Broker: QST, DeCarley Trading, Gain
Trading: Options on Futures
Posts: 3,081 since Jul 2011
Thanks Given: 980
Thanks Received: 5,785



kevinkdog View Post
Is anyone else having a problem with 10/3 data from CME in @Dudetooth 's spreadsheet? I can get ICE data to work, but not 10/3 CME data.

The CME file I downloaded for 10/3 works OK in PC-SPAN but I am getting incorrect IMs in Dudetooth's spreadsheet.

Started this thread Reply With Quote
Thanked by:
  #274 (permalink)
CafeGrande
St Paul, MN, USA
 
Posts: 200 since Jan 2014
Thanks Given: 131
Thanks Received: 207


kevinkdog View Post
Is anyone else having a problem with 10/3 data from CME in @Dudetooth 's spreadsheet? I can get ICE data to work, but not 10/3 CME data.

Same thing. The two files download OK and if I "track select" or "scan select" ICE contracts the application works fine. If I include CME contracts the "calculating - please wait" window displays for a long time and eventually Excel will freeze ("not responding") and must be force closed. The Excel detail window called it "AppHangB1"

Reply With Quote
Thanked by:
  #275 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


kevinkdog View Post
Is anyone else having a problem with 10/3 data from CME in @Dudetooth 's spreadsheet? I can get ICE data to work, but not 10/3 CME data.

I don't know if the data is messed up in the zipped file, but it seems to be missing the carriage-return character at the end of the lines (if you open it in notepad, all the data is run together as one continuous line). PC-SPAN must be coded to read the data even without the carriage-return character, but my code looks to read each line.

https://ftp://ftp.cmegroup.com/pub/span/data/cme/cme.s.pa2

Sorry about this, but downloading the cme.s.pa2 has the same issue. What I originally did was open the link in my browser where it was displayed with the line breaks. I copied that and pasted it into notepad and saved it as my pa2. I assumed that downloaded the cme.s.pa2 would work and just realized now that it had the same issue.

Reply With Quote
Thanked by:
  #276 (permalink)
CafeGrande
St Paul, MN, USA
 
Posts: 200 since Jan 2014
Thanks Given: 131
Thanks Received: 207

^^ The revised method worked for me.

- let the whole thing download in a browser window
- CTRL A, CTRL C, open a notepad, CTRL V
- save notepad in SPAN4 > DATA folder, make sure it's saved as "all files" and the correct file extension (.pa2) will magically appear (the default save mode might be .txt, which won't work).

Thanks, DudeTooth!

Reply With Quote
Thanked by:
  #277 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274

A little more clarification on the issue with Friday's CME data.

Normally, the pa2 files have a Windows encoding for line breaks ... the characters CrLf:


Friday's data appears to have had a Unix encoding, using only Lf to designate the line breaks:


PC-SPAN is apparently fine with just Lf, but VBA needs to see the CrLf. This issue appears to have been a big enough of a deal to prompt CME to replace all of Friday's pa2 files with updated ones that have the CrLf encoding in place. This should indicate that we're not likely to see this happen again, but if it does the following code can fix it for you.

In the Functions module add this routine:

Sub FixLf(FileName As String) 'code to replace vbLf with vbCrLf if CME's pa2 files switch to unix code
Dim buff
On Error Resume Next
Open FileName For Input As #1
buff = Input$(LOF(1), #1)
Close #1

If InStr(buff, vbCrLf) = 0 Then
buff = Replace$(buff, vbLf, vbCrLf)
End If

Open FileName For Output As #1
Write #1, buff
Close #1
On Error GoTo 0
End Sub


In the Sub download_risk_files() add these lines right before the end of the sub where you see the line "GetOut:" so your last 5 lines look like this:

Call FixLf(path & "\cme." & dateit & ".s.pa2")
Call FixLf(path & "\nyb." & dateit & ".s.pa2")
GetOut:
Unload Wait
End Sub


You can load this code now if you want. It will check your downloaded pa2 for CrLf encoding. If it is present it leaves things alone, but if it can't find any CrLf it will assume that Lf is being used and change all Lf encoding to CrLf.

Reply With Quote
  #278 (permalink)
 daydayup8 
tennessee/USA
 
Experience: Intermediate
Platform: Quotetracker, TOS
Broker: OX TOS
Trading: ES
Posts: 83 since Aug 2014
Thanks Given: 267
Thanks Received: 8

I am trying to figure out how to use Dudetooth's program to calculate margin without SPAN program installed, when I click the link on the summary page to get Risk array: it is something like this, there is no pa2 anywhere. What I have done:
1: downloaded his latest program: XLS-SPAN(04b)
2: Built a path C:\SPAN4\DATA on my computer

Please help if anyone knows where is the pa2 file, thanks!




Index of /pub/span/data/
Name Size Date Modified
[parent directory]
asxcl/ 10/24/14, 3:35:00 AM
asxclf/ 10/24/14, 1:35:00 AM
bfx/ 10/24/14, 2:05:00 PM
bmdc/ 10/24/14, 6:25:00 AM
bourseafr/ 10/24/14, 1:34:00 PM
bse/ 5/17/14, 12:36:00 PM
cbt/ 8/17/09, 12:00:00 AM
cce/ 4/27/12, 12:00:00 AM
ccl/ 4/27/12, 12:00:00 AM
ccx/ 12/26/13, 12:00:00 AM
cdc/ 10/23/14, 5:14:00 PM
cee/ 10/24/14, 9:31:00 AM
cfe/ 10/23/14, 6:12:00 PM
clearing/ 1/2/07, 12:00:00 AM
cme/ 10/24/14, 11:33:00 AM
cmx/ 4/27/12, 12:00:00 AM
dgc/ 10/24/14, 7:21:00 AM
difx/ 10/23/14, 6:54:00 AM
ecc/ 10/24/14, 12:45:00 PM
elx/ 10/23/14, 6:17:00 PM
eus/ 9/24/10, 12:00:00 AM
hkf/ 10/24/14, 9:08:00 AM
ice/ 10/23/14, 6:21:00 PM
jcch/ 10/24/14, 2:44:00 AM
jsc/ 10/24/14, 1:54:00 AM
kcb/ 12/26/13, 12:00:00 AM
kdpw/ 10/24/14, 12:17:00 PM
kel/ 10/22/14, 11:44:00 AM
lch/ 5/15/14, 6:01:00 AM
liffe/ 10/24/14, 1:55:00 PM
lme/ 10/23/14, 3:52:00 PM
mat/ 10/24/14, 12:40:00 PM
mcx/ 10/24/14, 2:14:00 PM
mcx-sx/ 9/15/14, 11:03:00 PM
mge/ 10/23/14, 4:04:00 PM
micex/ 12/26/13, 12:00:00 AM
nocc/ 12/26/13, 12:00:00 AM
nos/ 5/15/14, 6:01:00 AM
nse/ 10/20/14, 1:21:00 AM
nyb/ 10/23/14, 5:15:00 PM
nyl/ 10/23/14, 5:34:00 PM
nym/ 4/27/12, 12:00:00 AM
nzf/ 12/26/13, 12:00:00 AM
nzx/ 10/24/14, 12:14:00 AM
ocx/ 10/23/14, 6:17:00 PM
ose/ 12/26/13, 12:00:00 AM
pbt/ 2/15/14, 12:00:00 AM
pnx/ 4/27/12, 12:00:00 AM
sdco/ 10/24/14, 7:49:00 AM
sfe/ 12/26/13, 12:00:00 AM
smx/ 10/24/14, 1:35:00 PM
smxcc/ 3/15/14, 12:00:00 AM
taifex/ 10/24/14, 1:55:00 AM
takas/ 10/24/14, 10:15:00 AM
tcc/ 2/12/14, 12:00:00 AM
test_exch/ 10/28/13, 12:00:00 AM
tif/ 10/24/14, 2:04:00 AM
tse/ 3/15/13, 12:00:00 AM
wce/ 10/23/14, 4:05:00 PM
xeu/ 9/24/10, 12:00:00 AM
xma/ 10/23/14, 8:49:00 PM
xny/ 10/23/14, 6:17:00 PM

Reply With Quote
  #279 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


daydayup8 View Post
I am trying to figure out how to use Dudetooth's program to calculate margin without SPAN program installed, when I click the link on the summary page to get Risk array: it is something like this, there is no pa2 anywhere. What I have done:
1: downloaded his latest program: XLS-SPAN(04b)
2: Built a path C:\SPAN4\DATA on my computer

Please help if anyone knows where is the pa2 file, thanks!

daydayup8,

Did you grab the XLS-SPAN from post #2? I lost track, but I know that I did get the latest patched file linked on post #2.

Did you go through the instructions on the Setup tab? Section 2 covers downloading the pa2 files. All you need to do is enter the date (YYYYMMDD format, like 20141024) in cell G1 on the Scanner tab and then click the Download Risk button. It goes out and finds the right web address and downloads the pa2 files to your C:\SPAN4\DATA folder.

Once that is done then you can scan for trades or enter positions on the Tracker tab to follow their progress from day to day. I think that the Setup tab instructions cover all of that and there should be some example positions on the Tracker tab to show you how to set them up.

I hope this helps ... if not, just let me know.

Reply With Quote
  #280 (permalink)
 daydayup8 
tennessee/USA
 
Experience: Intermediate
Platform: Quotetracker, TOS
Broker: OX TOS
Trading: ES
Posts: 83 since Aug 2014
Thanks Given: 267
Thanks Received: 8


Yes, I printed out the Setup tab and did as told step by step, but nothing came out except something like program flashing/shining then disappeared from my screen, it was fast and I could see what was that.
I am not good at computers/codes, I've finished reading this whole thread and tried to understand what you guys were talking about, most of posts are pretty hard to understand. Luckily and thanks to your hard work, there is a program to use without installing PC SPAN, but I just could use it. Frustrated...


Dudetooth View Post
daydayup8,

Did you grab the XLS-SPAN from post #2? I lost track, but I know that I did get the latest patched file linked on post #2.

Did you go through the instructions on the Setup tab? Section 2 covers downloading the pa2 files. All you need to do is enter the date (YYYYMMDD format, like 20141024) in cell G1 on the Scanner tab and then click the Download Risk button. It goes out and finds the right web address and downloads the pa2 files to your C:\SPAN4\DATA folder.

Once that is done then you can scan for trades or enter positions on the Tracker tab to follow their progress from day to day. I think that the Setup tab instructions cover all of that and there should be some example positions on the Tracker tab to show you how to set them up.

I hope this helps ... if not, just let me know.


Reply With Quote




Last Updated on September 23, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts