Advanced Market Forecast Indicator & Scanner for ThinkorSwim

cswu1211

Member
VIP
I added the following lines and it serve my need: though it is not very nice

Rich (BB code):
def BullCluster = momentum <=20 and intermediate <=20 and nearterm <=20;
def BearCluster = momentum >=80 and intermediate >=80 and nearterm >=80;
AddVerticalLine(Bullcluster , "Up", Color.UPTICK);
AddVerticalLine(BearCluster , "Down", Color.LIGHT_RED);
pls advise where to add the lines? I tried but fail to work
 

autoloader

New member
The script I posted here shows dots instead of lines. pay attention to the big green dots and other dots as well.

That is an excellent version of the Market Forecast indicator. I have found it very useful. Thanks for posting it, Moose.
 

Moose

Member
That is an excellent version of the Market Forecast indicator. I have found it very useful. Thanks for posting it, Moose.
This is the upper study, will show you the major market bottoms. I usually use it on daily and weekly HeikinAshi chart. you can make a scanner based on the arrows.

Code:
input LowLevel = 20;
input HighLevel = 80;

def Intermediate = reference marketforecast.Intermediate;
def NearTerm = reference marketforecast.NearTerm;
def Momentum = reference marketforecast.Momentum;
def ClusterHigh = Intermediate>=HighLevel && NearTerm>=HighLevel && Momentum>=HighLevel ;
def ClusterLow = Intermediate<=LowLevel && NearTerm<=LowLevel && Momentum<=LowLevel;

plot cluster = clusterhigh or clusterlow;
Plot Cluster_HiSignal = !clusterhigh and clusterhigh[1];
plot Cluster_LoSignal = !clusterlow and clusterlow[1];


cluster.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
Cluster_HiSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
Cluster_LoSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
cluster.setLineWeight(5);
cluster_HiSignal.setLineWeight(5);
cluster_LoSignal.setLineWeight(5);

cluster_HiSignal.SetDefaultColor(color.Red);
cluster_LoSignal.SetDefaultColor(color.Green);
Cluster.AssignValueColor(if ClusterHigh then color.Red else color.Green);

Alert(cluster,"Market Forecast Cluster",alert.Once,Sound.Bell);
 

autoloader

New member
@Moose
Outstanding. That gives a lot of great signals and shows them clearly. The MF indicator is one of the best ones available, in my opinion. Thank you, Moose.

I'll check out those heikin Ashi candles. I've used regular candles for years but haven't yet delved into the other varieties of candlesticks.
 
Last edited:

MerryDay

Administrative
Staff member
Staff
VIP
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'.

aKCL5LG.png


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
 

lostmarxbro

New member
I don't see anything better than simple accumulation momentum right now and this definitely shows when momo is slowing
 
Last edited:

cswu1211

Member
VIP
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'.

aKCL5LG.png


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
great jobs
 

tjlizwelicha

Active 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.
When I enter the second "Near Term" do I save it first and enter it again?
 

PATrader

New member
VIP
I am able to create the scanner, but not getting any scan results on the daily time frame. Is the scanner good for shorter time frames?
 

BenTen

Administrative
Staff member
Staff
VIP
@PATrader What does your scanner look like? Please post a screenshot of it. You can also double check by switching between different timeframes to see if they give you any results.
 

BenTen

Administrative
Staff member
Staff
VIP
@PATrader Just to confirm, you have the following conditions in your scanner:
  • Momentum line crosses below Near term line AND Nearterm line crosses below Intermediate line
Is that correct? You may want to check on that.
 

PATrader

New member
VIP
yes that how it is, either of two (Bullish) and (Bearish) sub groups, each group has "and" for the condition. I took your script above from this thread
 

Similar threads

Top