PureBytes Links
Trading Reference Links
|
A small addition, set up (add) a "virtual" printer : "Generic /
text only"
and direct its output to "file".
Now anytime you select it as the printer ("Print Setup"), and
click print
(in any application), a window will pop-up asking for the file
name
(make sure you specify the path too, you may save yourself having
to look
for a long time for the "missing file").
Joseph Biran
________________________________________________
-----Original Message-----
From: Bob Fulks [mailto:bfulks@xxxxxxxxxxxx]
Sent: Friday, March 05, 1999 6:23 AM
To: Massimo
Cc: omega-list@xxxxxxxxxx
Subject: Re: Data with best performance
At 5:29 PM -0500 3/4/99, Massimo wrote:
>I need an indicator that help me to find , in a custom data
list, the
>symbols with the best performance ( in % ) in the last X days ,
and sort
>all the symbols by performance ( with an alert ?) ; there is
someone that
>can help me ?
This cannot be done in TradeStation as it cannot sort symbols.
But you can
do the calculations in TradeStation for each symbol in your
custom data
list, using the ChartScanner if you would like, and print or
write to a
file, a one-line summary for each symbol.
You can then open this summary file in Excel and sort any way you
want.
Something like the following code should give you the idea. (I am
away from
my TradeStation system so cannot check the syntax of these
statements.
Create as an indicator:
Input: X(5);
Vars: PctGain(0);
if Close <> 0 then PctGain = 100 * (Close - Close[X]) / Close;
if LastBarOnChart then
Print(",", PctGain:4:3, ", ", GetSymbolName ", ");
if FALSE then Plot1(0,"Dummy");
You can see that I added commas to allow you to easily import the
data into
Excel using the comma-delimited input parsing. It is best to put
the symbol
name at the end of the line as it has a variable number of
characters.
You need to add to your "print setup" some simple character
printer driver.
I use the Epson LQ-200. Then set this to print to a file. I can
then tell
TradeStation to "Print" to that printer (using the "Print Setup"
dialog, so
that it will send a stream of ASCII characters to a file. It asks
you to
name the file. (I got this printing tip from Sam Tennis of Vista
Research.)
I added a comma at both the beginning and end of each line
because the
print driver adds some control characters at the beginning and
end of some
lines. This allows me to just not import these "columns" of junk
into
Excel. You need to set you print log to accept as many lines as
you expect
under "Tools - Options - General" in TradeStation". The maximum
is 750
lines.
You can write the line to a file instead of the print log but I
have found
that this is much slower.
The Plot statement is there to keep TradeStation from thinking
you forgot
to plot your output. It does nothing.
Hope this is helpful.
Bob Fulks
|