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

Notification

Icon
Error

Options
Go to last post Go to first unread
newbie  
#1 Posted : Saturday, October 22, 2005 2:05:04 AM(UTC)
newbie

Rank: Member

Groups: Registered, Registered Users
Joined: 10/6/2005(UTC)
Posts: 26

I have an expert system that sometimes gives out Short Entry signals eventhough my Long position has not been cleared off, ie still active. Is there any way I could get rid of these unwanted signals? For example, my expert system gives out the signals in the following order - BUY ENTRY, SELL ENTRY, SELL EXIT, BUY EXIT. Since my first Long position is still active, I do not want the Expert system to show the arrow for SELL ENTRY and SELL EXIT. How do I remove the SELL ENTRY and SELL EXIT arrows from the Expert System in the above instance? I have checked the FAQ and this section if similar problem has been addressed, but I could not find any query similar to this one. Hope someone could assist me. TQ
wabbit  
#2 Posted : Saturday, October 22, 2005 2:12:20 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 need to have a look at the Forum.dll It contains a latching function that will probably solve you problem. See the downloads section for the latest version. wabbit :D
newbie  
#3 Posted : Saturday, October 22, 2005 9:00:50 AM(UTC)
newbie

Rank: Member

Groups: Registered, Registered Users
Joined: 10/6/2005(UTC)
Posts: 26

wabbit wrote:
You need to have a look at the Forum.dll It contains a latching function that will probably solve you problem. See the downloads section for the latest version. wabbit :D
wabbit, No luck so far in locating such a latch function. Perhaps, you could direct me to such file if you are aware of its location. Anybody could help me here?
StorkBite  
#4 Posted : Saturday, October 22, 2005 4:34:53 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
newbie  
#5 Posted : Saturday, October 22, 2005 10:18:02 PM(UTC)
newbie

Rank: Member

Groups: Registered, Registered Users
Joined: 10/6/2005(UTC)
Posts: 26

g_stockman wrote:
Check the download section: http://forum.equis.com/drm_main.php?mode=drm_cat_view&cat=8ly. I had downloaded the manual and was excited to find that the latch is at the very top of the list. I am hoping this latch would be able to filter out unwanted signals in my Expert system. However, forumDll.[censored] in the above section is for Metastock 9.0 and above and I am using Metastock Pro 8.0. I'll wait for Patrick to come up with a new link for his forumdll 8.0 version.
Bulli  
#6 Posted : Monday, October 24, 2005 4:34:20 PM(UTC)
Bulli

Rank: Advanced Member

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

Hi newbie The link is ready now, Patrik post forumdll.dll for MS8 here: http://forum.equis.com/d..._file_view&cat=7&file=27 Bulli
newbie  
#7 Posted : Thursday, October 27, 2005 5:48:51 PM(UTC)
newbie

Rank: Member

Groups: Registered, Registered Users
Joined: 10/6/2005(UTC)
Posts: 26

Patrick, I have tried the Beta version of forumdll.latch and could not get the signals to match those of Enhanced System Tester. I am trying to replicate those signals shown by System Tester in the Expert System. Basically, I followed the examples given in forumdll.manual but still could not get the signals to match perfectly. Forumdll.latch works perfectly for a LE/LX system OR SE/SX system. But forumdll.latch does not work for a complete system comprising LE,LX,SE and SX (or the way I would like it to behave). Even when I am still having a Long position (LX yet to be triggered), the latch entered me into a short position (SE triggered). I only trade 1 futures market, and I remember when and where all the signals should be triggered. Besides, my signals are quite rudimentary consisting of Linearreg(C,12), qstick(10), ref(LLV(l,3),-1) and ref(HHV(h,3),-1). My knowledge of metastock programming does not allow me to pursue this matter further. It seems to be that forumdll.latch works exactly like "LE and barssince(ref(LE,-1)) > barssince(ref(LX,-1)), LX and barssince(ref(LE,-1)) < barssince(ref(LX,-1)), SE and barssince(ref(SE,-1)) > barssince(ref(SX,-1)), SX and barssince(ref(SE,-1)) < barssince(ref(SX,-1)). Thanks for all your (Patrick) help. The same goes to Jose and wabbit for taking the time to answer some of my queries.
Patrick  
#8 Posted : Thursday, October 27, 2005 5:56:02 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Well that's probably because you used this as your Enter Short Condition : B= -1 and Ref(B,-1)<>-1 Instead use : B=-1 and Ref(B,-1)=0 same applis with the long position: B=1 and Ref(B,-1)=0 If it did not make sense or still did not work please post the actual you are using, it will be a lot easier for us to help you then.
newbie  
#9 Posted : Friday, October 28, 2005 1:00:07 AM(UTC)
newbie

