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 190,716 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

  #231 (permalink)
CafeGrande
St Paul, MN, USA
 
Posts: 200 since Jan 2014
Thanks Given: 131
Thanks Received: 207


Griffith View Post
Man, this looks cool, but I've spent a couple hours and I just cant get it to work.

After pressing "Download Risk Arrays" i'm just not getting anything in my destination folder.

Any ideas?


Did you double check to make sure the date is correct? It has to be in this format: 20140627

That's Friday. As far as I know, it won't pull in the closest business day, so you have to be precise.

If the download happens, you still won't see any data in Excel's "scanner" tab unless you select one or more (or all) commodities to scan.

You won't see any data in the "tracker" tab unless you've entered the data for one or more options in columns A-E. When you "track all" or "track select" it will then populate columns H-AD. Note: you can hide some of the columns in the H-AD range, if you don't use them.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #232 (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

Anybody have an easy way to enter the Trade Dates on the Historic page? Column A. I have been hand typing them in.

Started this thread Reply With Quote
  #233 (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



ron99 View Post
Anybody have an easy way to enter the Trade Dates on the Historic page? Column A. I have been hand typing them in.

This will list every pa2 file in your data folder in column A:

Sub ListPA2Files()
Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object
Dim ws As Worksheet

Set objFSO = CreateObject("Scripting.FileSystemObject")
'Set ws = Worksheets.Add
Sheets("Historic").Select

