Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 2/14/2011 Posts: 76
|
I'd like to add an indicator in my watchlist so I can sort stocks current price compared to the current days range as a percentage. This way I can look for stocks breaking out to new highs and lows before they happen. How would I write this? Thanks for the help. -RLS
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
An Indicator Formula for the current price as a percentage of range of the current bar could be written as:
100 * C / (H - L + .0000001)
That said, an Indicator Formula for the range of the current bar as a percentage of the current price would seem to make more sense to me:
100 * (H - L) / C
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 2/14/2011 Posts: 76
|
Hi Bruce, I'm confused because neither one of those seem to work right. Like, I said I'm looking for the close as a percentage of the days range. So if the high/low for the stock is 99/98 (with the range being $1) then 98.90 would be a 90% reading and a 98.10 would be 10% reading on the indicator of the days range. This way I can sort my watchlist looking at the higher close of todays range breaking new highs intraday and the lower close of todays range breaking new lows intraday. I might be making this more confusing then it needs to be but for some reason I can't figure out how to write this indicator. I appreciate the help. -RLS
|
|
Registered User Joined: 2/14/2011 Posts: 76
|
If the current close would be equal to the high of the day then the reading would be 100% and if the current close would be equal to the low of the day then it would be 0%. So a current last price of 99 would be 100% and a current last price of 98 would be 0% since these would be the high and low of the day. This way I could easily sort stocks breaking out of the low or high of the day. thanks.
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
This should work for you:
(C-L)/(H-L) * 100
|
|
Guest-1 |