Baskets in TradeStation

Discussion in 'Automated Trading' started by garchbrooks, Mar 8, 2010.

  1. Is there any intelligent way to do this in TS's language in one fell swoop, or a way to make a shortcut? And make the basket have a mixed setup, like +100 shares of A, -200 of B, 31337 shares of stock C, etc?

    Say my code messes up, or I want to unwind just a fraction of a basket. That's why I want this ability.
  2. Baywolf


    Are you familiar with the basket order tool? You would need two baskets, one for long entries, one for short entries.

    You can also execute from the commandline too. See the help file for .executebasket command.

    As far as doing this from EL logic, I think you can only run a script on one instrument, so you would need to open an array of Chart Analysis windows, which is what I used to do before I started using the basket order tool.
  3. Hey, this was really helpful, and quicker than tech support. Thank you ever so much.

    Since this is ET, and no thread can go without a flamewar:

    l0l u r a d00d00 he4d im gonna make m0re m0ney th3n u n0w.

    (Ahem -- No really, thank you!!)
  4. Baywolf


    NP d00d. Just be sure if you are using market orders to wait until the market is open a little bit and not exactly 9:30 to hit the send order button. Better yet, use limit orders.

    I had a NYSE stock in my friday basket, and I got filled like 3 std dev's above the VWAP. Apparently the specialist didnt open the book until ~9:33 on this particular stock. Drunk ass.

    Baskets are just dumb orders. Oh how I wished TS had a way to execute easy language logic on a basket of instruments.
  5. Yes, I learned this lesson a few weeks ago. Any profit you think you'll get from trading baskets off the open just won't happen with Tradestation. I've restricted the time-frame to "sane" hours, because the information off the open might as well be considered "trash" because of all the HFT activity and the delay time getting the information to you.

    How do you backtest with baskets? Run each stock, then merge everything into a single spreadsheet? The "save" feature from the backtest reports puts the data into multiple columns that can get annoying to parse/merge. Do you have a tool that can somehow work around this issue?

    Oh, since you seem to know: how do I do a direct, open-only order to the NYSE from easy language? Is that even possible?
  6. Baywolf


    Actually the bulk of my profits are made on the open. The whole reason I use baskets are because I'm unable to enter orders fast enough to catch the opening rush (I am only one man!)

    If you are talking about backtesting a technical analysis strategy on a portfolio of stocks, you can use multicharts. They have a good portfolio tool. I've requested two portfolio features that they add, and both made it in to the version 5.0 of multicharts. Great software company. Well worth the price for just the portfolio backtest tool. Their reporting looks similar to that of TS, but im not clear of the columns issue you are talking about.

    I don't know if its possible to select the ECN from easylanguage. Does it matter though since TS doesn't pass on ECN rebates?

  7. I don't know the official mechanics of TradeStation, but I have a feeling "intelligent route" orders are not so intelligent. For example, say ARCA, INET, and NYSE all show depth of 100, 200, and 300 (respectively) at price level X, where you want to put your order out. The logical choice is to stuff it where the queue depth is the smallest on the NBBO system (at least, I think so -- and even if one venue is worse than another one, having priority gives you some assistance as the price moves past your level.)

    However, TS doesn't actually book the order in the best location for a fill. I think it sends it off to someone who pays them for orderflow, and it takes a while for you to get filled. So even if the price touches your level (and in some cases exceeds), some idiot firm out there may not give you the fill right off the bat. It took me 30 seconds to get a fill once, even as the NBBO passed my price level. I was fuming, but did eventually get the fill. I literally was seeing prints go off 2 cents past my level, and somehow TS was still sitting there telling me I had an "intelligent" order to remove out there.

    I'm wondering if the solution is to just outright specify a route.