TTM Squeeze Oscillator and On price version

v10.3
TTM Squeeze Oscillator and On price version

The TTM Squeeze Oscillator (by John Carter) measure the strength of the market and its momentum. It is built with the Bollinger and the Keltner bands. When the volatility increase, the Bollinger Bands are widening and are enveloping the Keltner channel, while when the market is consolidating the BB are inside the KC and the market is squeezing.

Squeeze on: Red dots appears on the oscillator, prepare for a consolidation breakout to come.

Market is trending, squeeze is off: Green dots

The trend momentum and direction is identifiable with the oscillator color:

  • light blue = trend is up ; dark blue = momentum of bullish trend is decreasing.
  • red = trend is down ; yellow = bearish momentum is decreasing.

In this version, I added the possibility to apply the indicator on the price also to color the candlesticks accordingly to the squeeze oscillator. So this indicator embed 2 indicators at once: the oscillator and the candlesticks painter. To get the coloured candlesticks, apply the indicator on the price and tick the “CandlesticksSqueeze” in the indicator settings.

The “squeezeDotsOffset” setting help you move the oscillator dots above/below the zero level of the oscillator. I found that sometime, the color overlay of the histogram and the dots were disturbing, so this offset can resolve this “problem”.

 

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. atlante • 05/01/2017 #

    hi nicolas can you put de nr7 thank you you know what is the market other only dream 
    you are genius

  2. Ozons • 05/01/2017 #

    Bonjour Nicolas,
    merci pour la traduction de cet indicateur. Toutefois je pense qu’il y a une erreur sur la ligne à zéro composée de points rouges et verts car les points verts doivent indiquer que l’on peut opérer donc en tendance, les points rouges alertant que nous sommes sans tendance. Sur votre indicateur il faudrait les inverser. Si d’autres membres peuvent confirmer ce point. Merci  
    Sinon un lien vers le TTM Trend
    http://sohocool.over-blog.com/article-27816479.html

  3. supertiti • 05/01/2017 #

    Bonjour Ozonsen inversant les couleurs on a ce que tu souhaitesbonne journée
    if(sqzOn=1) then
    scolorR =255// 0
    scolorG = 0//255
    else
    scolorR = 0//255
    scolorG = 255//0
    ENDIF

  4. srtrading • 05/01/2017 #

    Hi Nicola
    Thank you for your great work. I have this Problems:

    When i use the TTM indicator on a Chart, every time a candle closed the ttm indicator disapears. And i Need to Change the timeframe to see it again. Do you know this Problem? and how can i solve it?
    When i use the TTM indicator on a Chart with the colored candles: The dotted line is much to far away down. how can i bring the dots closer to the actual candles??Many thanks and Kind regards            Simon

    • Nicolas • 05/01/2017 #

      1/ I don’t know why, this should be a platform bug. I’ll send this code for review at PRT to see what could happened there.
      2/ In your price settings window : “Vertical autoscaling : use price only” must be checked (true).

    • srtrading • 05/01/2017 #

      Hi Nicolas
      thank you for the quick response. 

      Ok please let me know what they have for a solution asap you know it.
      i did what you told me but now i can see the colered dots but the candles are far to small and i can not get them bigger. i have 2 options: have big candles with the dots far away not visible or with the dots visible but the candles very small flat like dots.  Please let me know if you have a idea what to do. Thx

    • Nicolas • 05/01/2017 #

      You can’t have dots and candles on the same indicator. If you apply the indicator on price, select ‘CandlesticksSqueeze’. If you want to only display the oscillator, don’t add it on price and deselect this setting, you’ll have the oscillator and its dots.

  5. srtrading • 05/01/2017 #

    the indicator only disapears if i scroll it just one bit to the left side if i leave it on the very right ist not happening
    thank you for your help

  6. kimbungle • 05/01/2017 #

    @nicolas: is it possible to code a screener with the TTM Squeezer? If yes, how? Thank you very much!

  7. Frank Wilson • 05/01/2017 #

    Hi Nicolas,
    any tips on how to learn basic coding for pro real time? tried reading the manual but can’t seem to get my head around it. wanting to code an indicator that shows Pocket pivots and buyable gap ups. basically just want an indicator that will show an arrow under a volume bar when the up volume is higher than the last ten days down volume. any help is appreciated Thanks

    • Nicolas • 05/01/2017 #

      There is no “easy way” but the prorealtime programming language is easy readable and understandable, even if you are starting from zero.
      I encourage you to read some screeners code already made in the library, you’ll find yourself that it is pretty much easy to code your first screener.
      Anayway, if you are still stuck in programming, you can ask any questions you’d like in the appropriate forums section of the website. Good luck 🙂

  8. kimbungle • 05/01/2017 #

    Hi @nicolas:
    How to build a screener with the TTM if the dot turn red and the Momentum >zero for LONG Signals? and the opposite way for short as well? There is no data for a red dot? Can you help me to build a screener around that?Thank you very much!
     

    • Nicolas • 05/01/2017 #

      This screener should help: https://www.prorealcode.com/prorealtime-market-screeners/ttm-squeeze-fired-screener/

  9. kimbungle • 05/01/2017 #

    Thank´s Nicolas, that screener you mentioned is ok, but not perfect yet.And I have tha same problem as @srtrading, the indicator disapears after the candle close. pretty much annoying in smaller time period. If you have an update, please let us know.Are the red dots correct setted? As @supertiti mentioned in the post above?Thank you

    • Nicolas • 05/01/2017 #

      You can use the code supertiti provided to change the color accordingly to your preference. I still don’t have any news about the disappearing issue, sorry.

  10. klaus • 05/01/2017 #

     if you remove the drawcandle statement nothing disappears.
     

    • Nicolas • 05/01/2017 #

      That’s right or you can comment it with REM. I still don’t have any news about this issue FYI.

  11. Bard • 05/01/2017 #

    Hi Nicolas, hope you are well, Thanks for putting up a better version of the TTM squeeze than the one I currently have. I was wondering where is the “CandlesticksSqueeze” in the indicator settings, when applying the indicator to the Price chart? I don’t see it on either the TTM “candlestick” setting or in the Price settings? Could you provide a screenshot please?I was building a system yesterday but when I came back to it today the assisted creation conditions are greyed out? If you touch one of the two fields it will go to white writing but there is no drop down functionality anymore to choose another parameter and the “value” field will still be greyed out (also with no drop down functionality). Do you know why it is doing that? Pls see screens… just realised there I cannot add attachment images here, so:https://www.dropbox.com/s/dmbd8tnmkzwszhv/1.png?dl=0https://www.dropbox.com/s/xpb72z6wu3gqeo2/2.png?dl=0Also John Carter mentions (http://www.tradethemarkets.com/products/item5.cfm) that the buy signal is when the squeeze red dots go to green and the momentum is positive (light blue). On the indicator the squeeze momentum is sometimes -0.0 and also 0.0. Using the assisted creation tool (when it’s working again and I already tried duplicating the strategy but still have no assisted creation drop down to change conditions), how can you program it to buy on a green dot (along with the condition that the momentum is positive light blue) because squeeze momentum red dots can be -0.0 or  0.0 as can green dots? I cannot figure out how in the code you could change that value for “squeeze momentum” to say +1 and -1? Thanks,Bard

    • Nicolas • 05/01/2017 #

      Hi Bard, I’m overwhelm as usual! 🙂 If you want to check the squeeze color, you need to return sColorR in the RETURN instruction line and check if it is >0 or not (this is the red color). So if this variable is superior to zero, then the momentum is not squeezed (I know the color are inverted from red to green in my indicator ..).

  12. Bard • 05/01/2017 #

    Do you dream in code? (:Sorry, I’m still not clear how to do get an auto trade instruction to enter (dependent upon momentum plus or minus) when the red squeeze turns to a green breakout? (thanks @supertiti)I am not sure how the colours are relevant? I do see the only mention of “sColorR” in the RETURN part for the sqz colours (last line of indicator code) but everywhere else in the code there isn’t a way to, (whether the values are plus increase and minus increase or a plus decrease and minus decrease) to signify that momentum sqz can be anything other than -0 or 0 which can be red or green (and -0 doesn’t work in the auto trading) when the squeeze momentum value needs to be -1 or 1. (e.g. 1 = red dots and -1 = green dots)?
    Also I added the Bollinger (20 period 2 x std dev) and the Keltner (20 period) indicators to my chart, but when for example the lower Bollinger is greater than the lower Keltner, (i.e. “a squeeze” and potential alert to a break out), there aren’t always red dots, sometimes they still green dots on my Daily Nikkei DFB?
    CheersBard

    • Nicolas • 05/01/2017 #

      if sColorR is superior to 0, the dot is red, so you got everything needed 🙂

  13. Bard • 05/01/2017 #

    “If you want to check the squeeze color, you need to return sColorR in the RETURN instruction line and check if it is >0 or not” I don’t understand what I am supposed to do/change/code? i.e. if I want to automate the system to enter when the red dot goes to green, I cannot figure out how do do that using the assisted creation tool? “if sColorR is superior to 0, the dot is red” But sqz momentum = 0, (and the mkt is falling), yet the dot can be either red OR green and if sqz momentum = -0 (and emphasis on minus here because you cannot have a -0.0 in assisted creation), it’s also red OR green (the mkt is rising), meaning I cannot figure out how to set up a conditionality:Enter long if (i) the red dot squeeze turns to a green dot (and a breakout is imminent)AND (ii) the plus increase is > 0 (to signify a long position is to be taken). Exit Long ifPlus decrease bar occurs (as per John Carter’s strategy)CheersBard

    • Nicolas • 05/01/2017 #

      ok, put your question in forum, I’ll do the code there. thanks.

  14. Bard • 05/01/2017 #

    Hi Nicolas, I loaded up my trading template tonight and got an error for the TTM indicator //candlesticks squeeze painting?
    It now “doesn’t like” the brackets before the open,and the comma after the open
    Also a warning for the bracket after the colorB) ?
    //candlesticks squeeze paintingif CandlesticksSqueeze thendrawcandle(open,high,low,close) coloured(colorR,colorG,colorB)endif
    RETURN plusI coloured(colorR,colorG,colorB) etc
     

  15. Bard • 05/01/2017 #

    p.s. It worked fine yesterday. I’ve just opened up another template that I have, which also loaded fine yesterday? 

    • Nicolas • 05/01/2017 #

      You certainly changed the code of the indicator and made a typo somewhere. Please redownload it and copy/paste the whole code from the library.

    • Bard • 05/01/2017 #

      I haven’t changed the code related to the parts mentioned above. The only modification was made to reversing the Sqz On. All my templates with TTM on Price load fine today… 

  16. dzim0032 • 05/01/2017 #

     Bonjour Nicolas. Je connais aussi le Squezze de John Carter. J’ai tenté de copier-coller ce code dans PRT et il me dit qu’il y a des erreurs de syntaxe : veuillez définir les variables ( 6 au total ) length, mult, lengthkc, multkc, squezzedotsoffset et candlestickssquezze. Comment y remédier. Merci.

    • Nicolas • 05/01/2017 #

      Il faut décommenter ces variables dans le code (supprimer les //) ou télécharger la version ITF directement, ces paramètres sont intégrés dans le fichier?

  17. dzim0032 • 05/01/2017 #

    Ok comment télécharger la version itf justement. Merci.

    • Nicolas • 05/01/2017 #

      216 personnes ont déjà trouvé le lien à la fin du post, je pense que tu le peux aussi 🙂 

  18. dzim0032 • 05/01/2017 #

    J’avais dès le début cliquer sur le lien au-dessus : itf Filename : prc_ttm-squezze 10.3 itf et le résultat est indescriptible ( que des caractères inconnus ). Je suis par ailleurs nul en anglais. Merci

    • Nicolas • 05/01/2017 #

      Clic droit / Enregistrer sous ?

  19. dzim0032 • 05/01/2017 #

    je fais toujours clic droit pour ouvrir le menu contextuel de Windosw mais là : ouvrir le lien ds 1 nouvel onglet, ouvrir le lien ds 1 nouvelle fenêtre, enregistrer le lien sous et copier l’adresse du lien mais enregistrer sous un dossier quelconque  dans les 222 downloads j’en sans doute 5 où 6 

    • Nicolas • 05/01/2017 #

      Il faut importer le fichier .itf téléchargé dans la plateforme en suivant ce tutoriel: https://www.prorealcode.com/import-export-prorealtime-code-platform/

  20. dzim0032 • 05/01/2017 #

    Voilà cela vient de fonctionner. L’erreur venait de moi. Lorsque dans la plateforme je voulais ajouter l’indic et cliquait sur  ” ajouter prorealcode ”  qui me dirigeait sur  le site je cliquais  sur le lien et là plus rien, alors le code était enregistré sur un dossier de l’ordi que je n’allais pas chercher au bon endroit. Idem si directement sur le site je faisais clic sur le lien “itf” enregistré et moi je n’allais pas le cherché là où il se trouvait.  Toutes mes excuses Nicolas. Par contre j’ai quand même une question : comment faire pour poster un code d’un indic ?

    • Nicolas • 05/01/2017 #

      Je suis content que tu y soit arrivé par toi même 🙂
      Si tu souhaites partager un code dans la “library”, il faut utiliser le petit bouton “+” en haut à droite dans la barre de navigation à côté de ton avatar. 

  21. dzim0032 • 05/01/2017 #

    C’est justement le TTM Squezze de John Carter que j’avais trouvé il y a quelques années sur le forum de ProAt je le mettrais prochainement avec les explications. Bonne soirée. Denis.

  22. dzim0032 • 05/01/2017 #

    J’ai commencé à ingurgiter les vidéos explicatives sur la formation de programmation à PRT après ma dernière demande sur le ZigZag et c’est vraiment difficile.

  23. mcha • 05/01/2017 #

    bonjour,
    Je trouve cet indicateur très pertinent. Peut-on lui apporter deux modifications pour faciliter sa lecture sur le graphe?
    – rendre invisible l’histogramme lorsqu’on choisit de colorer les chandeliers
    – mettre alors les dot sous la forme de points placés sous chaque chandelier
    Merci par avance de votre aide

    • Nicolas • 05/01/2017 #

      Il faudrait alors changer les lignes 82 à 85 avec ceci:

      //candlesticks squeeze painting
      if CandlesticksSqueeze then
      drawcandle(open,high,low,close) coloured(colorR,colorG,colorB)
      plusI=0
      minusI=0
      plusD=0
      minusD=0
      drawtext(“▬”,barindex,highest[length](high),Dialog,Bold,14) coloured(scolorR,scolorG,0)
      endif

    • mcha • 05/01/2017 #

      Bonsoir Nicolas,
      Merci beaucoup pour ce complément de code, qui fait disparaitre l’histogramme du graphe et garde les dot signant une consolidation ou un trend selon la couleur. Merci également pour votre réactivité.

  24. casamania • 05/01/2017 #

    What great work this screener is thanks very much for sharing it. However would it be possible to get the instruments that have fired to remain on the screener in order ? because if you use the higher time frames is is possible to get into a trade on the second or third candle but the fired instruments disappear as soon as they have fired. Also is it possible to put an alert when something fires ? Thanks for your help

    • Nicolas • 05/01/2017 #

      This code is not a screener but an indicator, I’m not sure I understand you correctly, are you referring to another code of the library?

  25. casamania • 05/01/2017 #

    Hi Nicolas I am new to this so sorry, I am talking about the TT SQUEEZE FIRED screener. Thanks Gary

    • Nicolas • 05/01/2017 #

      ok, so your query should be asked there: https://www.prorealcode.com/prorealtime-market-screeners/ttm-squeeze-fired-screener/
      I’ll answer you in this other post instead, thanks.

    • Nicolas • 05/01/2017 #

      answered here: https://www.prorealcode.com/prorealtime-market-screeners/ttm-squeeze-fired-screener/#comment-4341

  26. theproday • 05/01/2017 #

    @nicolas:
    Fantastic post thank you
    I was hoping you could also create the waves to be used in conjunction with this indicator,
    there are similar waves created in the past but the ones John Carter uses look much better.
    Could you create them?
    Link to the waves: https://www.simplertrading.com/waves/
    Thanks in advance

    • Nicolas • 05/01/2017 #

      Please open a new topic in the ProBuilder forum and ask about it. Please provide as much details as possible and possibly with screenshots. Thank you.

    • Swingforfortune • 05/01/2017 #

      https://www.prorealcode.com/prorealtime-indicators/wave-momentums/

  27. SYNDICATE • 05/01/2017 #

    Is thee a ninja 8 vesion available?

  28. Axel98 • 05/01/2017 #

    Bonjour,
    y-aurait-t’il une raison pour que le code ne donne pas le bon résultat visuel avec PRT v.11 ?
    J’ai importé le code du fichier TIF et une affiché l’indicateur sur mon écran, les zones de squeeze ne semblent pas correspondre avec le graphique sur lequel j’ai affiché les BB et les canaux de Keltner…
    (désolé je ne vois pas comment ajouter une image écran dans mon commentaire :-/ )
    Quelqu’un aurait une idée ?

    • Nicolas • 05/01/2017 #

      Le canal de Keltner de la plateforme utilise un écart multiplicateur de 1 par défaut et on ne peut pas le changer. Celui du code de l’indicateur permet de modifier cet écart, par défaut à 1.5.

  29. Axel98 • 05/01/2017 #

    Merci pour l’info

  30. Tradingshed • 05/01/2017 #

    HI, this code does not work for me, I have copied it and pasted it into V10.3 but it returns”syntax error”. I have tried with and without the “candlestick waiting” part. Does anyone have this as a file to import directly into PRT? Thank you in advance.

    • Nicolas • 05/01/2017 #

      The file to download is located at the bottom of the page, it is the case for any of the codes available in the library.

  31. Bard • 05/01/2017 #

    Loaded this great indicator into a chart tonight only to find great big rectangles denoting the squeeze? I don’t remember these and have tried to find them in the code above to delete it but can’t work out what lines of code are producing them? The line overwhelms the height of the indicator. Pls see image: https://www.dropbox.com/s/31b0sc7hltf6xei/ttm.png Cheers,

  32. svdhoble • 05/01/2017 #

    Hi how one can download the TTM squeeze indicator?

    • Nicolas • 05/01/2017 #

      Attached files of this post are listed below “ProRealTime ITF files and other attachments :” title.

  33. Jodal • 05/01/2017 #

    Bonjour Nicolas,

    Merci pour cet indicateur!
    Est-ce possible de configurer une alerte pour un changement de couleur (vert rouge) du squeeze momentum? (Je demande car je ne trouve pas comment faire)

    Pour pousser encore plus la chose en trading automatique, serait-il possible d’intégrer cet indicateur dans une stratégie?
    Si oui, je peux faire un post séparé sur le forum.

    Merci d’avance!
    Jo

    • Nicolas • 05/01/2017 #

      Merci pour le post dans le forum en respectant les règles de publication énoncées dans le cadre jaune.

  34. Dron • 05/01/2017 #

    De lo mejorcito

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+35 more likes

Related users ' posts
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
the_giorgio Hi, nice work I would like to understand something about prorealtime code. With your ...
Iván Hello. When you use the drawcandle() instruction then in the configuration window you add ...
Gio56 Super idée. j'ai juste un souci. j'ai pas de barre verte mais plusieurs lignes de couleurs.....
DeathMetal change line in histgram, (click on indicator name, click on tool (
Gio56 Super merci.
jacquesgermain sì da aggiungere
Maik2404 auf welchen Wert muss ich die Kompresionsperiode stellen?
jacquesgermain — Période de compression : ce paramètre détermine la période de rétrospection utilisée pour ...
bousalahane hello, thank you for sharing, I’m not top strong in the programation part, there is a way to...
Fgats Hi, With this indicator I just wanted to show the interest that can exist to synthesize th...
davidguerreir how to adapt nbStdSig values ?
Gianluca Amazing, thank You for your contribution!
Alex Spioglou Thank you for featuring my work, and I hope you found it useful. Mind the paper was publ...
FXtonio @RICOU en 1 minutes avec un filtre de tendance ZLSMA 200 et eventuellement un rsi 7 , 69% de...
JC_Bywan For people interested in the screener: https://www.prorealcode.com/topic/screener-buy-sell-m...
octum Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?) Puedes co...
Alfy
2 years ago
geroniman bonjour si je comprends bien, qaund els points sont verts on regarde pour un long, le blanc ...
Alfy No, the dots only show the compression of the volatility. There are 3 levels of "squeeze" wh...
ted.hulsman Hi Alfy, I'm trying to understand your indicator, so I made the Bollinger Bands and the Kelt...
AndPar Buongiorno Nicolas, vorrei provare questo indicatore, ma quando lo inserisco in PRT mi vengo...
Nicolas Basta aggiungerlo al prezzo https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-i...
Aragorna hello Nicolas, this indicator works with the last Beta version of PRT? Ive seen tha many in...
SnorreDK Works extremely well - How? How do u implement this in a startegy? Breakoutstrategy?
Keyeming Thanks, but yes same question as above, some explanations on how to read it would be appreci...
Bateson Bonjour. Merci beaucoup ! J'ai installé l'indicateur sur PRT 11 mais pour des raisons qui ...
CederTrader Hi Denis, does this indicator add to the chart as panel, or on the candles. Thanks
Nicolas Add it on the price chart as described in this video: https://www.prorealcode.com/blog/video...
Denis Hello Nicolas and Ceder Trader, Sorry, I only just saw your replies. The indicator is alre...
bab el franco hello once installed I have no results despite different options of markets or temporality
Nicolas Sorry there was a small issue in the code, i have changed the attached itf file and updated ...
Mitchy14 Hi Nicholas, apologies, I am usually fairly good at implementing your creations (for which I...
Nicolas Are you using PRT version pre-v11? TIMEFRAME for indicators is possible since months for pro...
Seabiscuit Hi! I like this indicator a lot, been using it on a 30 min timeframe and usually confirms my...
Ramahu Bonjour et merci pour cet indicateur ! je l'observe sur les actions du Nasdaq et la plupart ...
Pensera Bravo Nicolas ! Tu es en quelque sorte l’inventeur de Metascore…(oups je viens de lire jusqu...
Nicolas Dans un but d'investissement pure, et non spéculatif.
Enigma08 Hi Juanj. I am new to ProrealTime and I am trying to program the Proscreener. I want the Pro...
Fabian Hi Thomas, thanks for your explanations. Which indicator do you use in the screenshot ...
Thomas Thats On Balance Volume and Bollinger or SMA or what you want. It shows me the volume flow. ...
bertrandpinoy @MAKSIDE I would be grateful if you send me your version. have a nice day

Top