Developing a Squeeze Histogram Formula

trouble56

New member
I am looking for help developing the formula for the Squeeze Histogram value so I can create a multi-timeframe indicator for Squeeze. This is what I was using for my formula but this formula only works if the time frame on my chart matches the timeframe I am assessing.

input higher_time_frame_1 = AggregationPeriod.two_days;

def squeezeHist1 = reference TTM_Squeeze(close(period = higher_time_frame_1), 20, 1.5, 2.0, 1.0).Histogram;

If it is a different timeframe then the formula is not correct. I believe it means that I need to actually calculate Squeeze without referencing the building indicator but I don't know how to do this. Any help would be greatly appreciated.

Thank you,

Aaron
 

trouble56

New member
@BenTen I have looked at the links you suggested previously but didn't see that this showed how to calculate the histogram value. I could have missed something because I didn't understand so any help would be appreciated. thank you
 

cemlouis

New member
VIP
Hello, I know TTM Squeeze is a built-in and free indicator in TOS. For editing/trying new things does anyone has the thinkscript code for the histogram?
 

cemlouis

New member
VIP
@cemlouis You can Copy & Paste the original TOS version into a new Study and modify it to your hearts content... That's how I go about modifying any of the licensed TOS Studies...

See below, there is no code to play :)

Code:
#
# TD Ameritrade IP Company, Inc. (c) 2009-2021
#
# Source code isn't available.

declare lower;

input price = CLOSE;
input length = 20;
input nK = 1.5;
input nBB = 2.0;
input alertLine = 1.0;

plot Histogram = Double.NaN;
plot VolComp = Double.NaN;
plot SqueezeAlert = Double.NaN;
 
Last edited:

rad14733

Well-known member
VIP
@cemlouis Oh, that's right, the crux of the indicator is licensed an hidden... There are several variations posted here in the forums, including a clone of TTM_Squeeze_Pro, similar to what I currently use... I also posted TTM_Squeeze_Pro_Clouds here in the forums, as a learning example of how "The Squeeze" works, which has loads of code to work from... In fact there is an entire topic with community contributions that @BenTen created... A search for "TTM_Squeeze" should yield ample results to learn from... Good luck...
 

cemlouis

New member
VIP
@cemlouis Oh, that's right, the crux of the indicator is licensed an hidden... There are several variations posted here in the forums, including a clone of TTM_Squeeze_Pro, similar to what I currently use... I also posted TTM_Squeeze_Pro_Clouds here in the forums, as a learning example of how "The Squeeze" works, which has loads of code to work from... In fact there is an entire topic with community contributions that @BenTen created... A search for "TTM_Squeeze" should yield ample results to learn from... Good luck...
Pro Squeeze is playable, thank you (y)
 

Similar threads

Top