Rank: Advanced Member
Groups: Registered, Registered Users Joined: 9/23/2009(UTC) Posts: 51
|
I have a simple Sell formula in my Expert Advisor as follows:
Cross(Ref(CLOSE, -10), CLOSE)
However, it often generates multiple sell signals. Is there a way to accept the first sell signal and not display any additional sell signals until after another buy signal is given?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 9/26/2005(UTC) Posts: 185 Location: Brazil
|
You need this free DLL, called Forumdll 200 or Forumdll 112
You can download it with the manual that has examples on how to use: http://forum.equis.com/files/default.aspx
Regards, Bulli
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 9/23/2009(UTC) Posts: 51
|
Thanks Bulli for the input.
I have done as you suggested and downloaded the DLL and made sure the functions show up in the indicator list. Having read the manual on how to make a Latch I have come up with the following code:
LX:= Cross(Ref(CLOSE, -10), CLOSE); B:= ExtFml("forum.Latch",0,LX,0,0); B = 0 AND Ref(B,-1)=1;
However, when I put this in my Expert Advisor under the Symbols tab as a Sell indicator I do not get any SELL arrows to show up on price chart whereas the orignal code had multiple arrows. So obviously I am doing something wrong. I have tried to figure it out put as best I understand the manual I am doing what it says to do so I call on your expertise to help me out with the proper solution.
Thanks,
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 9/26/2005(UTC) Posts: 185 Location: Brazil
|
You need to look at the manual again.
It is not showing because your formula is incomplete. Here is an example (just replace with your buy and sell forumla):
Buy Formula ============8<========= LE:= (YOUR BUY FORMULA); LX:= (YOUR SELL FORMULA); SE:=0; SX:=0; B:= ExtFml("Forum.Latch",LE,LX,SE,SX); B>0 AND Ref(B,-1)<=0 ============8<=========
Sell Formula ============8<========= LE:= (YOUR BUY FORMULA);
LX:= (YOUR SELL FORMULA); SE:=0; SX:=0; B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B=0 AND Ref(B,-1)>0 ============8<=========
Best regards, Bulli
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 9/23/2009(UTC) Posts: 51
|
Bulli:
After re-reading the manual again I decided to make an indicator using the example therein. The indicator worked fine. I then played with various variations of the Conditions by changing them and even deleting them and reviewed the results. In this way I started to understand how the Latch works. What I learned was that even though I just want to identify my long exit I still have to put in a long entry and could not just leave it out. I then put the code into my Expert Advisor for the sell signal and it worked.
Thanks for leading me in the right direction and making me figure it out.
Regards,
Alan R.
|
|
|
|
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.