Thinkorswim Alert TTM Trend 30


Finally, an Alert Based on TTM Trend

Responding to numerous requests from viewers like you, this video shows how to add an Alert to the TTM Trend.

Thinkorswim Alert TTM Trend

Thinkorswim Alert TTM Trend

The TTM Trend is a licensed Study listed in Thinkorswim under the category name John Carter. For some reason the built in version does not provide audible alerts when the colors change from red to blue and back again. Well fortunately Thinkorswim provides a way to accomplish this without violating any copyright laws.

 

In this brief video you will see how the TTM Trend indicator is referenced from inside a custom study. We’ll explain how this is possible and then show you how to simply add a few lines of code to include the Alert feature.

Lean More:

Would you like to learn how to master the chart settings on Thinkorswim? Click here for our 3 part series: Thinkorswim Chart Settings Tutorial

DISCLAIMER: I AM NOT A CERTIFIED FINANCIAL ADVISOR AND NOTHING IN THIS VIDEO OR TEXT IS AN ADVERTISEMENT OR RECOMMENDATION TO BUY OR SELL ANY FINANCIAL INSTRUMENT. NOR IS THIS VIDEO OR TEXT INTENDED TO INSTRUCT YOU ON HOW TO MAKE BUY OR SELL DECISIONS USING ANY OF THESE INDICATORS.

*Thinkorswim is a chart analysis platform offered by TD Ameritradewww.tdameritrade.com

TD Ameritrade provides financial services including the trading of Stocks, Futures, Options and Forex.

 

Please be sure to share this page with your friends and colleagues. Leaving comments below is the best way to help make the content of this site even better.

 

Watch the video, Thinkorswim Alert TTM Trend below:

input compBars = 6;
input paintBars = yes;
def upTrend = TTM_Trend(compBars, paintBars).TrendUp;
def downTrend = TTM_Trend(compBars, paintBars).TrendDown;
def bullReversal = upTrend and downTrend[1] == yes;
Alert(bullReversal, "Bullish Trend", Alert.BAR, Sound.RING);
def bearReversal = downTrend and upTrend[1] == yes;
Alert(bearReversal, "Bearish Trend", Alert.BAR, Sound.RING);

About Pete Hahn

For those trying to contact me about our professional services you will find all those details here: https://www.hahn-tech.com/about/ Any questions not related to our professional services or premium indicators should be directed to the comment section of the applicable video or you may post a question in our Q&A Forum: https://www.hahn-tech.com/thinkorswim-forum-topics/

Questions? Comments? Post a review?

30 thoughts on “Thinkorswim Alert TTM Trend

  • Jeff Payne

    Can you modify the code to send a text message like the Chart alert feature in TOS? Looks like a simple trade after 18:00 works well, but I don’t want to sit in my office from 18_00 to 22:00 Sun/Thurs night. 🙂 Thanks.

  • Veena.

    With the regular TTM_Trend indicator, my colors for up and down bars are changed to blue and red as you see on your screen. But with this new script, the color changes to green and orange as I had it before adding TTM_Trend. How can I change the colors too. Also, tried adding the older script completely and see if the colors change, but they did not. Is there any other setting I need to set or change my code?

    • Pete Hahn Post author

      The version published with this video does not change the colors of the bar and only produces alerts. If you want the bars to be painted you will need to also add the original.

  • Nia

    oops forgot to add my attemt at fixing the code that came in on youtube. The line after input alert line is red but I don’t know if that’s the only thing wrong bec you fix one thing and something else becomes red. Please fix Thanks
    #”TTM_TrendAlert”
    input price = CLOSE;
    input length = 20;
    input nK = 1.5;
    input nBB = 2.0;
    input alertLine = 1.0;
    input TTM_Trend = TTM_Trend(close, length, nK, nBB, alertLine).TrendAlert;
    def TTM_trend = TTM_Trend(close, length, nK, nBB, alertLine).TrendAlert;
    plot TTM_Trend = TTM_Trend(close, length, nK, nBB, alertLine).TrendAlert;
    def upTrend = TTM_Trend(price, length, nK, nBB, alertLine).TrendUp;
    def downTrend = TTM_Trend(price, length, nK, nBB, alertLine).TrendDown;
    def bullReversal = upTrend and downTrend[1] == yes;
    def bearReversal = downTrend and upTrend[1] == yes;
    Alert(bullReversal, “Bullish Trend”, alertLine, Sound.Ring);
    Alert(bearReversal, “Bearish Trend”, alertLine, Sound.Ring);

    • Pete Hahn Post author

      This is not the code that I provided on the website. I just tested the code from the website and it works perfectly. If you are getting errors you are probably not copying the entire code. From the code you just posted here, it looks like you have tried to add some inputs that only apply to the TTM_Squeeze.

  • serbor416Andrei

    Thanks so much for putting this together. Question, how the code needs to be modified to use it with marketwatch alerts. For instance condition 1: TTM_trend is up Condition 2: MACD is crossing up. Thank you.

  • JB

    Is there a way to get a text message from this Alert. When I copy to the alert editor it doesn’t like the TTM_Trend variable.
    Thanks.
    JB