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

Re: Backtest ideas ?



PureBytes Links

Trading Reference Links

Sudhir,

>   I am testing a strategy on forex data. The strategy works
>in short term (15 min bar) so the prices of entry and exit are
>calculated and limit orders are placed on next bar. The problem I
>am facing is the limit price can be highest or lowest of the next
>bar.  Since the price did not cross my limit price there is no
>guarantee of the fill.

Limit orders don't work that way.  The price doesn't need to cross
your limit price.  Touching your limit price is sufficient.

Here's a quote from the TS2000i EL reference manual.  Note the
phrases "at or under" and "at or over."

"The statement 'Buy next bar at 100 limit' opens a long position
during the next bar at the first price available at or under 100.
Similarly, the statement 'ExitShort next bar at 50 stop' closes a
short position during the next bar at the first traded price at or
over 50. It is possible for stop and limit orders not to be filled
(i.e., price never reached); in this case, the orders are canceled
at the close of the bar."

>   To test this now I want to check that on the bar where I am
>entering / exiting the price did cross my limit price and high /
>low was more / less atleast by 1 pip . IF it didn't then I dont
>want to take it as valid entry or exit and then system should look
>for entry / exit on next bar.

According to the manual, you don't need to check for crossing.  If
the price either touches or crosses your limit price, the order will
be filled.

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