Twiggs Money Flow Indicator for ThinkorSwim

germanburrito

Active member
eu1MRT5.png

Twiggs Money Flow is often considered superior to other money flow indicators because it incorporates "True Range" in its calculation, which allows it to better identify buying and selling pressure, especially when significant price gaps occur, unlike other indicators like Chaikin Money Flow that might be distorted by such gaps; additionally, Twiggs Money Flow utilizes exponential smoothing for a smoother signal, providing a more reliable indication of potential trend changes.

Key points about Twiggs Money Flow's advantages:
True Range Consideration:
Unlike other money flow indicators that might only use the standard range (high minus low), Twiggs Money Flow uses True Range, which takes price gaps into account, providing a more accurate picture of market volatility and potential buying/selling pressure, especially when large price gaps happen.​

Wilders Smoothing:
This Twiggs Money Flow employs Wilders smoothing, which is considered a more responsive and accurate method of smoothing price data compared to simple moving averages, leading to clearer signals and less noise.​

Identifying Accumulation and Distribution:
By analyzing the values above and below zero, traders can effectively identify periods of strong accumulation (positive values) and distribution (negative values)​

Code:
declare lower;
input periods = 21;
input over_Bought = .20;
input over_Sold = -.20;

def C = close;
def H = high;
def L = low;
def V = volume;

def TRH = Max(H,C[1]);
def TRL = Min(L, C[1]);
def TR = TRH - TRL;
def ADV =((C-TRL)-(TRH-C))/ (If TR == 0 then 999999 else TR) * V;

plot NewCMF = if WildersAverage(V,periods) == 0
              then 0
              else WildersAverage(ADV, periods) / WildersAverage(V, periods); 

plot ZeroLine = 0;
ZeroLine.SetDefaultColor(GetColor(5));                

plot OverSold = over_Sold;
plot OverBought = over_Bought;

NewCMF.DefineColor("OverBought", GetColor(5));
NewCMF.DefineColor("Normal", GetColor(7));
NewCMF.DefineColor("OverSold", GetColor(1));
NewCMF.AssignValueColor(if  NewCMF > over_Bought then  NewCMF.color("OverBought") else if  NewCMF < over_Sold then  NewCMF.color("OverSold") else  NewCMF.color("Normal"));
 
Last edited by a moderator:
Hello German,

I added a moving average to the CMF as a signal, also added a cloud
g2z5u4r.png


Code:
###################

declare lower;
input periods = 21;
Input LengthA = 5;
input over_Bought = .20;
input over_Sold = -.20;


def C = close;

def H = high;

def L = low;

def V = volume;

def TRH = Max(H,C[1]);

def TRL = Min(L, C[1]);

def TR = TRH - TRL;

def ADV =((C-TRL)-(TRH-C))/ (If TR == 0 then 999999 else TR) * V;

plot NewCMF = if WildersAverage(V,periods) == 0

              then 0

              else WildersAverage(ADV, periods) / WildersAverage(V, periods);
Plot NewCMFA = ExpAverage(NewCMF,LengthA);
NewCMFA.SetDefaultColor(Color.Yellow);
plot ZeroLine = 0;
AddCloud(NewCMF,Zeroline,Color.Green,Color.Red);
ZeroLine.SetDefaultColor(color.gray);                

plot OverSold = over_Sold;
OverSold.SetDefaultColor(Color.Orange);
OverSold.SetPaintingStrategy(PaintingStrategy.Dashes);
plot OverBought = over_Bought;
OverBought.SetDefaultColor(Color.Orange);
OverBought.SetPaintingStrategy(PaintingStrategy.Dashes);

NewCMF.DefineColor("OverBought", GetColor(5));
NewCMF.DefineColor("Normal", GetColor(7));
NewCMF.DefineColor("OverSold", GetColor(1));
NewCMF.AssignValueColor(if  NewCMF > over_Bought then  NewCMF.color("OverBought") else if  NewCMF < over_Sold then  NewCMF.color("OverSold") else  NewCMF.color("Normal"));
NewCMF.SetLineweight(3);

