Hey guys, this is my first post here. The information you can find on this forum is so unbelievably valuable and I've learned so much already from exploring all the different strategies and testing out different indicator combinations myself (with a good amount of success). I can't thank everyone enough who posts here, it's an amazing resource.
One thing I couldn't find when I was digging around, however, was a simple custom scan to add to scan queries that looks for stocks Above their Pre-Market High level. I use this for day trading and swing trading to find stocks that tend to break above these levels and continue their trend throughout the morning or into the next day.
I changed the bottom few lines so that it can be used for scans.
Here is the code:
If you're looking for stocks that are Below the Pre Market Low level, just switch the hashtag on the last two lines.
One thing I couldn't find when I was digging around, however, was a simple custom scan to add to scan queries that looks for stocks Above their Pre-Market High level. I use this for day trading and swing trading to find stocks that tend to break above these levels and continue their trend throughout the morning or into the next day.
I changed the bottom few lines so that it can be used for scans.
Here is the code:
Code:
#pm_high_low
input alertPeriodStart = 930;
input alertPeriodEnd = 1130;
input alertOnBreak = no;
input alertOnPullBack = no;
input numberOfDays = 2;
input numberOfYears = 0;
def okToPlot = GetLastDay() - numberOfDays <= GetDay() and GetLastYear() - numberOfYears <= GetYear() ;
def startCounter = SecondsFromTime(alertPeriodStart);
def endCounter = SecondsTillTime(alertPeriodEnd);
def alertPeriod = if startCounter >= 0 and endCounter >= 0 then 1 else 0;
def regularSessionHours = RegularTradingStart(GetYYYYMMDD()) <= GetTime();
def extendedSessionHours = RegularTradingStart(GetYYYYMMDD()) >= GetTime();
def extendedSessionStart = regularSessionHours[1] and extendedSessionHours;
def regularSessionStart = extendedSessionHours[1] and regularSessionHours;
def extendedSessionHigh = CompoundValue(1, if extendedSessionStart then high else if extendedSessionHours then Max(high, extendedSessionHigh[1]) else extendedSessionHigh[1], high);
def extendedSessionLow = CompoundValue(1, if extendedSessionStart then low else if extendedSessionHours then Min(low, extendedSessionLow[1]) else extendedSessionLow[1],low);
def regularSessionHigh = CompoundValue(1, if regularSessionStart then high else if regularSessionHours then Max(high, regularSessionHigh[1]) else regularSessionHigh[1], 0);
def regularSessionLow = CompoundValue(1, if regularSessionStart then low else if regularSessionHours then Min(low, regularSessionLow[1]) else regularSessionLow[1], 0);
plot overnightHigh = close > extendedSessionHigh;
#plot overnightLow = close < extendedSessionLow;
If you're looking for stocks that are Below the Pre Market Low level, just switch the hashtag on the last two lines.
Last edited by a moderator: