[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faking a Limit Order on Current Bar



PureBytes Links

Trading Reference Links

>Alex wrote:
>> I thought there was this "update every tick" feature in TS, 

Gary wrote:
>There is.  But it works for INDICATORS, not for systems.

Ah.  OK.

.[regarding using tick charts and maintaining internal data for interval
bars]

>It's not that bad.  It's a lot easier with the functions 
>available in TS2k and later -- e.g. you don't have to do your own 
>StdDev calculation.  You can just store data points (1-minute 
>closes or whatever) in an array and call the array-based SD 
>functions.  Averages are simple.  You're an experienced 
>programmer, so you'd have no problem with the arrays &etc.

Yes, I can do it.  I just wanted to avoid it.

One other thing I can do, since one of the indicators I'm using for
a trade/no-trade filter is pretty smooth, is to predict what that
indicator will be on the next bar, and if the prediction has an
acceptable value, place a limit order.  Any false entries will be
"nearly correct" because the indicator will be nearly what I predict
in all cases.  There may still be some missed trades, but not as
many as before.

>Wait.  You're saying that for e.g. minute 10:12, you're looking 
>at the High and Low of the 10:12 bar to determine the limit 
>orders in effect for that same 10:12 bar??

No.  For the minute of 10:12, say I'm looking for a sell signal.
I'm waiting for the price to be above a certain level (it may
already be above this level before the bar opens, in which case a
limit order was placed previously and there's no problem).  If,
within the bar, the price does exceed this level, then I place a
limit order to sell at a certain other level, which might be higher
or lower.  If lower, then it's just a market order to sell at the
current price.  If higher, then it's a limit order, which should be
good for the current minute and the next.


>That seems very unstable.  The H/L of your "virtual" 1min bar can 
>change continuously until the close of the bar.  Do you expect 
>your limit order prices to change continuously throughout the 
>bar?

No.  I'm not using the high or low of the bar, just whatever the
current price is during that minute.

The problem arises this way:  I have calculations that identify
sequences of bars valid for a trade.  I have an indicator that
invalidates an otherwise valid bar if the indicator is too small.  I
have another indicator that determines the limit order price.  Now,
if the FIRST valid trading bar in a sequence hits the limit price,
the order won't get filled until the next bar.  It's not a problem
if subsequent valid bars hit the limit price, because limit orders
would have been placed previously.

>If so, then doing it on a 1tick chart is about the only way you 
>COULD do it.  You'd be recalculating your limit orders on every 
>tick that made a new H or L within the bar.  I'd be fairly 
>surprised if something like that really worked and was robust, 
>but I've been surprised before.

Like I said, I want to avoid it.  I'll try it with projecting
indicator values into the future, first.

.[about resolution]
>Obviously that can slow things down.  A lot, in some cases.  E.g. 
>if you run a system on daily bars, but tell it to execute stops 
>at tick resolution, you're doing a LOT more work.  Chances are TS 
>didn't actually hang, but just hung up in a veerrry long 
>operation.

Well, the Task Manager did say "program is not responding."

Thanks.  Your reply, and me composing a reply back, helped me get my
thoughts in order.

-- 
  ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
 // +__>   Director of Research and Development
 //  \ 
 // __)    Unicorn Research Corporation -- http://unicorn.us.com