logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
pansariamit  
#1 Posted : Wednesday, November 9, 2011 10:12:34 PM(UTC)
pansariamit

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/10/2011(UTC)
Posts: 2

I want to use the system tester for intrday day trading only. Currently it carryovers the position and closes only at the last candle within the specified date range. Can anyone help pls. Regards
MS Support  
#2 Posted : Monday, November 14, 2011 4:14:46 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,967

Thanks: 93 times
Was thanked: 156 time(s) in 151 post(s)
you will need to add a condition to your exit signals to close the trade on your normal signal OR if a specific time is reached. Alternately, instead of using a time, you could use Ref() with a positive number to look that many bars in the future to see if a new day will start and then trigger the exit. for example, to generate an excite signal 2 bars from end of the day, use:

Ref( DayofWeek(), 2) <> DayofWeek()

pansariamit  
#3 Posted : Wednesday, November 23, 2011 7:30:06 PM(UTC)
pansariamit

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/10/2011(UTC)
Posts: 2

Thanks for your response, but when I am not getting results by doing the same. I'll quote example: I am using simulation for 'Turtle Breakout1" Buy Order H>Ref(HHV(H,20),-1) Sell Order L<ref(LLV(L,10),-1) Buy to cover order H>Ref(HHV(H,10),-1) and Ref( DayofWeek(),15) DayofWeek() Sell short order L<ref(LLV(L,20),-1) and Ref( DayofWeek(), 15) DayofWeek() When i run the simulation my buy/sell orders dont get closed on the same day rather it goes upto next day. I want all my trades to close on the same day itself. Please advise
MS Support  
#4 Posted : Monday, December 5, 2011 9:29:45 AM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,967

Thanks: 93 times
Was thanked: 156 time(s) in 151 post(s)
I need to clarify my previous response. I wrote it assuming you were testing intraday data. If you are running the test on daily data, it requires a completely different approach.

If you are testing on intraday data, please send the summary, orders, and system tabs of your test to our formula team: formuals@equis.com

They will examine the reports and can tell you why you are not getting the same day exits and how to adjust the test so you do.
mstt  
#5 Posted : Monday, December 5, 2011 1:07:14 PM(UTC)
mstt

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 Pansariamit

Here's an excerpt from the February 2005 issue of the MetaStock Tips & Tools newsletter (MSTT).

".. persuading the Enhanced System Tester to enter and exit trades on the same bar requires a little sleight-of-hand. Oddly enough, it’s the much-maligned forward reference that makes same-bar trades possible.

The trick is to use a forward reference to advance entry signals by one bar, and leave the exit signals untouched. This ploy forces the System Tester to consider each entry signal one bar before the exit signal goes active. Price signals for entries must also be advanced by one bar when used. The advanced signals are retarded back to the proper timing by adding a one-bar delay. The "Strategic Delay" setting should be used to achieve this. Using the "Delay order opening" setting under the Trade Execution tab doesn’t appear to work."

The principle is very simple even if grasping how or why it works isn't quote so easy. Under normal circumstances the EST cannot enter and exit a trade on the same bar. However, by fooling the EST into looking at the entry one bar prior to the exit ( i.e. one bar into the future with Ref("Buy Signal",+1) ) the impossible becomes possible. Once the EST has "considered" the entry a Strategic Delay cancels out the forward reference applied to the Buy Order formula and executes the entry on the correct bar.

Roy
haddison  
#6 Posted : Tuesday, December 6, 2011 2:35:14 PM(UTC)
haddison

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/6/2010(UTC)
Posts: 113
Location: London

Hi Roy,

Does this trick work when trading with 100% Equity? I tried it, but I get "Cancelled - open cost". I understand what this error means. I haven't had it for years because I know how to write code to avoid it, but because of the Strategic Delay, I didn't have a choice.

I get the impression that this trick doesn't work under all conditions (I hope I am wrong).
mstt  
#7 Posted : Tuesday, December 6, 2011 5:53:18 PM(UTC)
mstt

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 Haddison

Apparently not. To my mind the solution to the open cost problem is simple. Double the account size and set EST to use 50% of available capital. However I'm sure that wouldn't be everyone's first choice for a solution

Another way to go might be to use Limit orders for the entry. This appears to work when the same forward reference is applied to the Limit price window.

Roy




Users browsing this topic
Guest (Hidden)
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.