Thinkorswim Alert TTM Trend 7


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.

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);

__ Support our free content by making a purchase below. Thanks! __

Comments Drive Content of Future Posts:

7 thoughts on “Thinkorswim Alert TTM Trend

  • 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