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

Notification

Icon
Error

Options
Go to last post Go to first unread
Bulli  
#1 Posted : Thursday, March 12, 2009 8:33:47 AM(UTC)
Bulli

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 9/26/2005(UTC)
Posts: 185
Location: Brazil

Hi,

Is there a way that we can make the system tester revert position, not just close the opened position?

For example:
Simple system: like Moving Average Crossing.

You have a long position open, and when we have a cross to close long, we would close long and open short same price same bar and the other way around.

Best regards,
Bulli
wabbit  
#2 Posted : Thursday, March 12, 2009 6:56:44 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Look for Roy Larsen's excellent post on how to make the EST buy and sell on the same bar.

To summarise it: forward reference one signal by one bar and add a one bar delay, but read his article somewhere here on the forum for the full explanation.


Hope this helps.

wabbit [:D]

Bulli  
#3 Posted : Sunday, March 15, 2009 10:25:11 AM(UTC)
Bulli

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 9/26/2005(UTC)
Posts: 185
Location: Brazil

Thanks Wabbit, and Roy for the trick.

Best regards,
Bulli
Bulli  
#4 Posted : Tuesday, March 17, 2009 7:47:50 AM(UTC)
Bulli

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 9/26/2005(UTC)
Posts: 185
Location: Brazil

Some trades are not happening, I must be missing something.

Here are the formulas I am using, if someone can help please:

Long Entry

LE:= ref(MACD(),1)>0;
LX:= MACD()<0;
SE:= MACD()<0;
SX:= ref(MACD(),1)>0;
B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX);
B = 1 AND Ref(B,-1) <> 1

Strategic Delay 1

==================================
Long Exit

LE:= ref(MACD(),1)>0;
LX:= MACD()<0;
SE:= MACD()<0;
SX:= ref(MACD(),1)>0;
B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX);
B = 0 AND Ref(B,-1) = 1

==================================

Short Entry

LE:= ref(MACD(),1)>0;
LX:= MACD()<0;
SE:= MACD()<0;
SX:= ref(MACD(),1)>0;
B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX);
B = -1 AND Ref(B,-1) <> -1

==================================

Short Exit

LE:= ref(MACD(),1)>0;
LX:= MACD()<0;
SE:= MACD()<0;
SX:= ref(MACD(),1)>0;
B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX);
B = 0 AND Ref(B,-1) = -1

Strategic Delay 1

==================================

Best regards,
Bulli
wabbit  
#5 Posted : Tuesday, March 17, 2009 9:35:51 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
You forgot the forward referencing component, Ref(data, +1).



wabbit [:D]

Bulli  
#6 Posted : Tuesday, March 17, 2009 9:46:44 AM(UTC)
Bulli

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 9/26/2005(UTC)
Posts: 185
Location: Brazil

Thanks Wabbit, but it is in the formula:

LE:= ref( MACD() , 1 )>0;

or it should be some where else?

Regards,

Bulli

Bulli  
#7 Posted : Tuesday, March 17, 2009 10:03:18 AM(UTC)
Bulli

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 9/26/2005(UTC)
Posts: 185
Location: Brazil

Looking at the orders report, I think I got it now, it should be in all the formulas.

Thanks Wabbit.

Regards.

Bulli

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.