[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

Gary:

>> Maybe I could have the 1-minute bars in data2 and pure ticks in
>> data1?
>
> Yes, you could do that.  Use the 1min bars to do your
> calculations, assuming you need to do that.  Your system will get
> called on every tick, so you can act as fast as you need to.

I thought there was this "update every tick" feature in TS, but it's not
much good if the value of "close" doesn't mean "most recent tick in the
bar."  If that worked, I could do market orders intra-bar.

Yes, I need to do the calculations on 1 minute bars.  I'd do it on ticks
if it was possible to do calculations like average and StdDev over
time-lookbacks rather than bar-lookbacks.  (I'm sure it's possible, but
not easily implemented, and probably too slow once implemented.)

>>  "if next bar high > next bar value1 then buy at xx limit"
>
> No, I think you can only look at the OPEN of the next bar.

Ah.  Makes sense.

> Why wait until the data comes up?  Just issue the order on every
> bar until it's filled or cancelled.  Or, since you're going to do  it on
> a 1tick chart anyway, who cares about limit orders?  You
> can do it yourself with market orders.  When Close < LimitBuy
> then buy, when Close > LimitSell then sell.

I can't do that because the limit levels change on every bar, and the
filter which determines whether a bar is "valid" for trading depends on
the spread between the high and low limit levels for buying and selling,
which changes every bar.  Therefore I can't know whether an order should
be placed until I'm looking at the bar as it forms.

Most of the time a limit order works, because the order will get generated
on a valid trading bar which didn't reach the limit price; then if the
next bar reaches the limit price the order is filled.  The problem occurs
when an order should be filled on the *first* valid trading bar in a
sequence.  This is something a human can trade, but not TS, at least not
on 1-minute bars.

I guess trading on the tick chart is the way to go.

In my strategy settings, I noticed a "resolution" option which was
un-checked.  No idea what it does.  I enabled it and selected "tick"
resolution, thinking it would provide a cure for my problem.  It froze up
TS.  I had to ctrl-alt-delete to terminate it.

-Alex