PureBytes Links
Trading Reference Links
|
At 1:06 PM -0400 4/14/98, HBernst963 wrote:
>I wonder if there is any way to get around Tradestation's limitation of only
>allowing buy and sells using Data1. I would like to rank Fidelity or Rydex
>Sector funds and trade the top sector. Does anyone know how this can be done,
>if at all, in Tradestation? Thanks.
>
Below is a message I previously posted to the Omega list on this subject
(on 1/12/98)
Bob Fulks
------------
I built a "system" that switched between 34 securities in TradeStation by
inserting all 34 prices as 34 data series. You then use, for example, a
loop to cycle through the data series.
for Index = 1 to 34 begin
if Close of data(Index) > Close[1] of data(Index) then ...
...
end;
You probably need to make the securities "Hidden" so they don't clutter up
the screen. With this many securities, I couldn't save the workspace as it
said it was too big to save.
Most built-in functions, such as Average, do not work properly since they
are built to sequence through successive bars of a single price. You have
to include the code for the functions you need in-line and use arrays to
save intermediate values for each security. For example, I needed a
function that used the past six values of a variable, so I needed to store
the variable in an array, such as "SValue[34,6]", and sequence through the
values with two loops, one for the 34 securities and one for the past 6
values.
You cannot use the internal buy and sell commands since they only work on
data1 so you need to program your own accounting and print everything using
print statements. You need to include a false buy signal to make the system
verify. I used
"if FALSE then Buy;"
You can, however, use the optimization functions to cycle through a range
of values if you send the results to the print log for manual inspection or
exporting to Excel.
In summary, it is very tricky and not without problems but it can be done
and allows you to use the price data collected in TradeStation.
Bob Fulks
|