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

RE: timed exits - anyone know how?



PureBytes Links

Trading Reference Links

Alex,

Thanks for the response! Your suggestion is nearly identical to what I
have in my code so I'm baffled.

What actually happens in testing does not make sense to me. I have a
very large target for the entry bar in order to allow it the price to
move as much as possible for one bar interval, then on the open of the
next bar the target is reduced to one tick. 

In the backtest, if the price moved in my favor by any amount then
reversed, rather than showing a fill at a profit or loss on a subsequent
bar the strategy shows a fill at the best possible price of the opening
bar...
I have tested with "look inside bar" enabled and disabled. 

Data1 is a 3 minute interval and Data2 is a one minute interval. In real
time I get fills as expected except when the second bar is also an entry
bar for a new position, in which case both the position from the prior
bar and the position from the current bar are exited at the smaller
target. The same occurs in backtesting.
 
I have posted a screen shot of a portion of today's chart at
www.anywayproductions.com/chart.gif as an illustration. 


Thanks for your help, I greatly appreciate it.
 

> -----Original Message-----
> From: Alex Matulich [mailto:alex@xxxxxxxxxxxxxx]
> Sent: Monday, August 11, 2003 9:11 PM
> To: omega-list@xxxxxxxxxx
> Subject: Re: timed exits - anyone know how?
> 
> Alexander:
> 
> >Does anyone know how to do the following?
> >
> >if the current bar is the entry bar and condition A is true then
> >setprofittarget (x)
> 
> if BarsSinceEntry = 0 and conditionA = true then setprofittarget(x);
> 
> >if the current bar is the entry bar and condition A is false then
> >setprofittarget (y)
> 
> See above, make appropriate changes.
> 
> >if the current bar is any bar beyond the entry bar then
> >setprofittarget (y)
> 
> if BarsSinceEntry > 0 then setprofittarget(y);
> 
> >I use momentum of data2 (on a shorter timeframe of the same symbol)
> >to determine condition A.
> 
> conditionA = momentum(Close of data2, length);
> 
> >All my various attempts have generated excellent backtest results
> >that would not hold true AT ALL in real time trading...
> 
> Have you set the commission and slippage for your strategy?
> 
> --
>   ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
>  // +__>   Director of Research and Development
>  //  \
>  // __)    Unicorn Research Corporation -- http://unicorn.us.com