PureBytes Links
Trading Reference Links
|
Hi Scott
I'm going to offer a few thoughts on timing which I think are not only relevant to the
System Tester, but should be applied to coding for all MetaStock tools. Some people
won't agree with me, and that's fine. Personally, I can't see into the future, and the
perspective I take when coding is in line with my inability to see what's going to happen
tomorrow.
Rather than say, "If today's close is higher than yesterday's close, then tomorrow
morning buy at market", I'd phrase it "If yesterday's close is higher than the day before's
close, then buy at market today". The code for that is Ref(C>ref(C,-1),-1), and then
there is no delay between the order being considered and executed.
One of the traps with the System Tester is that when a trade is considered for a Buy, the
System Tester calculates the shares to be purchased based on current prices. It doesn't
look ahead to tomorrow's data, and when tomorrow is available there's a good chance
that there will be insufficient money to execute the trade. The number of shares to be
bought was based on the wrong bar of data.
Whenever possible,make sure your entry signal is active on the bar you want to take the
trade. In all likelihood the best way to delay the signal is to use Ref(signal,-1) as part of
your Buy code. There are VERY FEW occasions when either strategic delays or a
simulation entry delay should be used, and that's because they prevent the signal and the
entry from happening on the same bar. There's an exception for "same bar" entry and exit,
but I won't go into that right now.
When using limit or stop prices it's even more important that the signal is coincident with the
intended entry bar. If you create a price signal today for something that's going to happen
tomorrow, how on earth do you know that the price you've set will be within the high/low
range for the next bar. You don't. OK, in real trading you might prepare for certain
eventualities, but you can't take action until tomorrow unfolds. In MetaStock it's entirely
unnecessary to take any action until all the data is available. Such an approach makes for
fewer timing issues to be resolved.
Keep your perspective with MetaStock in the present and looking back to the past.
Do not use strategic or entry delays, but rather set up your code to include any necessary
delays.
Make sure each trade is considered and executed on the same bar. A price change for
the next bar is probably the biggest single cause of trades being missed because of insufficient
funds.
For more detailed information you should read Tom Sprunger's document on the Enhanced
System Tester. It's in the files section and it's free.
I'm part way through a series on the System Tester in the MetaStock Tips & Tricks newsletter
that would probably also be of help. Sadly it's not in the files section, and it's not free either.
Kind regards
Roy Larsen
www.metastocktips.co.nz
Free formulas and MS links
----- Original Message -----
From: "meta_scott" <no_reply@xxxxxxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Tuesday, March 22, 2005 6:05 AM
Subject: [EquisMetaStock Group] Timing of Order types in system tester
>
>
> Hello,
> I am finding the timing of events in the System Tester to be
> confusing. Let me walk through a simple example and please set me
> straight on the translation.
>
> Enter Long Formula = C>ref(C,-1) (order type market)
> Translation = If today's close is higher than yesterday's close, then
> tomorrow morning buy at market
>
> Enter Long Formula = C>ref(C,-1) (order type buy stop at "H+.25")
> Translation = If today's close is higher than yesterday's close, then
> buy tomorrow, if tomorrow's price gets to today's high + .25
> (correct?)
>
> Close Long Formula = C<ref(C,-1) (order type market)
> Translation = If today's close is less than yesterday's close, then
> tomorrow morning sell at market
>
> Close Long Formula = C<ref(C,-1) (order type sell stop at "L-.25")
> Translation = If today's close is less than yesterday's close, then
> sell tomorrow if tomorrow's price gets to today's low - .25
> (correct?)
>
> Thank you,
>
> Scott Park
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
>
> --------------------------------------------------------------------------------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/equismetastock/
>
> b.. To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|