Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2005(UTC) Posts: 87 Location: perth australia
|
Hi all,
Hope u can help.
If there are 2 signals within a few bars of each other how do you get metastock to choose the earlier signal and ignore the later signal? Both signals are buy signals and there is no sell signal between the 2 buy signals.
My buy signals are reasonably spread apart (>30 bars) but on occasions they are quite close together(<5 bars).It is then that I want the earlier signal to register and the later signal to be ignored
Cheers
Norman
|
|
|
|
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)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2005(UTC) Posts: 87 Location: perth australia
|
Unfortunately there are no sell signals between my 2 buy signals to use the latch. Tried it already but doesn't work.
Cheers
Norman
|
|
|
|
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)
|
Ok...
What you need to do then is ignore new signals if the number of days since the last signal was less than, say, 5....
Try this then....
---8<------------------
x:=C>Mov(C,13,E);
signal:=x and alert(x=0,2);
if(ref(barssince(signal=1),-1)>5,signal,0)
---8<------------------
Let me know if this works for you.
wabbit :D
P.S. Not tested code - just trying to help quickly!
[edit]
... you could proabably have used the latch system with the LE on your buy signal and LX on ref(barssince(LE),-1)>=IgnorePeriod.
bit late now anyway!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2005(UTC) Posts: 87 Location: perth australia
|
Great job wabbit!!
That did it
Cheers
Norman
|
|
|
|
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)
|
Norman,
At your leisure, can you please edit your first post and change the subject to include [RESOLVED]
This way others will know that you have found the solution you are looking for.
wabbit :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Done. Thanks for taking up the cause, Wabbit. :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2005(UTC) Posts: 87 Location: perth australia
|
Sorry, Will do in future
Cheers
norman
|
|
|
|
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.