fakeelonmusk
New member
Im not great with code but I am looking to take the code below which scans for intraday breaks over daily HOD breaks but do the opposite and have it look for stocks breaking the LOD on the daily.
Code:
def ymd = GetYYYYMMDD();
def capture = !IsNaN(close) and ymd != ymd[1];
def dayCount = CompoundValue(1, if capture then dayCount[1] + 1 else dayCount[1], 0);
def pd = (HighestAll(dayCount) - dayCount) ;
def ph = if pd==1 and secondsfromTime(0930) == 0
then high
else if pd==1 and secondsTillTime(1600) > 0
then max(high, ph[1])
else ph[1];
plot scan = pd == 0 and secondstillTime(1600) > 0 and close crosses above ph;