I have created your money flow indicator into a binary signal w 3 MTF. The triangles are Cyan if the MF is Bullish, Red when overbought, Magenta when Bearish and Green when oversold

Here is the code

Code:
##############
Declare Lower;
DefineGlobalColor("Bullish", Color.Cyan);
DefineGlobalColor("Bearish", Color.Magenta);
DefineGlobalColor("OverSold", Color.Green);
DefineGlobalColor("OverBought", Color.Red);
DefineGlobalColor("Normal", Color.Gray);

input agg1 = AggregationPeriod.FIVE_MIN;
input agg2 = AggregationPeriod.Thirty_MIN;
input agg3 = AggregationPeriod. Hour;
input periods = 21;
Input LengthA = 5;
input over_Bought = .20;
input over_Sold = -.20;
input show_dots=yes;
input DotSize = 3;

Def AC = Close(Period = Agg1);
Def BC = Close(Period = Agg2);
Def CC = Close(Period = Agg3);
Def AH = High(Period = Agg1);
Def BH = High(Period = Agg2);
Def CH = High(Period = Agg3);
Def AL = Low(Period = Agg1);
Def BL = Low(Period = Agg2);
Def CL = Low(Period = Agg3);
Def AV = Volume(Period = Agg1);
Def BV = Volume(Period = Agg2);
Def CV = Volume(Period = Agg3);

def ATRH = Max(AH,AC[1]);
def BTRH = Max(BH,BC[1]);
def CTRH = Max(CH,CC[1]);
def ATRL = Min(AL, AC[1]);
def BTRL = Min(BL, BC[1]);
def CTRL = Min(CL, CC[1]);

def TRa = ATRH - ATRL;
def TRb = BTRH - BTRL;
def TRc = CTRH - CTRL;

def AADV =((AC-ATRL)-(ATRH-AC))/ (If TRa == 0 then 999999 else TRa) * AV;
def BADV =((BC-BTRL)-(BTRH-BC))/ (If TRb == 0 then 999999 else TRb) * BV;
def CADV =((CC-CTRL)-(CTRH-CC))/ (If TRc == 0 then 999999 else TRc) * CV;

Def ANewCMF = if WildersAverage(AV,periods) == 0
              then 0
              else WildersAverage(AADV, periods) / WildersAverage(AV, periods);
Def BNewCMF = if WildersAverage(BV,periods) == 0
              then 0
              else WildersAverage(BADV, periods) / WildersAverage(BV, periods);
Def CNewCMF = if WildersAverage(CV,periods) == 0
              then 0
              else WildersAverage(CADV, periods) / WildersAverage(CV, periods);

