Trend Meter For ThinkOrSwim

Is there a way to remove the MTF feature from this code at all. I would love to use this for other timeframes that the MTF wont allow for. Please let me know at your earliest convenience. Thanks!!!

It is not necessary to "remove" the MTF feature, in order to use the non-MTF script.
422VQTS.png

The above is an example of a weekly chart.

1. click on the gear in chart settings.
2. make sure it is set to NOT use the mtf feature
use chart time frame == yes
3. make sure the aggregation is set to higher that your chart timeframe

If you are still having problems, here is a shared chart link: http://tos.mx/!UlvFxiiw
Make sure to use these instructions when importing shared chart links:
https://usethinkscript.com/threads/...ed-item-error-in-thinkorswim.5098/#post-57930
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Samer800:
I am using the standard ToS Momentum indicator (35 periods) to weed out candidates. I plot the Momentum indicator in my new Trend Meter chart and it aligns pretty close with Trend Meter buy/sell signals. I scan stocks based on Momentum indicator. Hope this helps.
 
Last edited by a moderator:
i can't get it to work on my TOS. help out here
@samer800

You did not provide enough information to say where you went astray.

Here is another approach.
This is a shared chart link: http://tos.mx/!xUrwYptA

1. You MUST import this link using these instructions:
https://usethinkscript.com/threads/...ed-item-error-in-thinkorswim.5098/#post-57930

2. This will open a chart with the indicator already applied.
3. This will put the indicator into your library for you to use however you wish.

Dn5Lrln.png
 
Is there a way to code and highlight buy and sell signals which appear on chart in Trade Meter study

Yes, the first line of plots are the signals
The squares are "Signals 1 - Wave Trend Signals"
The dots are # "Signals 2 - All 3 Trend Meters Now Align"

green = bullish red = bearish
you must have showtrendline set to yes.
 
Yes, the first line of plots are the signals
The squares are "Signals 1 - Wave Trend Signals"
The dots are # "Signals 2 - All 3 Trend Meters Now Align"

green = bullish red = bearish
you must have showtrendline set to yes.
TY Merry
 
Yes, the first line of plots are the signals
The squares are "Signals 1 - Wave Trend Signals"
The dots are # "Signals 2 - All 3 Trend Meters Now Align"

green = bullish red = bearish
you must have showtrendline set to yes.
Anyway to get an audible alert when this happens? Thanx
 
I noticed for me the dots never turn green. And looking in your picture I dont see that also. Is there a way to adjust the code to see green dots for positive momentum and grey be neutral.

Or is set to just red or grey?
 
I noticed for me the dots never turn green. And looking in your picture I dont see that also. Is there a way to adjust the code to see green dots for positive momentum and grey be neutral.

Or is set to just red or grey?

It is not possible to say where you went astray.
Here is a shared chart link with the indicator already applied which displays the green and red dots / squares
https://usethinkscript.com/threads/trend-meter-for-thinkorswim.13179/page-2#post-144475
 
Anyway to get an audible alert when this happens? Thanx

for Trend Meter Alerts, append the following snippet to the end of your study:
Alert(WaveTrendSignalLine and MSBar1Color > 0, "bullish waveTrend", Alert.Bar, Sound.ding);
Alert(WaveTrendSignalLine and MSBar1Color < 0, "bearish waveTrend", Alert.Bar, Sound.ring);
Alert(TrendMeterLine and MSBar2Color > 0, "bullish trendMeter", Alert.Bar, Sound.ding);
Alert(TrendMeterLine and MSBar2Color < 0, "bearish trendMeter", Alert.Bar, Sound.ring);
 
Does this indicator work for shorter timeframes. If yes, what changes to the indicator settings need to be made for shorter timeframes - i.e. 5 or 1 min?
 
Just wondering, why is the TB2 Slow is defaulted to SMA where all the other ones are set to EMA? Is this a simple mistake or a strategy I'm not aware of?
 
Just wondering, why is the TB2 Slow is defaulted to SMA where all the other ones are set to EMA? Is this a simple mistake or a strategy I'm not aware of?

No, the script contains no mistakes.
As to the question of why the author chose those defaults would need to be addressed to the author here:
https://www.tradingview.com/script/Ciurp4Qn-Trend-Meter/

Try charting with the SMA and then the EMA and observe the differences.
Review what works best for your strategy.

