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

Notification

Icon
Error

Options
Go to last post Go to first unread
rasj  
#1 Posted : Monday, September 2, 2013 8:22:09 PM(UTC)
rasj

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/17/2008(UTC)
Views messages in topic : 21
Location: Houston, TX

Thanks: 2 times

I am trying to plot unbroken gaps but because GapUp() / GapDown() is a True/False statement I'm having a hard time getting any useful plots.

I've concentrated my effort around LowestSince() and ValueWhen() but both of these use Nth as a part of their formula. This gives me a problem due to the fact that I don't know - and never will know - which gaps a correction takes out. So I might have a chart with 2 unbroken gaps out of 7 gaps total and they don't even have to be the last two gaps...

Thanks,

MS Support  
#2 Posted : Thursday, September 5, 2013 1:17:22 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
Currently, the MetaStock formula team is not aware of a way to do this. It is their opinion that this would require an external function DLL.
henry1224  
#3 Posted : Sunday, September 8, 2013 7:26:13 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Code:


Gap resistance

rng:=Abs(H-L);
GS:=If(GapUp(),L-Ref(H,-1),If(GapDown(),Ref(L,-1)-H,PREV));
A:=If(GapUp()=true AND GS>rng*.7,(L-Ref(H,-1))*.5+Ref(H,-1),If(
GapDown()=true AND GS>rng*.7,(Ref(L,-1)-H)*.5+H,PREV));
A;


rasj  
#4 Posted : Sunday, September 8, 2013 10:14:02 PM(UTC)
rasj

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/17/2008(UTC)
Views messages in topic : 21
Location: Houston, TX

Thanks: 2 times

Dear Henry1224,

Unfortunately your solution doesn't solve my problem as it still shows all gaps also those that's closed out.

Sorry,

henry1224  
#5 Posted : Monday, September 9, 2013 4:31:02 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Robin, My indicator only shows gaps that are 70% or larger than the range of the bar .
Gap up or gap down will show all gaps. This will occur even if the gap is 1 cent.

The value that my indicator plots is the middle of the gap
rasj  
#6 Posted : Tuesday, September 10, 2013 10:02:51 AM(UTC)
rasj

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/17/2008(UTC)
Views messages in topic : 21
Location: Houston, TX

Thanks: 2 times

Henry, your indicator is a good one but right now the main goal is to identify gaps that hasn't been taken out by a close no matter what the size of the gap is. When I solve this problem I can then move on to the size of the gap.

So how do I identify gaps that hasn't yet been taken out by a close?

Right now (and despite of MetaStock's feedback) I am playing around with the Alert() and Barsince() functions...

henry1224  
#7 Posted : Tuesday, September 10, 2013 2:26:38 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
I would use the cross function and Cum function
rasj  
#8 Posted : Sunday, September 22, 2013 6:02:39 PM(UTC)
rasj

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/17/2008(UTC)
Views messages in topic : 21
Location: Houston, TX

Thanks: 2 times
The cross function was given but why cum()?
henry1224  
#9 Posted : Monday, September 23, 2013 6:24:51 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Cum(Cross(C,"Gap value"))=0
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.