Advanced Market Forecast Indicator & Scanner for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
@PATrader Try splitting them into two separate scanners. This one worked for me.

eE4Iha1.png
 

PATrader

New member
VIP
rdPyh2e.png


Ben, I am sharing my JNJ chart in the link here. The Short term, Medium Term and Long term lines are very divergent and there is no "cross over" There must be a fundamental difference in what I am scanning and what your scanners are set to?
 

BenTen

Administrative
Staff member
Staff
VIP
@PATrader Do you know what you are trying to scan for? If so, do tell me the condition, and I can help you look into it. I'm not sure if the pre-built conditions I put in the original are still valid.
 

PATrader

New member
VIP
Ben, I used the script from your very first post, on page 1. I am trying to get to a scanner that had JNJ as the output.
 

BenTen

Administrative
Staff member
Staff
VIP
@PATrader Please look at my comment and screenshot again in message #41.

I used the same thing I posted on the first page of this thread....except each condition belongs to one separate scanner.

Old scan:

Code:
MarketForecast()."Momentum" crosses above MarketForecast()."NearTerm" and MarketForecast()."NearTerm" crosses above MarketForecast()."Intermediate"

New scan:

Code:
MarketForecast()."Momentum" crosses above MarketForecast()."NearTerm"

Code:
MarketForecast()."NearTerm" crosses above MarketForecast()."Intermediate"
 

PATrader

New member
VIP
Ben, its working now, finally! really appreciate your patience while I was correcting silly errors in redefining the volume.

Here is screenshot of the scanner:

OA8tzBn.png


I usually add a universal condition set for optionable, price, volume and earnings, then "any of the conditions": bullish/bearish.
Thanks again...
 

Hybety

New member
VIP
Is it just me or does anyone else notice the major trend predicted when the Med term (green) line crosses through the Near term (red) line when Near term forms a triangle?
 
Since there is already a TD study called MarketForcast I tried to rename the scanner to something different, but now the scanner won't work when I change the name in the code to match the new scanner. How do I make this work
 
This scanner seems to be working well after this week, but does anyone know other conditions that work well in conjunction with this scanner?
 

mrsaver11

New member
How about adding the value of intermediate only on watchlist. I was able to delete some codes and just leave the intermediate plot code and it works on tos platform. But it will not show up on tos mobile. I use my phone a lot and wanted to see it it works on mobile. I want to sort out my watchlist with the intermediate value so i can glance right away and sort out which stocks is trending and possible reversing. Thanks
 

J007RMC

Well-known member
2019 Donor
Page Link: https://usethinkscript.com/threads/...ators-i-use-every-day.4114/page-12#post-59239 Thread #225

Here's the link: http://tos.mx/3DsfpbU

