Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 4/17/2008(UTC) Posts: 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,
|
|
|
|
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.
|
|
|
|
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;
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 4/17/2008(UTC) Posts: 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,
|
|
|
|
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
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 4/17/2008(UTC) Posts: 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...
|
|
|
|
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
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 4/17/2008(UTC) Posts: 21 Location: Houston, TX
Thanks: 2 times
|
The cross function was given but why cum()?
|
|
|
|
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.