'Get the folder object associated with the directory
Set objFolder = objFSO.GetFolder("C:\Span4\Data\")
'ws.Cells(1, 1).Value = "The files found in " & objFolder.Name & " are:"

'Loop through the Files collection
x = 5
For Each objFile In objFolder.Files
If InStr(objFile.Name, "cme") > 0 And InStr(objFile.Name, ".pa2") > 14 Then
x = x + 1
ws.Cells(x, 1).value = Mid(objFile.Name, 5, 8)
End If
Next

'Clean up!
Set objFolder = Nothing
Set objFile = Nothing
Set objFSO = Nothing
End Sub


You could add something like this to the bottom of the download_risk_files routine to add the date every time you download a new pa2:

Range("Historic!A" & lastdate + 1) = CStr(Range("Scanner!G1"))

Hope this helps.

Reply With Quote
Thanked by:
  #234 (permalink)
 mu2pilot 
Dallas, TX
 
Experience: Advanced
Platform: T4, Zaner360, TOS
Broker: DeCarley Trading
Trading: Options
Posts: 104 since Sep 2013
Thanks Given: 134
Thanks Received: 52


Dudetooth View Post
This will list every pa2 file in your data folder in column A:

Sub ListPA2Files()
Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object
Dim ws As Worksheet

Set objFSO = CreateObject("Scripting.FileSystemObject")
'Set ws = Worksheets.Add
Sheets("Historic").Select

'Get the folder object associated with the directory
Set objFolder = objFSO.GetFolder("C:\Span4\Data\")
'ws.Cells(1, 1).Value = "The files found in " & objFolder.Name & " are:"

'Loop through the Files collection
x = 5
For Each objFile In objFolder.Files
If InStr(objFile.Name, "cme") > 0 And InStr(objFile.Name, ".pa2") > 14 Then
x = x + 1
ws.Cells(x, 1).value = Mid(objFile.Name, 5, 8)
End If
Next

'Clean up!
Set objFolder = Nothing
Set objFile = Nothing
Set objFSO = Nothing
End Sub


You could add something like this to the bottom of the download_risk_files routine to add the date every time you download a new pa2:

Range("Historic!A" & lastdate + 1) = CStr(Range("Scanner!G1"))

Hope this helps.

Look at you and your tight object oriented code!

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

For the first time, the two daily files are not downloading and unzipping/extracting themselves. I thought it might be "my" version of PC-SPAN so I downloaded a fresh copy from the first page of this thread and the same thing happened.

Here's what theSPAN data folder looks like today. Note the CME file is not unzipped and it looks like the ICE file was not downloaded at all.

FWIW, I deleted the zipped CME file and tried again for 20140701 ... same result.

Attached Thumbnails
Click image for larger version

Name:	span.PNG
Views:	151
Size:	25.0 KB
ID:	150224  
Reply With Quote
  #236 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,357


CafeGrande View Post
For the first time, the two daily files are not downloading and unzipping/extracting themselves. I thought it might be "my" version of PC-SPAN so I downloaded a fresh copy from the first page of this thread and the same thing happened.

Here's what theSPAN data folder looks like today. Note the CME file is not unzipped and it looks like the ICE file was not downloaded at all.

FWIW, I deleted the zipped CME file and tried again for 20140701 ... same result.

I had no problem today. Maybe just manually unzip the cme file, and grab the ice file from the ftp site, and manually unzip that too, and try again tomorrow.

Maybe you have a hard disk issue (hard disk out of space, for example)?

Follow me on Twitter Reply With Quote
  #237 (permalink)
CafeGrande
St Paul, MN, USA
 
Posts: 200 since Jan 2014
Thanks Given: 131
Thanks Received: 207

Well, whaddya know. A complete shut-down and reboot and now it works fine.

I'll leave the post up in case someone has a similar problem in the future.

The puzzling thing was the partial download over a couple of instances ... computers can make you crazy.

Reply With Quote
  #238 (permalink)
BlueRoo
Brisbane, Queensland, Australia
 
Posts: 121 since Aug 2013
Thanks Given: 75
Thanks Received: 97

CafeGrande,

I have been working on this in a number of different ways. I currently have the track sheet working in a category or group manner. See the screen shot below. The groups here a based different accounts, candidate selection and trade execution.

Considering the Ib risk naviagator I am thinking that such groups could be at a product level or at a product contract. For example; Soyabeans or Soyabeans July and Soyabeans August.

It occurs to me that you may wish to manage the greeks for different months differently. So to lump a trade you have in july with a trade you have in August would be unhelpful.

Thinking about how we can create a portfolio sheet with greeks and portfolio margin with profit/loss should not be too difficult but just getting the structure of the idea right first may be very helpful.

Any ideas or suggestions that you have would be appreciated.


Reply With Quote
  #239 (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


Dudetooth View Post
You could add something like this to the bottom of the download_risk_files routine to add the date every time you download a new pa2:

Range("Historic!A" & lastdate + 1) = CStr(Range("Scanner!G1"))

Hope this helps.

I added this but it doesn't work for me. Can you explain lastdate in that line? My column A is formatted as text. The dates are in the 20140702 format as text not dates.

Started this thread Reply With Quote
  #240 (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



ron99 View Post
I added this but it doesn't work for me. Can you explain lastdate in that line?

Sorry, it should make more sense if you see it in the entire routine. Here's my sub for downloading the pa2 files ... the last block of code adds the new date if it doesn't already exist.

Sub download_risk_files()
On Error GoTo GetOut
Dim RetVal
Dim Batchfile As String
Dim path As String
Dim dateit As Double
Dim namecme As String, namenyb As String
Wait.Show vbModeless
DoEvents
dateit = Range("Scanner!G1").value
namecme = "cme." & dateit & ".s.pa2.zip"
namenyb = "nyb." & dateit & ".s.pa2.zip"
path = Range("Setup!A5").value '"C:\Span4\Data"

SaveWebFile "ftp://ftp.cmegroup.com/pub/span/data/cme/" & namecme, path & "\" & namecme
SaveWebFile "ftp://ftp.cmegroup.com/pub/span/data/nyb/" & namenyb, path & "\" & namenyb

Call UnZip(path & "\", path & "\" & namecme)
Call UnZip(path & "\", path & "\" & namenyb)
Kill path & "\" & namecme 'delete zipped risk arrays
Kill path & "\" & namenyb
Kill path & "\cme.s.pa2" '140215*** added update to cme/nyb file
Kill path & "\nyb.s.pa2"
FileCopy path & "\" & Left(namecme, Len(namecme) - 4), path & "\cme.s.pa2"
FileCopy path & "\" & Left(namenyb, Len(namenyb) - 4), path & "\nyb.s.pa2"

If Range("Setup!A18") = "Delete Dates" Then
If Dir(path & "\cme.s.pa2") <> "" Then 'delete old pa2 files if they exist
Kill path & "\cme.s.pa2" 'delete old pa2 files
End If
If Dir(path & "\nyb.s.pa2") <> "" Then 'delete old pa2 files if they exist
Kill path & "\nyb.s.pa2"
End If
Name path & "\" & "cme." & dateit & ".s.pa2" As path & "\cme.s.pa2"
Name path & "\" & "nyb." & dateit & ".s.pa2" As path & "\nyb.s.pa2"
End If

lastdate = Range("Historic!A" & Rows.Count).End(xlUp).Row '140222*** add dates to hist when downloading new pa2
Dim rng1 As Range
Dim strSearch As String
strSearch = dateit
Set rng1 = Range("A6:A" & lastdate).Find(strSearch, , xlValues, xlWhole)
If rng1 Is Nothing Then
Range("Historic!A" & lastdate + 1) = CStr(Range("Scanner!G1"))
End If

GetOut:
Unload Wait
End Sub

Reply With Quote
Thanked by:




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