Tagged: TTM Squeeze
August 22, 2017 at 6:54 pm #39259
- Topics: 13
- Replies: 10
- Posts: 23
wondering if anyone is familiar with the TTM SQUEEZE INDICATOR created by John carter from simpler options.
The nature of this indicator is the bollinger bands set at 20 days with 1.5 stddev and Keltner channels with 20 and 1 stddev and the momentum oscillator on 14 days .
When the bollinger bands contract together in to the Keltner channel and then break out of the Keltner channel it is said that the squeeze has fired and the momentum histogram shows the direction of the move up or down.
I managed to find a functioning version of this indicator on Tradingview platform,however i would prefer to build this indicator to use on Optuma.
The script is also available on tradingview however the script language is not the same as the Optuma language.
This indicator is very useful and much easier on the eyes than plotting all three tools on the charts.
Here is an image and also a link of what it does exactly.
Thanks in advanceJune 24, 2018 at 6:35 am #47363Garret
- Topics: 0
- Replies: 1
- Posts: 1
I’m wondering if someone here cleverer than me would be able to write this script and and make the settings user adjustable.June 25, 2018 at 3:53 pm #47371
Thank you for your post. I’ll have a look at the rules and examples in your post and will see if it can be setup as a script. If it can i’ll post an example here.June 26, 2018 at 2:28 pm #47387
Please find an example script below of the TTM Squeeze Indicator in Optuma:1234567891011121314151617181920212223242526272829303132333435363738UpperBB = BB(BARS=20, DEFAULT=UpperLine);LowerBB = BB(BARS=20, DEFAULT=LowerLine);UpperKC = KC(BARS=20, CONST=1.500000);LowerKC = KC(BARS=20, CONST=1.500000, DEFAULT=LowerLine);value1 = (HIGHESTHIGH(BARS=20) + LOWESTLOW(BARS=20) + MA(BARS=20, CALC=Close)) / 3;value2 = CLOSE() - value1;val = LRSLOPE(value2, BARS=20);sqzOn = LowerBB > LowerKC and UpperBB < UpperKC;p1 = IF(val > 0 and val > val, val, 0);p2 = IF(val > 0 and val < val, val, 0);p3 = IF(val < 0 and val < val, val, 0);p4 = IF(val < 0 and val > val, val, 0);sqz1 = IF(sqzOn > 0, 5, 0);sqz2 = IF(sqzOn <= 0, 5, 0);Plot1 = p1;Plot1.Color = Blue;Plot1.Plotstyle = Histogram;Plot2 = p2;Plot2.Color = Navy;Plot2.Plotstyle = Histogram;Plot3 = p3;Plot3.Color = Red;Plot3.Plotstyle = Histogram;Plot4 = p4;Plot4.Color = Yellow;Plot4.Plotstyle = Histogram;Plot5 = sqz1;Plot5.Color = Red;Plot5.Plotstyle = Dot;Plot6 = sqz2;Plot6.Color = Green;Plot6.Plotstyle = Dot;
This should be added to a Show View tool.
Here’s an example of how it looks when applied to the DAX:July 25, 2020 at 11:17 pm #59095Julius
- Topics: 12
- Replies: 12
- Posts: 24
I don’t understand what that line at the top of the indicator window is. It also kind of pushes the oscillator down making it small in size. In certain cases the oscillator cannot be seen at all. (This is the WDC daily chart. The second one is the original daily chart from Think-or-Swim.).
Your help is appreciated.
Julius MohacsiJuly 29, 2020 at 11:06 am #59118
Those dots come from lines 17 and 18 in the code that was posted.1234sqz1 = IF(sqzOn > 0, 5, 0);sqz2 = IF(sqzOn <= 0, 5, 0);
They are hard coded to use a value of 5 which works fine for the DAXX (the original chart the script was built on) but not for WDC as the values of the indicator are much smaller.
Changing the values from 5 to 0.1 in the case of WDC will adjust the code to display as expected.July 29, 2020 at 5:20 pm #59131Julius
- Topics: 12
- Replies: 12
- Posts: 24
Thank you, Matthew!
I still do not understand why this extra line exists. I can see that the red/green areas are just the opposite of those of the zero line.
Can this extra line be placed over (instead of) the zero line? Or simply change the red/green areas of the zero line and delete this extra line?
Thank you again.
- You must be logged in to reply to this topic.