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

Notification

Icon
Error

Options
Go to last post Go to first unread
anaxos  
#1 Posted : Thursday, November 26, 2009 1:31:28 PM(UTC)
anaxos

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 4/28/2006(UTC)
Posts: 2

I have created an Expert advisor for long entries on a weekly basis LE:=C>Mov(C,30,S) AND Mov(C,30,S)-Ref(Mov(C,30,S),-1) >0; LX:=C <mov(C,30,S) AND (Mov(C,30,S)-Ref(Mov(C,30,S),-1))<0; B:=ExtFml("forum20.latch",LE,LX,0,0); B=1 AND Ref(b,-1) 1; and one for short entries again in a weekly basis SE:=C <mov(C,30,S) AND Mov(C,30,S)-Ref(Mov(C,30,S),-1) <0; SX:=C >Mov(C,30,S) AND (Mov(C,30,S)-Ref(Mov(C,30,S),-1))>0; B:=ExtFml("forum20.latch",SE,SX,0,0); B=1 AND Ref(b,-1) 1; and both show the correct entries on the chart. Now I want to backtest the idea but somehow when I place the same formulas in the system tester things do not work at all. Any help form the experts would be appreciated. Anaxos
mstt  
#2 Posted : Thursday, November 26, 2009 8:46:04 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 anaxos

What more can you tell us apart from "things do not work at all"? Are you setting the periodicity of your data to weekly (the default is daily)? What code are you putting in the four Order windows? What feedback are you getting from the EST? Tell us the sequence of events and where it all goes pear shaped and I'm sure someone will spot the problem.

Roy

anaxos  
#3 Posted : Thursday, November 26, 2009 10:36:44 PM(UTC)
anaxos

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 4/28/2006(UTC)
Posts: 2

I am setting the periodicity to weekly. I checked a couple of times to make sure. Then I Place the box to buy LE:=C>Mov(C,30,S) AND Mov(C,30,S)-Ref(Mov(C,30,S),-1) >0; LX:=C <mov(C,30,S) AND (Mov(C,30,S)-Ref(Mov(C,30,S),-1))<0; B:=ExtFml("forum20.latch",LE,LX,0,0); B=1 AND Ref(b,-1) 1; I place in the box to sell the other set of the equations SE:=C <mov(C,30,S) AND Mov(C,30,S)-Ref(Mov(C,30,S),-1) <0; SX:=C >Mov(C,30,S) AND (Mov(C,30,S)-Ref(Mov(C,30,S),-1))>0; B:=ExtFml("forum20.latch",SE,SX,0,0); B=1 AND Ref(b,-1) 1; The I place in the Sell Short the same SE:=C <mov(C,30,S) AND Mov(C,30,S)-Ref(Mov(C,30,S),-1) <0; SX:=C >Mov(C,30,S) AND (Mov(C,30,S)-Ref(Mov(C,30,S),-1))>0; B:=ExtFml("forum20.latch",SE,SX,0,0); B=1 AND Ref(b,-1) 1; and then I place in the buy to cover the first set of the equations. LE:=C>Mov(C,30,S) AND Mov(C,30,S)-Ref(Mov(C,30,S),-1) >0; LX:=C <mov(C,30,S) AND (Mov(C,30,S)-Ref(Mov(C,30,S),-1))<0; B:=ExtFml("forum20.latch",LE,LX,0,0); B=1 AND Ref(b,-1) 1; After that I run the system starting from JAN 2000 until today on the ES500 or Emini, using points without any stops or any other settings for both (long and shorts) and I get a negative number. Then I look at the chart with the expert advisor on the weekly chart and I calculate the results by hand. The results are obviiously different. I am sure I am making a fundamental mistake somewhere, but I am unable to locate so far. Thanks in advance Anaxos
mstt  
#4 Posted : Thursday, November 26, 2009 11:46: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 anaxos

You are in the best position to check things. I suggest that you look at the Orders report and just pick one trade to start with. Check that the timing and buy/sell prices agree with your expert. If there's a discrepancy on one trade stick with that until you find out why. What you have is not an error by the EST or expert but a difference in timing, price or some related factor. Analyse just one trade and if you can find the reason for difference then then you'll probably find the difference for most other discrepancies as well.

The EST will abort trades if there's insufficient capital to finance the trade. Points Only shouldn't be an issue with your test, but trading with 100% of capital is sure a problem. Delays or the lack of them at appropriate places can also be an issue. You can set a delay in the system editor and you can also Delay order opening when setting up a simulation. Of course you can also use code to set delays.

A problem when comparing a system with two different tools is that the start point of the test can become fudged. I suggest you use a date filter to control when trading starts in the EST rather than using a date in the EST. If you use the EST to set the start date you won't generate any trades until after the inevitable N/A range (getting your indicators up tp speed).

If the above suggestions tell you something but you don't know how to interpret it, bring what you have back to the forum. Fixing this sort of problem requires eliminating a whole series of possibilities until you hit the jackpot. Don't approach the situation like it's a problem with MetaStock because I can guarantee you that it won't be. It will be something that you have done or set up unintentionally or unwittingly. Do be aware, though, that the EST lays a number of traps for the unwary.

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.