Labels for TTM Squeeze History



New member
About two years ago I saw where a thinkscripter had developed labels to set general expectations for squeeze history, but I did not save the script unfortunately. While this label is not a trade trigger type of indicator, it can be used to quickly set expectations for squeeze occurrence frequency and duration. I would like to see if I can get some help building it as follows and others might also like to learn from the process as we go. Here are the steps I would propose:
  1. Start with a label (or what will be the initial showing in the ultimate label) that shows the number of bars in the chart being viewed (i.e. there are X number of bars on this chart).
  2. The next part of the label will say there are X total bars in the TTM squeeze on this chart.
  3. The other parts of the label are then just mathematical derivative parts of the label from these two measures which most interesting are:
    1. What percent of bars are in a squeeze (number of squeezes / total bars as a % ) - this shows how frequently this occurs of all bars
    2. How frequently does a squeeze series initiate - so number of unbroken series (prior bar no squeeze but current bar is squeeze) shows the number of not just the frequency of all bar in squeeze but how frequently a squeeze sequence initiates
    3. Average squeeze duration - shows of all the unbroken series how many bars would be in a squeeze - this is perhaps the most useful as you can characterize and instrument (or at least its period in the chart) to set expectations on how long that might last
    4. Other things are also possible like shortest, longest, longest between squeeze series ...
Once the framework design is made, it is conceivable that any indicator occurrence could be substituted for the squeeze.