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

Re: ELA Question: Entry as soon as MA xover vs at the close



PureBytes Links

Trading Reference Links

Hello

with respect for the very important points that Gary has mentioned below re:
many indicators are based on the Close of the bar; I too, have been
interested in trying to test systems pending if the open of the next bar (or
at what price) an indicator crossover will be seen. Hence the entry stop.

I've been using a dll with TS4 called nextopen.dll, and have systems with
some success incorporating this, but not based on indicator crossovers,
which I hope to accomplish.

Bob Fulks suggested an option of reverse engineering an indicator. But I am
not 'fit and able' in this department. If anyone has the expertise, and is
willing to reverse engineer say a MACD crossover.........? give my right
arm.

Jon

----- Original Message -----
From: "Gary Fritz" <fritz@xxxxxxxx>
To: <erwilm45@xxxxxxxxx>
Cc: <omega-list@xxxxxxxxxx>
Sent: Saturday, 22 September, 2001 3:09 AM
Subject: Re: ELA Question: Entry as soon as MA xover vs at the close


> > How can I program a system to enter as soon as criteria are met
> > versus close of the bar?  Please see code example below:
> > If Average((H+L)/2,11) > Average((H+L)/2,20) then buy at market;
>
> As Scott Hoffman explained, you CANNOT execute system code in the
> middle of a bar.  Your system code executes ONLY at the close of a
> bar.  The only way to cause position changes intrabar is by using
> stops, and those must be placed on the previous bar.
>
> If you want to act intrabar, you will have to move to a smaller
> timeframe.  E.g. let's say you're currently running on 60min bars.
> You want to buy when the 11-bar avg (using 60min bars) of (H+L)/2
> crosses the 20-bar avg.
>
> You could run your system on 5min bars, and compute the equivalent
> averages at the end of every 5 minutes.  At each 5min close you would
> compute the H and L of the current "60min bar" -- the part of the
> 60min bar that has been built so far with your 5min bars -- and
> compute the average of the previous N-1 "60min bars" (which won't
> change while you build this 60min bar) and the current one.  You'll
> probably have to store the last N bars' H & L in arrays.  Then if the
> current 5min bar has a high enough H to trip your buy condition, you
> buy at the close of that 5min bar.
>
> You could do this for any size bar you want -- run it every 1min, or
> whatever -- to get the time resolution you want.  Heck, you could run
> it on a 1 tick chart if you wanted, but I wouldn't recommend it.
>
> Note, BTW, that executing "intrabar" like this will cause different
> results than if you act only at the end of the 60min bar.  It will
> enter a strong move earlier, which is what you want, but there will
> also be cases where it will enter when an end-of-bar approach won't.
> E.g. if the price goes up intrabar high enough to trip the entry, and
> then turns down and sets a new low before the end of the 60min bar,
> the intrabar approach will be long but the end-of-bar approach
> wouldn't.
>
> Aggregating ticks into bars is an implicit noise-filtering mechanism,
> and it can avoid unwanted trades.  Executing on finer bar resolution
> does NOT always produce better results!
>
> Gary
>