Greetings --

You may need to use bars with finer resolution.

Any assumptions of the order of any prices other than Open and Close are
unreliable.  Conservative trading system design assumes that prices happen
in the order that is least favorable to the trader.

For any single bar, you know four prices -- Open, High, Low, Close -- and
the time at which two of those took place -- Open, Close.  You have no
information about the timing, or even the relative timing, of the High, the
Low, or any other price.

The possibilities for a single unambiguous trade within a single bar are:
Buy (enter) at the Open, Sell (exit) at a limit or stop price, provided that
price is within the Low to High range.
Buy at Open, Sell at the Close.
Buy at a limit or stop price within the Low to High range, Sell at the
Close.

Note that you cannot Buy at one intrabar price and Sell at another intrabar
price, because you have no information about which happened first.

The possibilities for two unambiguous trades within a single bar are:
Buy at the Open, reverse to Short at a price within the Low to High Range,
Cover at the Close.


Thanks,
Howard


On Fri, Apr 16, 2010 at 3:18 AM, ang_60 <[email protected]> wrote:

>
>
>
>
> --- In [email protected] <amibroker%40yahoogroups.com>, "Pmxgs"
> <pm...@...> wrote:
> >
> > Hello,
> >
> > I also had the same issue and I found that if you choose
> > SetBacktestMode( backtestRegularRawMulti ) AB allows you to do what you
> want, without using Custom backtester.
> > By doing this, as the previous user said "you can never be sure of the
> order of the trades", but if you are willing to accept this assumption it'll
> do what you want.
> >
>
> Hello pmxgs,
>
> I tried your suggestion on the type of system commented here (that is,
> acting on the breakout of the previous bar's range), around this code(these
> are just trials, so I don't care about the chronological order of the
> trades):
>
> "
> SetBacktestMode(backtestRegularRawMulti);
> Buy = Cover= H > Ref(H, -1);
> Sell= Short = L < Ref(L, -1);
> BuyPrice=CoverPrice = Max(O, Ref(H, -1));
> SellPrice = ShortPrice = Min (O, Ref(L, -1));
> "
>
> but I still get just 1 trade per bar.
>
> Are you using some other settings?
>
> If it is not too much pain, could you give just a rough example of an AFL
> code taking 2 trades per bar?
>
> Greetings,
>
> Angelo.
>
>  
>

Reply via email to