This is the default TOS Market Forecast indicator with a few colors added to the Interim line.
The color coding is as follows (feel free to modify):
orange - overbought and falling
blue - overbought and rising
red- definitely falling
pink- oversold and falling
plum-oversold and rising
green - rising
blue squares - momentum crossed over the near term
plum squares - momentum crossed below the near term (this is commented out however you can remove the #)
big and small cluster dots - approaching potential reversal or pushing further in the trending direction.

Obviously, there's no need to memorize the colors as you can easily see the associations once the indicator is loaded. I would suggest using this on the 5min, 30min and higher time frames. Also when trading...don't just look at a one-time frame. For example, I often trade on the 5min TF but always look at the 30min and daily TF. I love the Market Forecast indicator on the daily for swing trading. Also, I initially thought having the momentum line was too noisy but I would suggest keeping the momentum line. The indicator is great with reversals and this is where the momentum line comes in. Lastly....there are many youtube videos on the Market Forecast indicator so if you would like to learn how to use it....check youtube. I've given you the treasure map....go and find the gold.

As recommended 30-min chart
 

Miami51961

Member
VIP
The Advanced Market Forecast indicator is a powerful tool that offers near term trend, intermediate, and momentum oscillator for ThinkorSwim. Similar to RSI and MFI, there will be levels of overbought and oversold. When the stock reaches these levels with the right confirmation, traders can expect a pullback or reversal.

There will be a scanner at the end of this post to help you scan for bullish and bearish signals produced by the Advanced Market Forecast indicator.

oxpSbjI.png


Notes:
  • Green line = Intermediate Confirmation Signal
  • Dark blue = Near term line
  • Red = Momentum
You can also draw divergences using the blue near term line just like the MACD and RSI indicators.

thinkScript Code

Rich (BB code):
#Name: Dilbert_StanL_MarketForecast_TMF_original
#StudyName: Dilbert_StanL_MarketForecast_TMF_original
#Description: Replica of Investools MarketForecast study
#Author: Dilbert/Stanl/Mobius and assorted others you tried to crack this
#Requested By:
# Ver     Date     Auth      Change
# v2      012817   Dilbert   Finally calculate the momentum line correctly. Scale to 100 instead of 200.
# TOS.mx Link:
# Trading Notes:

# Market Forecast
# StanL
#
#hint:<b>Market Forecast</b>modified with upper and lower reversal zones and labels. Is a double-scale version of the original. All plots maintain their relation with 2X scale.

declare lower;
input ImedLength = 31; # orig std = 31
input MomentumLength = 5; # orig std = 31
input NearLength = 3; # orig std = 3

  def c1I = close - lowest(low,ImedLength);
   def c2I = highest(high,ImedLength) - lowest(low,ImedLength);
   def FastK_I = c1I / c2I * 100;
   def c1N = close - lowest(low,NearLength);
   def c2N = highest(high,NearLength) - lowest(low,NearLength);
   def FastK_N = c1N / c2N * 100;

   def c1M = close - lowest(low,MomentumLength);
   def c2M = highest(high,MomentumLength) - lowest(low,MomentumLength);
   def FastK_M = c1M / c2M * 100;
  Plot Intermediate = Average(FastK_I, 5); #  = TMF's GreenLine
     Intermediate.AssignValueColor(color.Green);
     Intermediate.SetStyle(Curve.FIRM);
     Intermediate.SetLineWeight(2);
   Plot NearTerm = Average(FastK_N, 2);     #  = TMF's BlueLine
     NearTerm.AssignValueColor(color.Blue);
     NearTerm.SetStyle(Curve.FIRM);
     NearTerm.SetLineWeight(1);

def Min1 = Min(low, low[1]);
def Min2 = Min(min1, Min(low[2], low[3]));
def Max1 = Max(high, Max(high[1], Max(high[2], high[3])));

plot momentum = ((close - Min1) / (Max1 - Min2)) * 100;
momentum.setDefaultColor(Color.Red);

plot bottomline = 0;
     bottomline.AssignValueColor(color.gray);
     bottomline.SetStyle(Curve.FIRM);

plot topLine = 100;
     topLine.AssignValueColor(color.gray);
     topLine.SetStyle(Curve.FIRM);

plot UpperRevZone = 80;
     bottomline.AssignValueColor(color.gray);
     bottomline.SetStyle(Curve.FIRM);

plot LowerRevZone = 20;
     LowerRevZone.AssignValueColor(color.gray);
     LowerRevZone.SetStyle(Curve.firm);
plot UpLimit = 120;
     UpLimit.AssignValueColor(color.black);

AddCloud(bottomline, LowerRevZone, color.green, Color.green);
AddCloud(topLine, UpperRevZone, color.RED, color.red);
AddLabel (yes, "Mom(short)", Color.yellow);
AddLabel (yes, "Near term", Color.red);
AddLabel (yes, "Med term", Color.green);

# Below lines are related to a scan
#   def ClusterHigh = Intermediate >= 80 && NearTerm >= 80 && Momentum >= 80 ;
#   def ClusterLow = Intermediate <= 20 && NearTerm <= 20 && Momentum <= 20;
#   plot cluster = if clusterhigh or clusterlow then 1 else 0;
#---------- End Of Code ---------------

Shareable Link: https://tos.mx/x1ssTZ

Market Forecast Bullish Scanner
Rich (BB code):
MarketForecast()."Momentum" crosses above MarketForecast()."NearTerm" and MarketForecast()."NearTerm" crosses above MarketForecast()."Intermediate"

Market Forecast Bearish Scanner
Rich (BB code):
MarketForecast()."Momentum" crosses below MarketForecast()."NearTerm" and MarketForecast()."NearTerm" crosses below MarketForecast()."Intermediate"

Don't forget to replace MarketForecast with the name of your indicator.
Hello Ben 10,
Being new here, I am working on the coding. I followed your code and did replace MarketForecast with my name MarketForecast2 and it gives me an error saying can not find the function
What do I need to do
Thanks for any help
Miami51961
 

rad14733

Well-known member
VIP
Hello Ben 10,
Being new here, I am working on the coding. I followed your code and did replace MarketForecast with my name MarketForecast2 and it gives me an error saying can not find the function
What do I need to do
Thanks for any help
Miami51961

Did you inadvertently rename the MarketForecast call to MarketForecast2 in the code itself, which isn't what @BenTen was referring to...??? I believe he meant to rename the script...
 

Miami51961

Member
VIP
You're welcome. Try using it with heikin Ashi candles, it helps show the turning point when you have a string of dots.
Hello, I like your ideas and this indicator is the bomb. I do have one question. Im still a new hear but soaking up everything I can. You mention that you could create a scanner with the Arrows. My attempt was not good, said to many receptions. How would I go about to make up a scanner for stocks showing an up arrow within one day? Greg
 

Miami51961

Member
VIP
Hello, I like your ideas and this indicator is the bomb. I do have one question. Im still a new hear but soaking up everything I can. You mention that you could create a scanner with the Arrows. My attempt was not good, said to many receptions. How would I go about to make up a scanner for stocks showing an up arrow within one day? Greg
I think I figured it out
 

Similar threads

Top