PC-SPAN - Options on Futures | futures io social day trading
futures io futures trading


PC-SPAN
Updated: Views / Replies:55,181 / 483
Created: by ron99 Attachments:118

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 118  
 
Thread Tools Search this Thread
 

PC-SPAN

  #21 (permalink)
Market Wizard
Cleveland, OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,717 since Jul 2011
Thanks: 792 given, 4,759 received
Forum Reputation: Legendary

I hate to bother you but my sub does everything down to doing the batchfile and for one second the DOS window flashes on my screen but it doesn't run.

But if I click on the batch file in Windows Explorer it works OK. So it's not the batchfile.

I tried running the batchfile as a separate sub and it still doesn't run. It just flashes for one second.

Sub RunSPANBatchfile()
batchfile = "C:\Span4\Bin\SPANBatch.bat"
RetVal = Shell(batchfile, 1)
End Sub


I am using Excel 2010 with VBA 7.0.

Reply With Quote
 
  #22 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 216 since Sep 2012
Thanks: 26 given, 243 received


ron99 View Post
But if I click on the batch file in Windows Explorer it works OK. So it's not the batchfile.

I tried running the batchfile as a separate sub and it still doesn't run. It just flashes for one second.

I had a similar problem with one of my batch files. I think it is related to the path (I can't find any definitive proof). Most of my batch files were located in the C:\Span4 folder, but I had 2 in the sub-folder C:\Span4\SpanPosConv. The name of the Batch had a space in it and it just flashed the cmd window when I tried to run it in VBA as "C:\Span4\SpanPosConv\SpanPosConv RJO.bat". My other batch files in the C:\Span4 folder had spaces in their name and worked fine when called through VBA.

I removed the space in the name of the batch and was able to call it as "C:\Span4\SpanPosConv\SpanPosConvRJO.bat". I also tried moving the batch to the C:\Span4 folder and leaving the name with the space and that also worked calling "C:\Span4\SpanPosConv RJO.bat".

You mentioned that your batch works fine when you click on it, so it should not be an error in the batch. The name of your batch does not have a space, but it is in a sub folder. I have no idea why it would have issues with the path, but I would recommend moving the batch to the C:\Span4 folder and modify your sub:

Sub RunSPANBatchfile()
Dim RetVal
Dim batchfile as string
batchfile = "C:\Span4\SPANBatch.bat"
RetVal = Shell(batchfile, 1)
End Sub


Hopefully this will take care of the issue.

Reply With Quote
The following user says Thank You to Dudetooth for this post:
 
  #23 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 216 since Sep 2012
Thanks: 26 given, 243 received



ron99 View Post
I'll just not call my format sub. Not that big of a deal.

I was able to get this to work by editing only a few lines of that text that was in the file I upload. Now I can run one sub that can call multiple batch files, wait for each to complete before running the next, and then run additional code. I can walk you through that if you are interested.

Reply With Quote
 
  #24 (permalink)
Market Wizard
Cleveland, OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,717 since Jul 2011
Thanks: 792 given, 4,759 received
Forum Reputation: Legendary


Dudetooth View Post
I had a similar problem with one of my batch files. I think it is related to the path (I can't find any definitive proof). Most of my batch files were located in the C:\Span4 folder, but I had 2 in the sub-folder C:\Span4\SpanPosConv. The name of the Batch had a space in it and it just flashed the cmd window when I tried to run it in VBA as "C:\Span4\SpanPosConv\SpanPosConv RJO.bat". My other batch files in the C:\Span4 folder had spaces in their name and worked fine when called through VBA.

I removed the space in the name of the batch and was able to call it as "C:\Span4\SpanPosConv\SpanPosConvRJO.bat". I also tried moving the batch to the C:\Span4 folder and leaving the name with the space and that also worked calling "C:\Span4\SpanPosConv RJO.bat".

You mentioned that your batch works fine when you click on it, so it should not be an error in the batch. The name of your batch does not have a space, but it is in a sub folder. I have no idea why it would have issues with the path, but I would recommend moving the batch to the C:\Span4 folder and modify your sub:

Sub RunSPANBatchfile()
Dim RetVal
Dim batchfile as string
batchfile = "C:\Span4\SPANBatch.bat"
RetVal = Shell(batchfile, 1)
End Sub


Hopefully this will take care of the issue.

I moved the batchfile to SPAN4. And then copied and pasted your sub. I now get the error that SPANData.dll is not on my computer. I moved the SPANData.dll from the Bin folder to the SPAN4 folder and I still get the same error message.

I have used too much time on trying to get this to work. I need to move on. Your download risk files sub has been a big help thanks.

Reply With Quote
 
  #25 (permalink)
Market Wizard
Cleveland, OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,717 since Jul 2011
Thanks: 792 given, 4,759 received
Forum Reputation: Legendary


Dudetooth View Post
I was able to get this to work by editing only a few lines of that text that was in the file I upload. Now I can run one sub that can call multiple batch files, wait for each to complete before running the next, and then run additional code. I can walk you through that if you are interested.

I may be crazy to try but can you easily do that?

Reply With Quote
 
  #26 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 216 since Sep 2012
Thanks: 26 given, 243 received


ron99 View Post
I have used too much time on trying to get this to work. I need to move on.

I'm sorry that it didn't help. I know the dll file needs to be in the same folder as the spanit.exe. The error makes me think that there might be something in the batch file or span script that might be throwing it off (file name or path of batch that has changed). If you decide later to give it another go, I'll be happy to try to help you troubleshoot.

Reply With Quote
 
  #27 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 216 since Sep 2012
Thanks: 26 given, 243 received


ron99 View Post
I may be crazy to try but can you easily do that?

It's pretty painless.
1- copy all the code from the text file uploaded and paste it above all of your other code in your module.
(all of the "Option Explicit", "Private Declare Function" and "Private Const" lines need to be on top, above all the subs ... if you have any other "Private Declare Functions" they'll have to be moved above the subs as well)

2- edit the "Sub Run_bat()" as needed. It is currently set to run 2 batch files and then call another sub "copy_data_RJO" in my spreadsheet ... just change the name/path of the batch files:
"C:\Span4\SPAN Risk RJO.bat" and "C:\Span4\SPAN RiskRep RJO.bat" and insert code to call other subs as needed.

Attached Files
Register to download File Type: txt Code.txt (3.3 KB, 24 views)

Last edited by Dudetooth; November 17th, 2013 at 08:56 PM. Reason: minor edits
Reply With Quote
 
  #28 (permalink)
Market Wizard
Cleveland, OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,717 since Jul 2011
Thanks: 792 given, 4,759 received
Forum Reputation: Legendary


Dudetooth View Post
I'm sorry that it didn't help. I know the dll file needs to be in the same folder as the spanit.exe. The error makes me think that there might be something in the batch file or span script that might be throwing it off (file name or path of batch that has changed). If you decide later to give it another go, I'll be happy to try to help you troubleshoot.

I got it to work. I changed my SPANBatch from

spanit C:\Span4\Bin\SPANScript.txt

to

C:\Span4\Bin\spanit C:\Span4\Bin\SPANScript.txt

Looks like it needed the full path for spanit.

You mentioning the path made me think of this.

Reply With Quote
 
  #29 (permalink)
Elite Member
Qld, Australia
 
Futures Experience: Beginner
Platform: Excel/Hoadley/PC-SPAN
Broker/Data: OX
Favorite Futures: Options
 
Posts: 28 since Mar 2012
Thanks: 6 given, 39 received

Hi,

You guys will be fully fledged programmers soon!

Do you happen to know an easy way to get the margins on a list of OX symbols such as the following list out of SPAN:

ESZ31400P
ESF41300P
CLF4115C
CLF475P
CLG4120C
NGZ34.15C
NGZ33.25P
NGG45.5C
NGH45.7C
GCG41700C
KCH41600C
SF41060P
SH41600C
ECZ31.405C

I am thinking that simply listing them into a portfolio csv file and loading them up with SpanPosConv (net position of 1 each) and calculating the perf bond req will calculate the margins for each as part of a spread within the portfolio etc - But i am hoping to get just the straight margin for each as if it were traded independently of anything else, like if it was the only position in the portfolio....

Cheers
Scott

Reply With Quote
 
  #30 (permalink)
Market Wizard
Cleveland, OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,717 since Jul 2011
Thanks: 792 given, 4,759 received
Forum Reputation: Legendary


Scott, if you put the symbol in the firm name then you will get the margin for each. That is what I do. See post #14.

SPAN will group the results by firm name with the same acct ID. So everything on the spreadsheet will the same firm name and acct ID will be calculated together to give you margin for all lines of the spreadsheet with that firm name and acct ID.

If you want margin for each contract then put your symbol in the firm name and anything in acct ID.

If you want margin for a spread, Put the same firm name and acct ID for each leg. SPAN will then combine them.

Tip: The spreadsheet must be closed in order to run the SPANPosConv batch. Also blank lines in spreadsheet are ignored.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


This is how it would look if you put them into the SPAN program.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 3 users say Thank You to ron99 for this post:

Reply



futures io > > > > PC-SPAN

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

Dec 7

Linda Bradford Raschke: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Current PC Specs tderrick Tech Support 45 October 28th, 2012 04:40 PM
Any PC Gamers in here? forrestang Off-Topic 61 October 10th, 2012 03:37 PM
Virtual PC setup how? boze man Tech Support 5 September 8th, 2012 04:59 PM
I need PC help Boomer34 Tech Support 5 January 22nd, 2012 03:28 PM
PC Question NMTrader Off-Topic 0 July 12th, 2009 11:56 PM


All times are GMT -4. The time now is 05:47 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-11-20 in 0.08 seconds with 19 queries on phoenix via your IP 54.224.187.45