QTusers Forum
February 11, 2012, 04:57:34 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
New Trading Game Available...
3waymarkets.com/trading_game

 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: TTM Squeeze  (Read 3652 times)
ejg
New Member
*
Posts: 5


« on: October 11, 2006, 09:17:48 AM »

Hello cmx,

Is there paintbar code for the TTM Squeeze that was discussed on the previous forum?

http://gigablast.com/get?d=31085200054

I am assuming there would need be an indicator created to get it to work (Momentum + MACD)/2 since there is no formula scripting language in QuoteTracker.

Thanks
Logged
cmx
Sr. Member
****
Posts: 93


WWW
« Reply #1 on: October 11, 2006, 10:19:39 AM »

For me ...the thread is too confusing...don't want to spend the time tryting to figure out what is going on...

If you could state in simple prose what you want the paintbar to do it would be helpful...

There are always ways to compare two indicators in a paintbar, or given problems with that, two paintbars can be combined visually...
Logged
ejg
New Member
*
Posts: 5


« Reply #2 on: October 12, 2006, 10:14:36 AM »

  The paintbar would change to green when the Bollinger Bands (20,2) are less than or inside the Keltner channels (20,1.5) and changes color when the BB emerges back out of it. The new color after emerging would be blue if the sum of ((MACD(12,26,9) + Momentum(12))/2 is > 0 or red if < 0.

If the paintbar code can draw a histogram, the length of the bar would equal
((MACD(12,26,9) + Momentum(12))/2

----

After searching the web, it looks like this has been attempted with other trading software since the TTM Squeeze costs $1000+ for TradeStation/E-signal.

The Momentum indicator used in the e-signal script is EMA(10,Momentum(12)) instead of Momentum(12), but I see no way of expressing this in paintbar code.


The code for the FPsqueeze indicator referenced is here:

http://www.forexproject.com/option,com_docman/task,cat_view/gid,53/Itemid,203

« Last Edit: October 12, 2006, 10:16:21 AM by ejg » Logged
cmx
Sr. Member
****
Posts: 93


WWW
« Reply #3 on: October 12, 2006, 11:25:35 AM »

Here is a chart with the paintbar shapeband at the top representing the conditions you gave in your post(this is just one of many different ways you could choose to display it)...


Here are the paintbar rules(order is important):

if MACD(12,26,9) + Momentum(12)/2  > 0 set color to Blue
if MACD(12,26,9) + Momentum(12)/2  < 0 set color to Red
if Bollinger Bands(20).LOWER > Keltner Bands(20).LOWER set color to Lime
if Bollinger Bands(20).UPPER < Keltner Bands(20).UPPER set color to Lime

Pretty simple...although I am not very familiar with the Momentum and Keltner indicators and their usage and peculiarities. For example: you might actually only need one of the Boll/Kelt rules if they always act symmetrically..I just put it in to be safe.

Let me know if this works, or if there are problems...and we can work further...
« Last Edit: October 12, 2006, 11:28:07 AM by cmx » Logged
ejg
New Member
*
Posts: 5


« Reply #4 on: October 13, 2006, 10:41:39 AM »

To make it simpler, I changed the code to two rules which compare it with the previous bar:

Long Signal:
if (Bollinger Bands(20,2).Upper>Keltner Bands(20,1.5).Upper) AND  (Bollinger Bands(20,2).Upper[1]<Keltner Bands(20,1.5).Upper[1])  AND  ((MACD(12,26,9)+Momentum(12))/2 > 0) set color to Blue

Short Signal:
if (Bollinger Bands(20,2).Lower<Keltner Bands(20,1.5).Lower) AND  (Bollinger Bands(20,2).Lower[1]>Keltner Bands(20,1.5).Lower[1])  AND  ((MACD(12,26,9)+Momentum(12))/2 > 0) set color to Red

These draw a blue or red paint bar when BB emerges and the "momentum" is positive or negative.

The key here to the accurate long or short paintbar is the "momentum index oscillator" which is refered to in the TradeStation forum. This is different from (MACD(12,26,9)+Momentum(12))/2 . The code uses an EMA of (10,Momentum(12)) as part of the average for this indicator.

Do you know what is the closest combination of QT indicators which can represent this? I think these rules are prone to generate the wrong color paintbar. It looks like we will need a new EMA indicator which allows input from other indicators added to the wishlist. Thanks for the help on this cmx.

-EJG


« Last Edit: October 13, 2006, 10:45:21 AM by ejg » Logged
cmx
Sr. Member
****
Posts: 93


WWW
« Reply #5 on: October 13, 2006, 11:15:21 AM »

A picture is worth a thousand words ejg...much easier to understand when a picture of the chart is used....what symbol and time frame are you working with?

This is an easy picture dump http://i1.tinypic.com/

The code you have presented isn't working here...that I can tell....I'll work on it....

**Yeah, you had a  logical operator wrong...
Quote
Short Signal:
if (Bollinger Bands(20,2).Lower<Keltner Bands(20,1.5).Lower) AND (Bollinger Bands(20,2).Lower[1]>Keltner Bands(20,1.5).Lower[1])  AND  ((MACD(12,26,9)+Momentum(12))/2 > 0) set color to Red

should be:
if (Bollinger Bands(20,2).Lower<Keltner Bands(20,1.5).Lower) AND  (Bollinger Bands(20,2).Lower[1]>Keltner Bands(20,1.5).Lower[1])  AND 
((MACD(12,26,9)+Momentum(12))/2 < 0) set color to Red

***ALSO, is it NOT important to note when the BB goes back inside the Keltner?

***Also note, with your new code, if the macd/momentum ratio dips below zero and the BB's are still outside the Kelt...no signal will generate...not sure if this is as you intended...


In the meantime, not sure what "EMA of (10,Momentum(12))" means....describe it in prose, I don't know TS stuff. Post a picture....
« Last Edit: October 13, 2006, 12:07:17 PM by cmx » Logged
ejg
New Member
*
Posts: 5


« Reply #6 on: October 13, 2006, 12:09:15 PM »

Thanks for the clarification, a 6 month chart of GTW showing this paintbar is attached.


if Bollinger Bands(20,2).Lower>Keltner Bands(20,1.5).Lower set color to Lime
if Bollinger Bands(20,2).Upper<Keltner Bands(20,1.5).Upper set color to Lime
if (Bollinger Bands(20,2).Upper>Keltner Bands(20,1.5).Upper) AND  (Bollinger Bands(20,2).Upper[1]<Keltner Bands(20,1.5).Upper[1])  AND  ((MACD(12,26,9)+Momentum(12))/2 > 0) set color to Blue
if (Bollinger Bands(20,2).Upper>Keltner Bands(20,1.5).Upper) AND  (Bollinger Bands(20,2).Upper[1]<Keltner Bands(20,1.5).Upper[1])  AND  ((MACD(12,26,9)+Momentum(12))/2 < 0) set color to Red

This paintbar gives a heads up when entering the range (green) and then the last paintbar is either red or blue signaling the emergence out of the tight range.


Quote
In the meantime, not sure what "EMA of (10,Momentum(12))" means....describe it in prose, I don't know TS stuff. Post a picture....

The EMA of (10,Mom(12)) is a 10 bar length of an exponential moving average using a 12 bar momentum as the input instead of price.

In QuoteTracker, the EMA formula can only specify the number of bars and it's offset on price.

In E-signal, the EMA formula can use input sources from other indicators like momentum.

To create the momentum indicator for the "TTM squeeze", QuoteTracker would need a new EMA indicator which can specify period, shift and an alternate input source (momentum) instead of just price..

-EJG
« Last Edit: October 15, 2006, 10:13:46 PM by ejg » Logged
boogster
Just Visiting

Posts: 1


« Reply #7 on: October 29, 2006, 09:27:32 AM »

Hey guys, I created some instructions on my blog for creating the TTM Squeeze and TTM Trend indicators:

http://www.boogster.com/blog/?p=2801

You can tweak it to your own liking.

Mike
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!