Scan for After Market Movers

lowtrade

lowtrade

Member
VIP
Hi, I'm looking for a scanner to show me all the stocks that are moving up after the market close. I couldn't find any and I have a scan for Pre-market and works fine. Any help would be appreciated.
 
BenTen

BenTen

Administrative
Staff
VIP
Try using the same condition that you use to find movers from pre-market and apply that to after-hours.
 
C

cherif

Member
Hi, I'm looking for a scanner to show me all the stocks that are moving up after the market close. I couldn't find any and I have a scan for Pre-market and works fine. Any help would be appreciated.
would you mind sharing before market scan? at least how do you determine that a stock is going to be moving throughout the day?
 
lowtrade

lowtrade

Member
VIP
I'm using the below one for premarket scan with 5% or more but not sure how can I use the same one for After hours. I want to stocks that are 5% or up after hours since the market close. I'm not sure how can I add a watchlist column to show the price change since the market close. All the columns are showing price change from the previous day close. @cherif
 
L

Len20

Member
It's actually already a built in study. In Study, under "Price Performance" choose "After hours percent change"
 
L

Len20

Member
For a watchlist column, I recently made this. It shows the percent change from from the most recent market close. It works during after hours, premarket (gap), and continues during market hours.

edit 6/21/20: 1hr aggregation seems to load the fastest while still being accurate, though 1 min works too.

Code:
# Gap From Market Close watchlist by Len20
# Set to 1hr or lower aggregation
# Works afterhours, premarket, and regular hours

def marketClose = 1559;
def c =  close;
def today  = GetDay() == GetLastDay();
def dayHours = SecondsTillTime(marketClose) >= 0 ;

def PrevClose = if (dayHours[1] and !dayHours) or (dayHours[1] and !today[1] and today)
                #in case there was no afterhours trading
                then c[1]
                else PrevClose[1];

def gapChange = round((c - PrevClose) / PrevClose * 100, 1);

plot GapPlot = if today then gapChange else double.NaN;
GapPlot.assignValueColor( if gapChange < 0 then color.RED else color.GREEN);
 
Last edited:
lowtrade

lowtrade

Member
VIP
Thanks @Len20 . I just added this watchlist column. It is showing the % change from the previous close not the % change after the market close.

Please check the ticker EVOK and it showing 2.6% and it is same as default % change column.

The formula would be Market % Change - % Change will be the correct value to identify the AH price change.

For a watchlist column, I recently made this. It shows the percent change from from the most recent market close. It works during after hours, premarket (gap), and continues during market hours.

Code:
# Gap From Market Close watchlist by Len20
# Set to 1hr or lower aggregation
# Works afterhours, premarket, and regular hours

def marketClose = 1559;
def c =  close;
def today  = GetDay() == GetLastDay();
def dayHours = SecondsTillTime(marketClose) >= 0 ;

def PrevClose = if (dayHours[1] and !dayHours) or (dayHours[1] and !today[1] and today)
                #in case there was no afterhours trading
                then c[1]
                else PrevClose[1];

def gapChange = round((c - PrevClose) / PrevClose * 100, 1);

plot GapPlot = if today then gapChange else double.NaN;
GapPlot.assignValueColor( if gapChange < 0 then color.RED else color.GREEN);
 
Last edited:
lowtrade

lowtrade

Member
VIP
Here is another set of code found from Hahn site. I hope this okay to be shared here.

Code:
input marketClose = 1555;
def closeCounter = SecondsTillTime(marketClose);
def regSessEnd = closeCounter == 0;
rec priorDayClose = if regSessEnd then close else priorDayClose[1];
def change = ((close-priorDayClose) / priorDayClose) * 100;
def con1 = change >= 3 or change <= -3;
plot scan = con1;
 
L

Len20

Member
Thanks @Len20 . I just added this watchlist column. It is showing the % change from the previous close not the % change after the market close.

Please check the ticker EVOK and it showing 2.6% and it is same as default % change column.

The formula would be Market % Change - % Change will be the correct value to identify the AH price change.

@lowtrade It sounds like you have the aggregation period set to daily. It needs to be set lower. 1 min aggregation should be accurate and shows EVOK at 74.5%. I use 1 hr aggregation because it seems to load slightly faster and I believe it is just as accurate.

The only difference from code that uses daily aggregation is the final closing price for the day might actually be slightly different than the close of the final bar for that day.
 
Last edited:

Similar threads

Top