Discussions
»
Product and Service Development
»
MetaStock
»
incorporating dynamic slippage in to trading simulations
Rank: Newbie
Groups: Registered, Registered Users Joined: 2/16/2010(UTC) Posts: 1
|
Hi, I define slippage as follows : Buy/Short cover @ (OPEN + HIGH)/2 Short sell/long sell @ (OPEN + LOW)/2 How can I incorporate these in to trading simulations ? standard slippages option available in Metastock are either a % of price or flat rate. Thanks, Hydril
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Hydril
One way to achieve this is to use the Limit order type instead of the Market order type. Your Buy Order would remain as a conventional binary signal (TRUE to signal an entry, otherwise FALSE), and your Limit or Stop price would use the same code but multiplied by the required price (Signal*Price).
Any delay used must be built into the Buy Order code with Ref() rather than applied as a Strategic Delay or as a Delay order opening in the simulation. This ensures that you don't evaluate the trade at one price and try to execute it at a different (and unavailable) price on the following bar.
In the event that HIGH is equal to OPEN you might still find that the occasional trade is cancelled, ostensibly because the purchase price is outside the H/L range for the day. I have a theory on why this happens but having a theory doesn't fix the problem (my thinking is that MS uses single digit precision while the EST uses double digit precision and that this opens up the possibility of looking at the same value and getting two different anwers). Nevertheless what does work is making a tiny adjustment to the purchase price such that it falls just inside the H/L range. A very small change prevents the EST from deciding that H<>H without making any significant difference to test results.
I hope this helps.
Roy
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
MetaStock
»
incorporating dynamic slippage in to trading simulations
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.