Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

price range change compared to previous 20bars. PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
wwrightjuly4
Posted : Monday, September 28, 2015 5:42:46 PM
Gold Customer 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.

 

StockGuy
Posted : Monday, September 28, 2015 5:51:28 PM

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.

wwrightjuly4
Posted : Monday, September 28, 2015 6:02:37 PM
Gold Customer 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

 

Bruce_L
Posted : Tuesday, September 29, 2015 11:54:51 AM


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
Users browsing this topic
Guest-1

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.