How to fill trades with my specified price?
Author: wbzhang
Creation Date: 11/18/2011 3:40 PM
profile picture

wbzhang

#1
I am backtesting some strategies, with daily bars. I just want to simulate the trades entering at the average of Open and Close prices, e.g., (open+close)/2. That definitely achievable.

I tried to use buyAtLimit or buyAtStop to do this, however, both of them are not exactly what I want. Both buyAtLimit and buyAtStop sometimes fill the trade with open prices, sometimes with my specified average prices. I just want to fill trades either exactly with my specified prices, or without filling my trades, how to do that?
profile picture

Eugene

#2
You might want to give this a try:

EnterAtPrice
ExitAtPrice

Requires installed Community.Components library.
profile picture

wbzhang

#3
Thanks.

Unfortunately this requires WL 6.2. Now I am using WL 6.1 since there are some known bugs with NamedSeries which makes lots of problems for "single symbol simulation".
Do you know whether this problem has been fixed in Wl 6.2? thanks.
profile picture

Eugene

#4
This problem was introduced in 6.2 and hopefully, will be fixed in 6.3.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).