I've used the TTM Squeeze for quite some time. On intraday squeezes, Eric Purdy's code seems hit or miss. Anyone else have this issue? Include Extended Hours is unchecked. Not sure what the problem is. Code:
# Simpler Trading Squeeze watchlist column - Eric Purdy 2017
# Shared Link - http://tos.mx/5cpgKa
def sqz = !TTM_Squeeze().SqueezeAlert;
def direction = TTM_Squeeze()>TTM_Squeeze()[1];
def count = if sqz and !sqz[1] then 1 else count[1]+1;
def fired = if !sqz and sqz[1] then 1 else 0;
def firedCount = if fired then 1 else firedCount[1]+1;
def firedDirection = if fired then direction else firedDirection[1];
addLabel(yes, if sqz then “4HR:” + count else if sum(fired,5) then “Fired:” + firedCOunt + if firedDirection then ” Long” else ” Short” else “-”, if sqz then color.red else if sum(fired,5) and firedDirection then color.green else color.orange);
I left off the label portion of the code:
AddLabel(yes, if sqz then “1H Sqz:” + count else if Sum(fired, 5) then “Fired:” + firedCount + if firedDirection then ” Long” else ” Short” else “-”, if sqz then Color.RED else if Sum(fired, 5) and firedDirection then Color.GREEN else Color.ORANGE);
"Hit or miss" means it's about 80% at identifying Squeezes and Squeeze fires correctly on an Intraday timeframe (Hourly or 4 Hour). Daily, Weekly, Monthly work perfectly. I have been studying the issue for a while now and thought someone in the community might know why. The code from Purdy (Simpler Trading) has been floating around since 2017 so I think it is simply the intraday timeframe columns don't work well with it. Not sure.
Here is the column screenshot using the script above including the label which I left off the first post. It shows AKAM with 1H Squeeze Fire Short. Again, this is the Purdy code from 2017 (no knock on Purdy, he is a great guy and writes great scripts - I'm just trying to reconcile/figure out what is the matter). The 1H column does not have after hours checked.
Here is a 1-hour chart with the standard Squeeze.
There is no Squeeze fire. Now, I've seen these inconsistencies on say 10-20% of the 1H and 4H Purdy columns versus the standard TTM Squeeze 1H and 4H timeframes I watch. I was just asking for some assistance on it and whether others using the Purdy code experience the same thing. ChatGPT seems to think it's a column issue with TOS. I don't see the same inconsistencies outside of intraday timeframes. Hope that makes sense.
# Simpler Trading Squeeze watchlist column - Eric Purdy 2017
# Shared Link - http://tos.mx/5cpgKa
def sqz = !TTM_Squeeze().SqueezeAlert;
def direction = TTM_Squeeze()>TTM_Squeeze()[1];
def count = if sqz and !sqz[1] then 1 else count[1]+1;
def fired = if !sqz and sqz[1] then 1 else 0;
def firedCount = if fired then 1 else firedCount[1]+1;
def firedDirection = if fired then direction else firedDirection[1];
addLabel(yes, if sqz then “4HR:” + count else if sum(fired,5) then “Fired:” + firedCOunt + if firedDirection then ” Long” else ” Short” else “-”, if sqz then color.red else if sum(fired,5) and firedDirection then color.green else color.orange);
I left off the label portion of the code:
AddLabel(yes, if sqz then “1H Sqz:” + count else if Sum(fired, 5) then “Fired:” + firedCount + if firedDirection then ” Long” else ” Short” else “-”, if sqz then Color.RED else if Sum(fired, 5) and firedDirection then Color.GREEN else Color.ORANGE);
"Hit or miss" means it's about 80% at identifying Squeezes and Squeeze fires correctly on an Intraday timeframe (Hourly or 4 Hour). Daily, Weekly, Monthly work perfectly. I have been studying the issue for a while now and thought someone in the community might know why. The code from Purdy (Simpler Trading) has been floating around since 2017 so I think it is simply the intraday timeframe columns don't work well with it. Not sure.
Here is the column screenshot using the script above including the label which I left off the first post. It shows AKAM with 1H Squeeze Fire Short. Again, this is the Purdy code from 2017 (no knock on Purdy, he is a great guy and writes great scripts - I'm just trying to reconcile/figure out what is the matter). The 1H column does not have after hours checked.
Here is a 1-hour chart with the standard Squeeze.
There is no Squeeze fire. Now, I've seen these inconsistencies on say 10-20% of the 1H and 4H Purdy columns versus the standard TTM Squeeze 1H and 4H timeframes I watch. I was just asking for some assistance on it and whether others using the Purdy code experience the same thing. ChatGPT seems to think it's a column issue with TOS. I don't see the same inconsistencies outside of intraday timeframes. Hope that makes sense.