PureBytes Links
Trading Reference Links
|
Hi Chuck
Here's some code for your file to make importing text
price files into Excel then into Metastock easier.
You can put it on a button or on a new toolbar, or put together a
multicoloured ListBox complete with progress meter. <G>
===================
Sub ImportTextFile()
ChDir "D:\TurtleData\Soybeans"
myFile = Application.GetOpenFilename("Text Files,*.txt")
Workbooks.OpenText _
Filename:=myFile, _
Origin:=xlWindows, _
StartRow:=1, _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=True, _
Semicolon:=False, _
Comma:=True, _
Space:=False, _
Other:=False, _
FieldInfo:=Array(Array(1, 1), _
Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1),
Array(7, 1))
ActiveSheet.Move Before:=Workbooks("SoyBeans_30YrData.xls").Sheets(2)
End Sub
============
Explanation:
ChDir "D:\TurtleData\Soybeans"
[put the address of the folder that you want to open here]
myFile = Application.GetOpenFilename("Text Files,*.txt")
[this opens the Excel "Open Dialog Box" to the address for you to choose
the specific
file that you want to open. Double click on the file or click and press OK]
Workbooks.OpenText _
Filename:=myFile, _
Origin:=xlWindows, _
StartRow:=1, _
[this should be changed if there are rows of junk at the top of the
file]
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=True, _
Semicolon:=False, _
Comma:=True, _
Space:=False, _
Other:=False, _
[many of these are default settings that don't need to be included
... see the VBA help files and use your macro recorder to see if there are
any changes that you should make]
FieldInfo:=Array(Array(1, 1), _
Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1),
Array(7, 1))
[these are the 7 price data columns in the text file]
ActiveSheet.Move Before:=Workbooks("SoyBeans_30YrData.xls").Sheets(2)
[insert name of workbook that you want the file opened into]
[Sheets(2) is the name of the sheet after my index page in the workbook.
Ifind it easier to put the new file at the beginning of the workbook then
move it where I want afterwards.]
Don't ask me what happens if you Shift+click to highlight two or more files
in the Open Dialog box.
Best regards
Walter
----- Original Message -----
From: Chuck Wemlinger <wemlinger@xxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Monday, September 27, 1999 12:46 PM
Subject: Re: Excel 2000 VBa book
| Walter,
|
| I have been watching from the sidelines as Mark Brown is developing his
new
| software called Tradeware. Is is attracting quite a bit of interest from
| the Omega group. Apparently it is a very open architecture program for
| charting that gives the user great ability to customize indicators and
| systems in C and VB. This link may helpful for anyone interested in
| persuing it.
| http://24.0.100.173:5080/twtest1/twcharts.htm
|
| Chuck Wemlinger
|
| ----- Original Message -----
| From: Daniel Martinez <DanM@xxxxxxxxxx>
| To: <metastock@xxxxxxxxxxxxx>
| Sent: Monday, September 27, 1999 6:38 AM
| Subject: Re: Excel 2000 VBa book
|
|
| > Walter,
| > Excel VBa does have possibilities and I do plan to read "Microsoft Excel
| 2000
| > Power Programming with VBa" and "'Special'
| > Edition Using Excel 2000." What I like about Excel, while tracking a
few
| > symbols, is its ability to create custom TA which Metastock cannot. For
| > example, if you wanted to combine more than 2-4 symbols for a custom
| indicator.
| >
| > If you aren't already familiar with true visual programming in VB or
VC++,
| it's
| > probably best you stick with Metastock or Excel VBa. Getting results in
| > programming can be tedious, especially if you're not experienced.
| However, if
| > you truly want to program, EBAY has MS Visual Studio 6 Enterprise for
only
| about
| > $250. This has EVERYTHING. It is huge requiring 8 CD's and includes
VB6,
| VC++
| > 6, J++, and more. If I ever get back into programming, and with the
| > http://www.FMLabs.com product I just might, this is the package I would
| get.
| >
| > For now I will stick with VBa. However, there are 2 drawbacks to Excel
| VBa.
| > First, in order to get 8,785 symbols continually updated realtime in
| Excel, you
| > need the VBa code. The only way to obtain this is to get
BMI/eSignal/DBC
| to
| > cough it up. Without their support, you can pretty much forget it.
| Because
| > Excel is the standard, I'm pretty sure DBC has the code. If I bothered
| them
| > long enough, I think they may actually send it to me. <G>
| >
| > Second, I used Excel VBa to update a small 3 tab spreadsheet consisting
of
| 250
| > symbols via the Net and it was pretty slow. It appears that VBa, as
with
| most
| > other macro languages, is rather slow. You would need some major
| computing
| > power to track even 1,000 symbols. Although considering that Excel is
| > inexpensive (and free if you already have it), this is not really that
| bad,
| > quite good in fact.
| >
| > The only other product I can think of which gives you realtime alerts
| based on
| > programmed criteria is Omega Research's $2400 Radar 2000i. Telescan has
| its
| > $250 ProSearch Alert. However, I believe Telescan's output is at a set
| > interval, not true realtime. I think to get realtime alerts it would
| probably
| > be simpler (and more productive) to use one of these if you can afford
it.
| >
| > Daniel.
| >
| >
| > Walter Lake wrote:
| >
| > > Hi Daniel
| > >
| > > With Metastock being a "cash cow" business (as the MBA's describe it)
| ... no
| > > investment and milk it till it dies, Excel continues to look like the
| only
| > > way to go.
| > >
| > > It looks like all of the "charting" software companies have totally
run
| out
| > > of ideas as to where the next big direction will go. Once the rush to
| > > day-trading (i.e., shorter time frames) is over ... they're dead in
the
| > > water.
| > >
| > > Re: Quotes Plus ... even though I don't use it ... John Fritch at
| > >
| > > http://home.earthlink.net/~jfritch/
| > >
| > > sent me an email that his large workbook posted at the site is only
part
| of
| > > a much larger workbook that he has for QuotesPlus. He'll respond
| directly to
| > > your questions.
| > >
| > > Once memory settles down in price <G> P3-450's etc. should be down to
| > > Celeron prices and with gig chips on the horizon all that you mention
| will
| > > be possible.
| > >
| > > If I don't learn to program, I'm going to get left in the dust ...
| because I
| > > can't count of the charting companies to bail me out.
| > >
| > > Best regards
| > >
| > > Walter
| > >
| > > ----- Original Message -----
| > > From: Daniel Martinez
| > > To: metastock@xxxxxxxxxxxxx
| > > Sent: Saturday, September 25, 1999 11:26 AM
| > > Subject: Re: Excel 2000 VBa book
| > >
| > > I just got "Microsoft Excel 2000 Power Programming with VBa" and
| "'Special'
| > > Edition Using Excel 2000". Both are about 1,000 pages and have a
| CD-ROM. I
| > > recommend both. I think with the first book I'll pretty much be able
to
| > > program whatever I wish into Excel, if I ever actually finish it. One
| > > problem is that it won't show you how to directly access the
| Quotes-Plus2
| > > database or BMI/eSignal RT datafeed. I don't really want to get into
| MSFT
| > > VC++ or VB programming since it would probably take forever to produce
| any
| > > meaningful results.
| > > For those of you who don't know, if you subscribe to BMI via cable,
you
| > > would be able to get unlimited tickers. BMI sends all of the tickers
at
| > > once via cable. Right now the only way I know how to get BMI data
into
| > > Excel is via a DDE link. This limits the number of tickers, I
believe.
| If
| > > you could tap into the BMI feed directly in Excel, you could
| theoretically
| > > track every single ticker on Nasdaq and NYSE. You could then set up a
| page
| > > which would consist of alerts. Of course, you would need a fairly
| powerful
| > > computer to do this. You would need something on the order of a
Pentium
| III
| > > 500 (or greater) with 256 MB's of memory (or more). Nevertheless,
think
| of
| > > the possibilities for profit this setup would create, even if you only
| > > caught a piece of the movement in a stock. The profit potential would
| be
| > > nothing less than incredible. <G>
| > > Daniel.
| > >
| > > Walter Lake wrote:
| > > Hi Guy
| > > A VB baby?? ... Right ... you're installing Visual Studio Professional
| and
| > > I'm struggling away with the "plain vanilla" VB standard version. The
| "Black
| > > Book" sounds interesting however, will have to check it out.
| > > Am totally amazed at the UserForms that can be created using VBA in
| Excel.
| > > They are so easy to make and add "stuff" too ... I can even use
| non-standard
| > > colours like "purple" <G> now that I found the colour codes and the
| colour
| > > palette in the properties section for each UserForm.
| > > Hope that you get unblocked soon. I've heard about those nasty
"blocks"
| that
| > > the old guys at the home develop. <G>
| > > Best regards
| > > Walter
| >
|
|