Advanced Market Forecast Indicator & Scanner for ThinkorSwim

Hi there, I'm somewhat new to TOS, brand new to working with scripts. My question is how would I do a scan for tickers that are under the 10 line for the Market Forecast Study? Currently when I go to do a scan it says that I have to compare MarketForecast to another study, but I wanted to independently scan for market Forecast under the 10 line. Thank You.
-Much appreciated from a novice trader.
 

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

rF3Q0fr.png

To Use The ToS Market Forecast In The Scan Hacker Wizard:
  1. Left Column: Choose which Market Forecast component: Momentum, NearTerm and Intermediate.
  2. Middle Column: Click on "is less than:
  3. Right Column: Click on down arrow, scroll down to Value, enter your value of 10
Shared Scan Link: http://tos.mx/iZD5ktg Click here for --> Easiest way to load shared links
rLL7ayU.png


moUgS8D.png
 
Hi all, this is my first contribution post. This MarketForecast script comes from Ken Rose at TD Ameritrade, where he enhanced the MarketForecast Tool proprietary to TOS. Here it is called MarketForecastEnhanced and the lower study MarketForecastEnhancedLower. The lower study is much like other scripts found in this thread inserting an "overbought" 80 level and an "oversold" 20 level. The upper study plots a red dot signalling a bearish cluster where all three lines are above 80 and also plots a green dot signalling a bullish cluster where all three lines are below 20.

The interesting ways to use this study have already been detailed previously in this tread and I use it similarly. I have also built a scan which attempts to return a list of stocks which have a red dot or a green dot on the current bar. I run this scan on both the weekly charts and the daily charts but it works on any time frame you might want to apply. The only two lower studies I use are the MarketForecast and RSILaguerre (Thank you Don Kaufman from TheoTrade) and together help me get onboard a trend early for my preferred swing trade approach. When these dots are in close proximity to a fractal may be even more predictive.

Here is the MarketForecastEnhanced Upper Study:

Code:
#Follow Ken Rose on twitter @KRose_TDA for updates to this and other custom scripts

# Market Forecast system
# This thinkscript will put red dots on the upper price chart above the corresponding candles when a bearish Market Forecast cluster forms. It will put green dots below the candles when bullish clusters form.
# It is used mostly as a cautionary flag to determine if a stock that we are considering purchasing has legitimate overbought conditions(red dots) at that time.
# Market Forecast system parameters
input showClusters = yes;      # Display markers on the chart for cluster patterns
def upper_reversal = 80;
def lower_reversal = 20;
def greenline = reference MarketForecast.intermediate;
def blueline = reference MarketForecast.NearTerm;
def redline = reference MarketForecast.momentum;
#Define bullish and bearish clusters
def BullishCluster = greenline < 20 and redline < 20 and blueline < 20;
def BearishCluster = greenline > 80 and redline > 80 and blueline > 80;

# Plot the bullish clusters as green dots below the day's candle
plot data9 = if showClusters and BullishCluster then low * 0.990 else Double.NaN;
data9.SetPaintingStrategy(PaintingStrategy.POINTS);
data9.SetLineWeight(5);
data9.AssignValueColor(Color.DARK_GREEN);
data9.HideBubble();
data9.HideTitle();
# Plot the bearish clusters as blue dots above the day's candle
plot data10 = if showClusters and BearishCluster then high * 1.01 else Double.NaN;
data10.SetPaintingStrategy(PaintingStrategy.points);
data10.SetLineWeight(5);
data10.AssignValueColor(Color.red);
data10.HideBubble();
data10.HideTitle();

Here is the MarketForecastEnhancedLower study:

#follow @KRose_TDA on twitter for updates to this and other custom studies

declare lower;

input OverBought = 80;
input OverSold = 20;
input Show_Labels = yes;

plot Momentum = MarketForecast();
Momentum.SetDefaultColor(Color.RED);
AddLabel(Show_Labels, "Momentum: " + AsText(Momentum, NumberFormat.TWO_DECIMAL_PLACES), Color.RED);

plot NearTerm = MarketForecast().NearTerm;
NearTerm.SetDefaultColor(Color.BLUE);
AddLabel(Show_Labels, "Near Term: " + AsText(NearTerm, NumberFormat.TWO_DECIMAL_PLACES), color.BLUE);

plot IntTerm = MarketForecast().Intermediate;
IntTerm.SetDefaultColor(CreateColor(51, 204, 0));
AddLabel(Show_Labels, "Intermediate Term: " + AsText(IntTerm, NumberFormat.TWO_DECIMAL_PLACES), (CreateColor(51, 204, 0)));


plot OB_line = OverBought;
OB_line.SetDefaultColor(Color.RED);
OB_line.SetLineWeight(2);

plot OS_line = OverSold;
OS_line.SetDefaultColor(Color.GREEN);
OS_line.SetLineWeight(2);

AddCloud(0, OS_line, Color.GREEN, Color.GREEN);
AddCloud(100, OB_line, Color.RED, Color.RED);

Here is the SCAN script:

MarketForecast()."Momentum" is greater than or equal to 80.00 and MarketForecast()."NearTerm" is greater than or equal to 80.00 and MarketForecast()."Intermediate" is greater than or equal to 80.00 or MarketForecast()."Momentum" is less than or equal to 20.00 and MarketForecast()."NearTerm" is less than or equal to 20.00 and MarketForecast()."Intermediate" is less than or equal to 20.00
 
Last edited by a moderator:
TOS MarketForecast()."Intermediate" Label

I use the TOS MarketForecast()."Intermediate" to indicate trend direction and strength.
Can use as a lower study indicator and label or eliminate the lower study and keep the label in the upper-chart, by dragging it to the upper chart and un-plotting the lines by clicking on the gear and unchecking 'show plot'.

View attachment 8740

Here is the shared chart: https://tos.mx/omqBpCU

Explanation of colors:
if Intermediate>= 80 then "Bull" color cyan
if Intermediate<= 20 then "Bear" color red
if Intermediate>previous candle then "Rising" color green
if Intermediate<previous candle then "Falling" color pink

You can read more about this indicator here
Can we add lines in the 80, 50, and 20 on the indicator?
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
433 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