Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 9/16/2009(UTC) Posts: 2
|
I have a situation where I think Outside() function is not working properly.
Take a look to this picture: http://screencast.com/t/NvwForxH3ps
On my opinion is an outside day, but Metastock fails to compute this. I ploted Outside day as an Indicator and Outside() equals 0. Why is that?
Bellow I placed the Outside day function definition.
SYNTAX outside()
FUNCTION Plots a "+1" when an outside day occurs. An outside day occurs when today's high is greater than the high for the previous rally or reaction day and today's low is less than the previous rally or reaction day's low. A range is determined by the first Outside day and is only broken by a Rally, Reaction, or Inside day.
Thanks for your helpl
Suiram
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 9/13/2004(UTC) Posts: 673 Location: Salt Lake City, UT
|
Which symbol are you looking at? The entire formula is simply Outside()? There are some known issues with those functions, but this is not one I have seen. For example, you could have an Outside Day occur, and the following bar might not be outside the previous bar, but it might still be outside the first bar that triggered the outside day, so it will show this as an outside day. In the attached image, bar 2 is Outside Bar 1. Bar 3 is NOT outside bar 2, but it is still Outside bar 1, so bar 3 is still considered an outside day. I believe this is by design, as described in the "reaction day" or rally. I should point out that if you'd prefer to look only at the prior bar, such could be written simply as a custom formula: H > Ref(H,-1) AND L < Ref(L,-1) Justin attached the following image(s):
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 9/13/2004(UTC) Posts: 673 Location: Salt Lake City, UT
|
Okay, I did look a bit further into this, and I will try and explain it as best as I can here. The book explanation is a bit lacking, so I actually had a developer look at the code.
Basically you cannot simply compare the current bar to the prior bar. There are conditions that will trigger a reaction or a rally. When these conditions occur (defined in the help), a new anchor bar is created. An outside bar is compared to this "anchor", not necessarily the prior bar.
In your screenshot, an anchor occurred on the first green bar to the left of the square you drew. That is to say, the low was not below the low of the prior bar, but the high was greater than the previous high (this is defined as a rally, which sets your anchor for an inside/outside bar to this bar). The bar after looks to be an inside bar, as does the bar after it. The next red bar (shaped like a +) is also an inside bar to that original anchor. Now we're at the green bar (inside the square you drew). If you compare it to your anchor bar (the first green bar outside your square) you will notice this is also an inside bar.
As you can see, neither a reaction nor a rally occured that would have moved your anchor from the first green bar. Your very last bar is not an outside bar when compared to the actual anchor date.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 9/16/2009(UTC) Posts: 2
|
Hello Justin,
Thank you for your answer. I will look into documentation for details.
I have a few questions:
1. Where, in the help, I can find more about "anghor" bars?
2. What is an anchor bar?
3. What other functions depend on anchor bars? reaction? rally?
Best regards,
Marius
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 9/13/2004(UTC) Posts: 673 Location: Salt Lake City, UT
|
The anchor is just the method used to keep track of a reaction or rally. The reaction and the rally are defined in the function help of the MetaStock manual.
The main point that is not clearly defined in the manual is that each time there is a reaction or a rally it essentially resets the anchor date. The inside or outside condition is compared to this bar until a new reaction or rally occurs.
The Inside function uses this same functionality.
|
|
|
|
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.