Gold Customer
Joined: 4/10/2006 Posts: 954
|
Basically, I want to find an unusual day compared to previous 20days in this case.
If there is already a "canned" pcf or indicator "bollinger" which captures this that is fine.
What is the best way to write?
RatioValue = (h-l) / (((H1-L1)+(H2-L2)+(H3-L3)+(H4-L4)+(H5-L5)+(H6-L6)+(H7-L7)+(H8-L8)+(H9-L9)+(H10-L10)+(H11-L11)+(H12-L12)+(H13-L13)+(H14-L14)+(H15-L15)+(H16-L16)+(H17-L17)+(H18-L18)+(H19-L19)+(H20-L20))/20)
One day price range Divided by Sr = SUM( Hi -Li) for i=1 to 20 , divide by 20
This is different than H-L / (avgH20 - avgL20) ? correct.
What I am looking for is a Price range(change) Today which is a ratio to previous 20Day price changes.
would be nice to have some functions like
=sum((H - L),1,20)
=sum(diff(H,L),1,20) meaning summation of difference of (High,Low) for 1 to 20 bars ago
Such that "RatioValue" is large when (h-l) is large and Sr is small,
1 - indicates a normal day compared to last 20 days
2 - indicates twice price range compared to last 20 days
etc.
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
Try this and see if the results look useful to you:
(H-L) / (AVGH20.1-AVGL20.1)
It uses the average high and low but should still show you large range days vs the previous 20 days.
|
Gold Customer
Joined: 4/10/2006 Posts: 954
|
I was looking for a case where this do not match, but I am having a hard time. So far, almost neglegable differences.
thx
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
(h-l) / (((H1-L1)+(H2-L2)+(H3-L3)+(H4-L4)+(H5-L5)+(H6-L6)+(H7-L7)+(H8-L8)+(H9-L9)+(H10-L10)+(H11-L11)+(H12-L12)+(H13-L13)+(H14-L14)+(H15-L15)+(H16-L16)+(H17-L17)+(H18-L18)+(H19-L19)+(H20-L20))/20)
Should be exactly the same thing as:
(H - L) / (AVGH20.1 - AVGL20.1)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|