Help create a daily range indicator?

C

cnotink

New member
Hello, I am a nubee and wanting to learn more about scripting in TOS. Just for a starter I am looking for a daily range indicator like the subject above.

Also, are there any classes out there for scripting in TOS?

absolute daily range % is a min of "x" over period of "y" or date range of "dateA - dateB"

Thank you,
Scott
 
Last edited by a moderator:
inthefutures

inthefutures

Active member
I will help you out a little, will teach you to fish, not give you a fish.
so you are looking at a atr, or a % of the average range of the last x days
 
C

cnotink

New member
Thank you for the reply. I don't think I am looking at average, but more first finding the daily range (absolute so it could be up or down). Then I would like to find stocks, say over the past 20 trading days, that have a minimum of of say 5% absolute daily range. This give me an indication of volatility opportunity.
 
C

cnotink

New member
If I were to look at the average, it would account for the recent volatility which I would be concerned that it would skew the results.
 
C

cnotink

New member
yes |high - low| for the day > 5%
and must occur in the last 20 day periods
 
inthefutures

inthefutures

Active member
so an average of range of last 20 day and current candle is under or over 5% of that range?
 
inthefutures

inthefutures

Active member
input back = 20;
def bottom = Lowest(low[1], length);
def top = Highest(high[1], length);
plot value = AbsValue(top - bottom)/bottom > .05;
 
C

cnotink

New member
Thank you very much inthefutures. I appreciate your help!!
 

Top