Hello,
Anyone have any advice on how to get this scan to run for multiple days. In other words, how do I apply this scan to a given watchlist of stocks to look for these 3.5% greater candles on multiple days?
##############
input openingPMTime = 0930.0; #hint OrMeanS: Begin Mean Period. Usually Market Open EST.
input endTime = 1600.0; #hint OrMeanS: Begin Mean Period. Usually Market Open EST.
def na = Double.NaN;
def isDaily = If (GetAggregationPeriod() == AggregationPeriod.DAY, yes, no);
def isBelowDaily = If (GetAggregationPeriod() < AggregationPeriod.DAY, yes, no);
def isToday = If (GetDay() == GetLastDay() and SecondsFromTime(openingPMTime) >= 0, yes, no);
def day = GetDay();
def PMopenBar = day != day[1];
def PMOpen = if PMopenBar then open else PMOpen[1];
def MClose = !IsNaN(close) and IsNaN(close[-1]);
def PMO = if isToday and isBelowDaily then PMOpen else na;
def PMC = if isToday and MClose then close else na;
def Change = PMC-PMO;
def Change_Percent= round((Change/PMO)*100,3.5);
plot scan = Change_Percent > 3.5;
Anyone have any advice on how to get this scan to run for multiple days. In other words, how do I apply this scan to a given watchlist of stocks to look for these 3.5% greater candles on multiple days?
##############
input openingPMTime = 0930.0; #hint OrMeanS: Begin Mean Period. Usually Market Open EST.
input endTime = 1600.0; #hint OrMeanS: Begin Mean Period. Usually Market Open EST.
def na = Double.NaN;
def isDaily = If (GetAggregationPeriod() == AggregationPeriod.DAY, yes, no);
def isBelowDaily = If (GetAggregationPeriod() < AggregationPeriod.DAY, yes, no);
def isToday = If (GetDay() == GetLastDay() and SecondsFromTime(openingPMTime) >= 0, yes, no);
def day = GetDay();
def PMopenBar = day != day[1];
def PMOpen = if PMopenBar then open else PMOpen[1];
def MClose = !IsNaN(close) and IsNaN(close[-1]);
def PMO = if isToday and isBelowDaily then PMOpen else na;
def PMC = if isToday and MClose then close else na;
def Change = PMC-PMO;
def Change_Percent= round((Change/PMO)*100,3.5);
plot scan = Change_Percent > 3.5;