Rank: Member

Groups: Registered, Registered Users
Joined: 10/6/2005(UTC)
Posts: 26

Patrick, TQ for your quick reply and willingness to take a shot at this problem. Anyway, I have tried your new coding for LE and SE, but still failed in one (1) specific area. That is when LE is active (LX yet to be triggered) and SE signal was also trigger, the new coding removes both signals from the Expert system. I include the chart for easy reference and some remarks on the chart. UserPostedImage LONG ENTRY (LE) LE:=C>LinearReg(C,12) AND Qstick(10)>0; LX:=C<Ref(LLV(L,3),-1); SE:=C<LinearReg(C,12) AND Qstick(10)<0; SX:=C>Ref(HHV(H,3),-1); B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B = 1 AND Ref(B,-1) =0 LONGEXIT (LX) LE:=C>LinearReg(C,12) AND Qstick(10)>0; LX:=C<Ref(LLV(L,3),-1); SE:=C<LinearReg(C,12) AND Qstick(10)<0; SX:=C>Ref(HHV(H,3),-1); B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B = 0 AND Ref(B,-1) = 1 SHORTENTRY (SE) LE:=C>LinearReg(C,12) AND Qstick(10)>0; LX:=C<Ref(LLV(L,3),-1); SE:=C<LinearReg(C,12) AND Qstick(10)<0; SX:=C>Ref(HHV(H,3),-1); B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B = -1 AND Ref(B,-1) =0 SHORTEXIT(SX) LE:=C>LinearReg(C,12) AND Qstick(10)>0; LX:=C<Ref(LLV(L,3),-1); SE:=C<LinearReg(C,12) AND Qstick(10)<0; SX:=C>Ref(HHV(H,3),-1); B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B = 0 AND Ref(B,-1) = 1 This code works fine in all areas other than when the Short/Long Entry (1st position) is still active, and the opposite signal (Long/Short Entry - 2nd position) was triggered without the exit taking place to square off the 1st position. With the new coding, 1st position and 2nd position signals were not triggered at all in the Expert System.
Patrick  
#10 Posted : Friday, October 28, 2005 1:26:55 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Fix your short exit : SHORTEXIT(SX) LE:=C>LinearReg(C,12) AND Qstick(10)>0; LX:=C<Ref(LLV(L,3),-1); SE:=C<LinearReg(C,12) AND Qstick(10)<0; SX:=C>Ref(HHV(H,3),-1); B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B = 0 AND Ref(B,-1) = -1 Then test it again and let me know where we are at ... Thanks for the chart that is really helpful :) Patrick :mrgreen:
newbie  
#11 Posted : Friday, October 28, 2005 6:29:07 AM(UTC)
newbie

Rank: Member

Groups: Registered, Registered Users
Joined: 10/6/2005(UTC)
Posts: 26

Patrick wrote:
Fix your short exit : SHORTEXIT(SX) LE:=C>LinearReg(C,12) AND Qstick(10)>0; LX:=C<Ref(LLV(L,3),-1); SE:=C<LinearReg(C,12) AND Qstick(10)<0; SX:=C>Ref(HHV(H,3),-1); B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B = 0 AND Ref(B,-1) = -1 Then test it again and let me know where we are at ... Thanks for the chart that is really helpful :) Patrick :mrgreen:
Sorry, Patrick. I made a typo in the SE conditions. It was actually "B=0 and ref(B,-1)=-1" similar to what you have above. The signals were unchanged - similar to the last chart. The SX and LE where the conditions overlapped are not shown in the Expert system. Any other possible errors that you can think of? Regards
Patrick  
#12 Posted : Saturday, October 29, 2005 2:16:22 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Well by looking at your chart it does not make sense ... It should work just fine ... Could you run a points only test and double check the signals ... Patrick :mrgreen:
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.