Def ANewCMFA = ExpAverage(ANewCMF,LengthA);
Def BNewCMFA = ExpAverage(BNewCMF,LengthA);
Def CNewCMFA = ExpAverage(CNewCMF,LengthA);
Def ZeroLine = 0;
plot ANewCMF_Dot = if IsNaN(AC) then Double.NaN else 1;
ANewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
ANewCMF_Dot.SetLineWeight(DotSize);
ANewCMF_Dot.AssignValueColor(if ANewCMF> Over_Bought && ANewCMF >ANewCMFA then GlobalColor("OverBought") else  if ANewCMF< Over_Sold && ANewCMF <ANewCMFA then GlobalColor("OverSold") else  if ANewCMF> ZeroLine then GlobalColor("Bullish") else If ANewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
plot BNewCMF_Dot = if IsNaN(BC) then Double.NaN else 2;
BNewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
BNewCMF_Dot.SetLineWeight(DotSize);
BNewCMF_Dot.AssignValueColor(if BNewCMF> Over_Bought && BNewCMF >BNewCMFA then GlobalColor("OverBought") else  if BNewCMF< Over_Sold && BNewCMF <BNewCMFA then GlobalColor("OverSold") else  if BNewCMF> ZeroLine then GlobalColor("Bullish") else If BNewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
plot CNewCMF_Dot = if IsNaN(CC) then Double.NaN else 3;
CNewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
CNewCMF_Dot.SetLineWeight(DotSize);
CNewCMF_Dot.AssignValueColor(if CNewCMF> Over_Bought && CNewCMF >CNewCMFA then GlobalColor("OverBought") else  if CNewCMF< Over_Sold && CNewCMF <CNewCMFA then GlobalColor("OverSold") else  if CNewCMF> ZeroLine then GlobalColor("Bullish") else If CNewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
 
Last edited by a moderator:
Hello German,

I added a moving average to the CMF as a signal, also added a cloud

Code:
###################

declare lower;
input periods = 21;
Input LengthA = 5;
input over_Bought = .20;
input over_Sold = -.20;


def C = close;

def H = high;

def L = low;

def V = volume;

def TRH = Max(H,C[1]);

def TRL = Min(L, C[1]);

def TR = TRH - TRL;

def ADV =((C-TRL)-(TRH-C))/ (If TR == 0 then 999999 else TR) * V;

plot NewCMF = if WildersAverage(V,periods) == 0

              then 0

              else WildersAverage(ADV, periods) / WildersAverage(V, periods);
Plot NewCMFA = ExpAverage(NewCMF,LengthA);
NewCMFA.SetDefaultColor(Color.Yellow);
plot ZeroLine = 0;
AddCloud(NewCMF,Zeroline,Color.Green,Color.Red);
ZeroLine.SetDefaultColor(color.gray);                

plot OverSold = over_Sold;
OverSold.SetDefaultColor(Color.Orange);
OverSold.SetPaintingStrategy(PaintingStrategy.Dashes);
plot OverBought = over_Bought;
OverBought.SetDefaultColor(Color.Orange);
OverBought.SetPaintingStrategy(PaintingStrategy.Dashes);

NewCMF.DefineColor("OverBought", GetColor(5));
NewCMF.DefineColor("Normal", GetColor(7));
NewCMF.DefineColor("OverSold", GetColor(1));
NewCMF.AssignValueColor(if  NewCMF > over_Bought then  NewCMF.color("OverBought") else if  NewCMF < over_Sold then  NewCMF.color("OverSold") else  NewCMF.color("Normal"));
NewCMF.SetLineweight(3);

I have created your money flow indicator into a binary signal w 3 MTF. The triangles are Cyan if the MF is Bullish, Red when overbought, Magenta when Bearish and Green when oversold

Here is the code

Code:
##############
Declare Lower;
DefineGlobalColor("Bullish", Color.Cyan);
DefineGlobalColor("Bearish", Color.Magenta);
DefineGlobalColor("OverSold", Color.Green);
DefineGlobalColor("OverBought", Color.Red);
DefineGlobalColor("Normal", Color.Gray);

input agg1 = AggregationPeriod.FIVE_MIN;
input agg2 = AggregationPeriod.Thirty_MIN;
input agg3 = AggregationPeriod. Hour;
input periods = 21;
Input LengthA = 5;
input over_Bought = .20;
input over_Sold = -.20;
input show_dots=yes;
input DotSize = 3;

Def AC = Close(Period = Agg1);
Def BC = Close(Period = Agg2);
Def CC = Close(Period = Agg3);
Def AH = High(Period = Agg1);
Def BH = High(Period = Agg2);
Def CH = High(Period = Agg3);
Def AL = Low(Period = Agg1);
Def BL = Low(Period = Agg2);
Def CL = Low(Period = Agg3);
Def AV = Volume(Period = Agg1);
Def BV = Volume(Period = Agg2);
Def CV = Volume(Period = Agg3);

def ATRH = Max(AH,AC[1]);
def BTRH = Max(BH,BC[1]);
def CTRH = Max(CH,CC[1]);
def ATRL = Min(AL, AC[1]);
def BTRL = Min(BL, BC[1]);
def CTRL = Min(CL, CC[1]);

def TRa = ATRH - ATRL;
def TRb = BTRH - BTRL;
def TRc = CTRH - CTRL;

def AADV =((AC-ATRL)-(ATRH-AC))/ (If TRa == 0 then 999999 else TRa) * AV;
def BADV =((BC-BTRL)-(BTRH-BC))/ (If TRb == 0 then 999999 else TRb) * BV;
def CADV =((CC-CTRL)-(CTRH-CC))/ (If TRc == 0 then 999999 else TRc) * CV;

Def ANewCMF = if WildersAverage(AV,periods) == 0
              then 0
              else WildersAverage(AADV, periods) / WildersAverage(AV, periods);
Def BNewCMF = if WildersAverage(BV,periods) == 0
              then 0
              else WildersAverage(BADV, periods) / WildersAverage(BV, periods);
Def CNewCMF = if WildersAverage(CV,periods) == 0
              then 0
              else WildersAverage(CADV, periods) / WildersAverage(CV, periods);

Def ANewCMFA = ExpAverage(ANewCMF,LengthA);
Def BNewCMFA = ExpAverage(BNewCMF,LengthA);
Def CNewCMFA = ExpAverage(CNewCMF,LengthA);
Def ZeroLine = 0;
plot ANewCMF_Dot = if IsNaN(AC) then Double.NaN else 1;
ANewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
ANewCMF_Dot.SetLineWeight(DotSize);
ANewCMF_Dot.AssignValueColor(if ANewCMF> Over_Bought && ANewCMF >ANewCMFA then GlobalColor("OverBought") else  if ANewCMF< Over_Sold && ANewCMF <ANewCMFA then GlobalColor("OverSold") else  if ANewCMF> ZeroLine then GlobalColor("Bullish") else If ANewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
plot BNewCMF_Dot = if IsNaN(BC) then Double.NaN else 2;
BNewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
BNewCMF_Dot.SetLineWeight(DotSize);
BNewCMF_Dot.AssignValueColor(if BNewCMF> Over_Bought && BNewCMF >BNewCMFA then GlobalColor("OverBought") else  if BNewCMF< Over_Sold && BNewCMF <BNewCMFA then GlobalColor("OverSold") else  if BNewCMF> ZeroLine then GlobalColor("Bullish") else If BNewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
plot CNewCMF_Dot = if IsNaN(CC) then Double.NaN else 3;
CNewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
CNewCMF_Dot.SetLineWeight(DotSize);
CNewCMF_Dot.AssignValueColor(if CNewCMF> Over_Bought && CNewCMF >CNewCMFA then GlobalColor("OverBought") else  if CNewCMF< Over_Sold && CNewCMF <CNewCMFA then GlobalColor("OverSold") else  if CNewCMF> ZeroLine then GlobalColor("Bullish") else If CNewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
Henry when I put this into TOS nothing shows up, any ideas?
 
Henry when I put this into TOS nothing shows up, any ideas?
You need to align your timeframes when using the SECOND script in the post you quoted.
The indicator looks at 5min, 30min, and Hourly aggregations.

The timeframe of your chart MUST BE lower than the aggregations in the study.
Therefore, if using the defaults, this study can only be used on charts set with 4min and below timeframes.

You can change the default aggregations in chart settings.
When adjusting the timeframe settings, keep in mind that the timeframes in the script must be HIGHER than what you have your chart set at.
 
Hello German,

I added a moving average to the CMF as a signal, also added a cloud

Code:
###################

declare lower;
input periods = 21;
Input LengthA = 5;

[/QUOTE]
Hi! What does Input LengthA mean? what happens when you make it higher or lower? Thank you!

Paul
 
Last edited by a moderator:
Hi! What does Input LengthA mean? what happens when you make it higher or lower? Thank you!

Paul
LengthA smoothes out the plot. Smoothing factors typically do not get any higher than 5, but you can try lower.
Recommend you put it on your chart. Nothing beats personal experience ;) The only way you will know what works best for you is to play with the settings and see how the indicator line up w/ your strategy and with your other indicators. To determine if this indicator brings value, analyze it over different timeframes, across history and with multiple instruments.
 
@John808 I'll reply to what you gleaned from above with my take on the list.
Many types are debated, some are set in stone.
Join the conversation if you feel otherwise! 😀
Everyone, this is to pick out examples of types and may have my or your bias. Your indicators may be better for you. That's OK!
(1) Trend- Moving average Based: MACD, PPO, ADX, All the types of Moving Averages

(2) Momentum- Rate of Change: Stochastics, RSI, RSI in Laguerre Time (RSILg), my other favorite, TMO, Fractal Energy or Choppiness.

(3) Volatility- Average true range (ATR), Bolinger Bands, Keltner Channels <<< these last two are also combined in things called Squeezes. Not a fan...

(4) Overbought/oversold oscillators- StochasticRSI, Stochastics, New High vs New Low Index ($ADSPD etc), Up vs Down Volume ($UVOA-$DVOA)

(5) Money flow- Accumulation-Distribution: Money Flow Index, Twiggs Money Flow, OBV, Chaikin Money Flow

(6) Sentiment - AAII Weekly Sentiment, TDA's Investor Movement Index (IMX), TDA's Social Signals Tab

(7) Breadth- Trendlines/price action, pullbacks, consolidation, higher high higher low, NewHi vs NewLow Index, etc.

That's enough now, Markos, give it a rest... 🙃
Looking for think script code for Twiggs Money Flow. Is it available in UseThinkScripts?
 
eu1MRT5.png

Twiggs Money Flow is often considered superior to other money flow indicators because it incorporates "True Range" in its calculation, which allows it to better identify buying and selling pressure, especially when significant price gaps occur, unlike other indicators like Chaikin Money Flow that might be distorted by such gaps; additionally, Twiggs Money Flow utilizes exponential smoothing for a smoother signal, providing a more reliable indication of potential trend changes.

Key points about Twiggs Money Flow's advantages:
True Range Consideration:
Unlike other money flow indicators that might only use the standard range (high minus low), Twiggs Money Flow uses True Range, which takes price gaps into account, providing a more accurate picture of market volatility and potential buying/selling pressure, especially when large price gaps happen.​

Wilders Smoothing:
This Twiggs Money Flow employs Wilders smoothing, which is considered a more responsive and accurate method of smoothing price data compared to simple moving averages, leading to clearer signals and less noise.​

Identifying Accumulation and Distribution:
By analyzing the values above and below zero, traders can effectively identify periods of strong accumulation (positive values) and distribution (negative values)​

Code:
declare lower;
input periods = 21;
input over_Bought = .20;
input over_Sold = -.20;

def C = close;
def H = high;
def L = low;
def V = volume;

def TRH = Max(H,C[1]);
def TRL = Min(L, C[1]);
def TR = TRH - TRL;
def ADV =((C-TRL)-(TRH-C))/ (If TR == 0 then 999999 else TR) * V;

plot NewCMF = if WildersAverage(V,periods) == 0
              then 0
              else WildersAverage(ADV, periods) / WildersAverage(V, periods);

plot ZeroLine = 0;
ZeroLine.SetDefaultColor(GetColor(5));               

plot OverSold = over_Sold;
plot OverBought = over_Bought;

NewCMF.DefineColor("OverBought", GetColor(5));
NewCMF.DefineColor("Normal", GetColor(7));
NewCMF.DefineColor("OverSold", GetColor(1));
NewCMF.AssignValueColor(if  NewCMF > over_Bought then  NewCMF.color("OverBought") else if  NewCMF < over_Sold then  NewCMF.color("OverSold") else  NewCMF.color("Normal"));
I'm not seeing how the first part of the equation is different from the Chaikin Money Flow equation
 
I'm not seeing how the first part of the equation is different from the Chaikin Money Flow equation

Correct the first part of the equation is basically the same. But after that they roll differently.
TMF then improves upon CMF by incorporating the True Range, which accounts for price gaps.

One is not "better" than the other.
A cycle indicator is an important component of a non-collinear strategy.
https://usethinkscript.com/threads/...nt-to-successful-trading-in-thinkorswim.6114/
Use whichever compliments your strategy best.
 
Last edited by a moderator:
Hello German,

I added a moving average to the CMF as a signal, also added a cloud
View attachment 8696

Code:
###################

declare lower;
input periods = 21;
Input LengthA = 5;
input over_Bought = .20;
input over_Sold = -.20;


def C = close;

def H = high;

def L = low;

def V = volume;

def TRH = Max(H,C[1]);

def TRL = Min(L, C[1]);

def TR = TRH - TRL;

def ADV =((C-TRL)-(TRH-C))/ (If TR == 0 then 999999 else TR) * V;

plot NewCMF = if WildersAverage(V,periods) == 0

              then 0

              else WildersAverage(ADV, periods) / WildersAverage(V, periods);
Plot NewCMFA = ExpAverage(NewCMF,LengthA);
NewCMFA.SetDefaultColor(Color.Yellow);
plot ZeroLine = 0;
AddCloud(NewCMF,Zeroline,Color.Green,Color.Red);
ZeroLine.SetDefaultColor(color.gray);               

plot OverSold = over_Sold;
OverSold.SetDefaultColor(Color.Orange);
OverSold.SetPaintingStrategy(PaintingStrategy.Dashes);
plot OverBought = over_Bought;
OverBought.SetDefaultColor(Color.Orange);
OverBought.SetPaintingStrategy(PaintingStrategy.Dashes);

NewCMF.DefineColor("OverBought", GetColor(5));
NewCMF.DefineColor("Normal", GetColor(7));
NewCMF.DefineColor("OverSold", GetColor(1));
NewCMF.AssignValueColor(if  NewCMF > over_Bought then  NewCMF.color("OverBought") else if  NewCMF < over_Sold then  NewCMF.color("OverSold") else  NewCMF.color("Normal"));
NewCMF.SetLineweight(3);

I have created your money flow indicator into a binary signal w 3 MTF. The triangles are Cyan if the MF is Bullish, Red when overbought, Magenta when Bearish and Green when oversold

Here is the code

Code:
##############
Declare Lower;
DefineGlobalColor("Bullish", Color.Cyan);
DefineGlobalColor("Bearish", Color.Magenta);
DefineGlobalColor("OverSold", Color.Green);
DefineGlobalColor("OverBought", Color.Red);
DefineGlobalColor("Normal", Color.Gray);

input agg1 = AggregationPeriod.FIVE_MIN;
input agg2 = AggregationPeriod.Thirty_MIN;
input agg3 = AggregationPeriod. Hour;
input periods = 21;
Input LengthA = 5;
input over_Bought = .20;
input over_Sold = -.20;
input show_dots=yes;
input DotSize = 3;

Def AC = Close(Period = Agg1);
Def BC = Close(Period = Agg2);
Def CC = Close(Period = Agg3);
Def AH = High(Period = Agg1);
Def BH = High(Period = Agg2);
Def CH = High(Period = Agg3);
Def AL = Low(Period = Agg1);
Def BL = Low(Period = Agg2);
Def CL = Low(Period = Agg3);
Def AV = Volume(Period = Agg1);
Def BV = Volume(Period = Agg2);
Def CV = Volume(Period = Agg3);

def ATRH = Max(AH,AC[1]);
def BTRH = Max(BH,BC[1]);
def CTRH = Max(CH,CC[1]);
def ATRL = Min(AL, AC[1]);
def BTRL = Min(BL, BC[1]);
def CTRL = Min(CL, CC[1]);

def TRa = ATRH - ATRL;
def TRb = BTRH - BTRL;
def TRc = CTRH - CTRL;

def AADV =((AC-ATRL)-(ATRH-AC))/ (If TRa == 0 then 999999 else TRa) * AV;
def BADV =((BC-BTRL)-(BTRH-BC))/ (If TRb == 0 then 999999 else TRb) * BV;
def CADV =((CC-CTRL)-(CTRH-CC))/ (If TRc == 0 then 999999 else TRc) * CV;

Def ANewCMF = if WildersAverage(AV,periods) == 0
              then 0
              else WildersAverage(AADV, periods) / WildersAverage(AV, periods);
Def BNewCMF = if WildersAverage(BV,periods) == 0
              then 0
              else WildersAverage(BADV, periods) / WildersAverage(BV, periods);
Def CNewCMF = if WildersAverage(CV,periods) == 0
              then 0
              else WildersAverage(CADV, periods) / WildersAverage(CV, periods);

Def ANewCMFA = ExpAverage(ANewCMF,LengthA);
Def BNewCMFA = ExpAverage(BNewCMF,LengthA);
Def CNewCMFA = ExpAverage(CNewCMF,LengthA);
Def ZeroLine = 0;
plot ANewCMF_Dot = if IsNaN(AC) then Double.NaN else 1;
ANewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
ANewCMF_Dot.SetLineWeight(DotSize);
ANewCMF_Dot.AssignValueColor(if ANewCMF> Over_Bought && ANewCMF >ANewCMFA then GlobalColor("OverBought") else  if ANewCMF< Over_Sold && ANewCMF <ANewCMFA then GlobalColor("OverSold") else  if ANewCMF> ZeroLine then GlobalColor("Bullish") else If ANewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
plot BNewCMF_Dot = if IsNaN(BC) then Double.NaN else 2;
BNewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
BNewCMF_Dot.SetLineWeight(DotSize);
BNewCMF_Dot.AssignValueColor(if BNewCMF> Over_Bought && BNewCMF >BNewCMFA then GlobalColor("OverBought") else  if BNewCMF< Over_Sold && BNewCMF <BNewCMFA then GlobalColor("OverSold") else  if BNewCMF> ZeroLine then GlobalColor("Bullish") else If BNewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
plot CNewCMF_Dot = if IsNaN(CC) then Double.NaN else 3;
CNewCMF_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
CNewCMF_Dot.SetLineWeight(DotSize);
CNewCMF_Dot.AssignValueColor(if CNewCMF> Over_Bought && CNewCMF >CNewCMFA then GlobalColor("OverBought") else  if CNewCMF< Over_Sold && CNewCMF <CNewCMFA then GlobalColor("OverSold") else  if CNewCMF> ZeroLine then GlobalColor("Bullish") else If CNewCMF< ZeroLine then GlobalColor("Bearish") else GlobalColor(“Normal”));
Do you mind posting a chart link? I can't replicate what your chart shows.

I tried to use the indicators shown and got nothing like that chart, so I don't have an image to post because I didn't get the bottom two indicators and just deleted what I had.
 
Last edited by a moderator:
Do you mind posting a chart link? I can't replicate what your chart shows.

I tried to use the indicators shown and got nothing like that chart, so I don't have an image to post because I didn't get the bottom two indicators and just deleted what I had.


The @henry1224's studies in the second post are MTF scripts.
A common error made with MTF studies is that members put them on a chart that is a higher timeframe
than the aggregations specified.

The aggregations in the code are:
input agg1 = AggregationPeriod.FIVE_MIN;
input agg2 = AggregationPeriod.Thirty_MIN;
input agg3 = AggregationPeriod. Hour;

Therefore, you need to put these studies on a chart that is less than 5-min
OR
change the input timeframe settings to something higher.

When your chart is not displaying a study.
The chart will product an error message.
The error message is hidden under the exclamation mark in the upper left corner of your chart.

Try adding the studies again. Following the specifications outlined above.
If still having problems, make a shared link of your empty chart.
https://usethinkscript.com/threads/how-to-share-a-chart-in-thinkorswim.14221/
So members can comment and explain the correct settings for these indicators.

Hope this helps.
 
Last edited:
The @henry1224's studies in the second post are MTF scripts.
A common error made with MTF studies is that members put them on a chart that is a higher timeframe
than the aggregations specified.

The aggregations in the code are:


Therefore, you need to put these studies on a chart that is less than 5-min
OR
change the input timeframe settings to something higher.

When your chart is not displaying a study.
The chart will product an error message.
The error message is hidden under the exclamation mark in the upper left corner of your chart.

Try adding the studies again. Following the specifications outlined above.
If still having problems, make a shared link of your empty chart.
https://usethinkscript.com/threads/how-to-share-a-chart-in-thinkorswim.14221/
So members can comment and explain the correct settings for these indicators.

Hope this helps.
When using a chart, no matter what TIME FRAME, the last bar is dynamic until the completion of that aggregation. That means that the far right edge is susceptible to change until a new bar is formed.

When using MTF, the higher time frame can change, but it is only a guideline. use the 4 inches between your ears to determine what is going on!
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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