If you have this question, so probably will one or more of the 10,000 forum viewers.
So come back and update us, as to which you feel works better and how.
 
Last edited by a moderator:
Here’s a more streamlined version:
Ruby:
#// Created By Lij_MC
#// Use as a supplementary Indicator to confirm your entries, but it is as good on its own.
#// The indicator consists of 3 different Trend Meters and a Trend Bar which are used to confirm trend
#// As a bonus Wave Trend Signals are marked as well, these are very powerful however please use with caution
#// How to Use
#// Look for Support or Resistance Levels for price to be attracted to
#// Find confluence with other indicators
#// Enter Long above the Setup Bar
#// Enter Short Below the Setup Bar
#study(title="Trend Meter")
# Converted and mod by Sam4Cok@Samer800 - 10/2022
# Added Price Color option by Sam4Cok@Samer800 - 11/2022 as requested from useThinkScript.com member

# Inputs
input ColorBars = no;
input ShowTrendBar = yes;
input UseChartTimeFrame = yes;
input Aggregation = AggregationPeriod.DAY;
input ma1_Length = 5;
input ma1_Type = {default "EMA", "SMA"};
input ma2_Length = 11;
input ma2_Type = {default "EMA", "SMA"};
input ma3_Length = 13;
input ma3_Type = {default "EMA", "SMA"};
input ma4_Length = 29;
input ma4_Type = {"EMA", default "SMA"};

# Colors
DefineGlobalColor("green", CreateColor(40, 138, 117));
DefineGlobalColor("Red", CreateColor(255, 82, 82));
DefineGlobalColor("Purple", CreateColor(128, 0, 128));
DefineGlobalColor("Brown", CreateColor(165, 42, 42));

# Wave Trend
def c = if UseChartTimeFrame then close else close(Period = Aggregation);
def ap = if UseChartTimeFrame then hlc3 else hlc3(Period = Aggregation);
def esa = ExpAverage(ap, 9);
def de = ExpAverage(AbsValue(ap - esa), 9);
def ci = (ap - esa) / (0.015 * de);
def tci = ExpAverage(ci, 12);
def wt1 = tci;
def wt2 = SimpleMovingAvg(wt1, 3);

# Wave Trend Conditions
def WTCrossUp = wt2 - wt1 <= 0;
def WTCrossDown = wt2 - wt1 >= 0;

# MA Calculations
def MA1 = if ma1_Type == ma1_Type."SMA" then SimpleMovingAvg(c, ma1_Length) else ExpAverage(c, ma1_Length);
def MA2 = if ma2_Type == ma2_Type."SMA" then SimpleMovingAvg(c, ma2_Length) else ExpAverage(c, ma2_Length);
def MA3 = if ma3_Type == ma3_Type."SMA" then SimpleMovingAvg(c, ma3_Length) else ExpAverage(c, ma3_Length);
def MA4 = if ma4_Type == ma4_Type."SMA" then SimpleMovingAvg(c, ma4_Length) else ExpAverage(c, ma4_Length);

# MA Crossover Conditions
def MACrossover1 = MA1 > MA2;
def MACrossover2 = MA3 > MA4;

# MA Direction Conditions
def MA1Direction = MA1 > MA1[1];
def MA2Direction = MA2 > MA2[1];
def MA3Direction = MA3 > MA3[1];
def MA4Direction = MA4 > MA4[1];

# Plot Wave Trend
plot WaveTrend1 = wt1;
plot WaveTrend2 = wt2;
WaveTrend1.SetDefaultColor(Color.CYAN);
WaveTrend2.SetDefaultColor(Color.MAGENTA);

# Add Labels for Alerts
AddLabel(WTCrossUp, "Buy Signal", Color.GREEN);
AddLabel(WTCrossDown, "Sell Signal", Color.RED);
AddLabel(MACrossover1, "MA Crossover 1", Color.BLUE);
AddLabel(MACrossover2, "MA Crossover 2", Color.ORANGE);
AddLabel(MA1Direction, "MA1 Direction", GlobalColor("Purple"));
AddLabel(MA2Direction, "MA2 Direction", Color.PINK);
AddLabel(MA3Direction, "MA3 Direction", GlobalColor("Purple"));
AddLabel(MA4Direction, "MA4 Direction", GlobalColor("Brown"));
 
Last edited by a moderator:
  • Love
Reactions: IPA

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
468 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top