RuleOneTrading
New member
I'm trying to get the (High-Low) of the current day, then use that number to divide the High-Low of the last hour. This will give me a relative percentage of the current hour's range vs the range of the day so I can stop seeing stocks that are barely moving relatively to the earlier movements of the day, since the ATR and APTR are terribly useless on a minute chart when scanning for relative current ranges.
The script would essentially be: (But I'm not sure how to define Today as the length since open
#Custom ATR -
input Length = 60;
input CustomATRpercent = 20;
Input Start = 0930;
Input End = 1400;
def Today =
def TodaysLowerBand = Lowest(low[1], Today);
def TodaysUpperBand = Highest(high[1], Today);
def CurrentLowerBand = Lowest(low[1], Length);
def CurrentUpperBand = Highest(high[1], Length);
def CurrentRange = (CurrentUpperBand-CurrentLowerBand);
def TodaysRange = (TodaysUpperBand-TodaysLowerBand);
plot RangeRatio = (CustomATRPercent <= (CurrentRange/TodaysRange));
The script would essentially be: (But I'm not sure how to define Today as the length since open
#Custom ATR -
input Length = 60;
input CustomATRpercent = 20;
Input Start = 0930;
Input End = 1400;
def Today =
def TodaysLowerBand = Lowest(low[1], Today);
def TodaysUpperBand = Highest(high[1], Today);
def CurrentLowerBand = Lowest(low[1], Length);
def CurrentUpperBand = Highest(high[1], Length);
def CurrentRange = (CurrentUpperBand-CurrentLowerBand);
def TodaysRange = (TodaysUpperBand-TodaysLowerBand);
plot RangeRatio = (CustomATRPercent <= (CurrentRange/TodaysRange));