FW_DPO_MOBO Script

Hey everyone,

I've been utilizing the FW_DPO_MOBO Indicator and I would like to code it into one of my strategies. The problem is that when you go to copy and paste the script to implement it into a strategy, the script says "Source code isn't available." The TTM_Squeeze Indicator has this same problem, but I've seen reiterations of the script to make it the same as the original indicator. I was wondering if anyone has the script for the FW_DPO_MOBO Indicator that is editable and able to be coded into a strategy. I know it is a combination of Bollinger Bands and the Detrended Price Oscillator, but the original indicator somehow scales the Bollinger Bands in a special way for the Detrended Price Oscillator to work better with it. I will post the code for the FW_DPO_MOBO so you can see what I am talking about.

Any help would be much appreciated!


Code:
#
# TD Ameritrade IP Company, Inc. (c) 2010-2020
#
# Source code isn't available.

declare lower;

input price = CLOSE;
input colorNormLength = 3;
input dpoLength = 14;
input moboDisplace = 0;
input moboLength = 10;
input numDevDn = -0.8;
input numDevUp = 0.8;
input coloredMobo = Yes;
input coloredFill = Yes;
input breakArrows = Yes;
input moboShowMid = No;

plot DPO = Double.NaN;
plot MidlineP = Double.NaN;
plot UpperBandP = Double.NaN;
plot LowerBandP = Double.NaN;
plot Zeroline = Double.NaN;
plot BreakOutArrow = Double.NaN;
plot BreakDownArrow = Double.NaN;
 
Solution
This is exactly what I needed! Than you very much @mfsteve!
Just remember that you need to reference the FW_DPO_MOBO for every plot you want to use... I have my own custom versions and have posted my short version below... Note that my settings differ from the original release...

Ruby:
#My_FW_DPO_MOBO
#Based on TOS FW_DPO_MOBO
#Modified for personal use by rad14733

declare lower;

input price = HL2;
input colorNormLength = 3;
input dpoLength = 13;
input moboDisplace = 0;
input moboLength = 13;
input numDevDn = -1.0;
input numDevUp = 1.0;
input coloredMobo = Yes;
input coloredFill = Yes;
input breakArrows = Yes;
input moboShowMid = Yes;

#plot DPO = Double.NaN;
plot DPO = FW_DPO_MOBO(price, colorNormLength, dpoLength...
@BBDPDC @rad14733 I am currently using the script that you have shared...
What I would like to is also to configure a scan to pick up signals when
1. The middle line change from Red to Green or Green to Red but it doesn't seem to have the conditions to configure the scan
Alternative, i also tried to scan using the "DPO line to cross above the Centerline" but i cant add another condition for it to only show signals that are below the zeroline?

May I know if you have manage to scan signals when the middle line changes from Red to Green or vice versa? Or how can add a condition to only displays signals Only when it is below the Zeroline?

@BBDPDC May I also request if you can share your script that shows how the labels are plotted on your moving average?

Thank you very much
Nick
@Nick Unfortunately i have limited coding experience and mixed with little time and a wealth of other available material just on this site, I've actually excluded this indicator and the changes i made as the signals appear unreliable using my version (too many and late).

As for the MA labels on the upper i posted, those are the Hull Concavity indicator which i slightly adjusted to shrink the bubble and took all the arrows out.....it looks back so can fire and disappear until the following candle after the signal has closed but is incredibly reliable in determining an uptrend. Set to 21 on a 1m chart. Take a look here https://usethinkscript.com/threads/...ng-points-and-concavity-2nd-derivatives.1803/
 

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

DPO weekly timeframe

Hi, i have tried to modify the FW_DPO_MOBO script to fit into upper study to plot the signals in the script below. I am using a WEEKLY chart. The purpose of this plot is to identify the downtrend momentum of the stocks has slowed down then goes sideway before it resumes it uptrend.
Usually when all the plot conditions are met, the Arrow will appear on the same candle. From the attached pic, I observed that this does not happen all the time, and like to know
1. Is there anything wrong with my plot?
2. How can I set the arrow to be plotted on the same candle when the conditions are met?
3. Does the DPO line measure the Momentum of the stock?? If I like to increase the sensitivity of the DPO line, ie the DPO cuts the midline shortest time, should I decrease the DPO Length or the MOBO_length??
4. Any other suggestions are greatly appreciated.

Thank you
Ruby:
#DPO_MOBO
#Based on TOS FW_DPO_MOBO
#modified for personal use
input price = close;
plot Trend1 = MovAvgExponential(close, 10);
plot Trend2 = MovAvgExponential(close, 30);
Plot trend3 = movAvgExponential(close, 3);

# DPO parameters
input colorNormLength = 3;
input DPO_length = 14;

# MOBO parameters
input ColoredMobo = yes;
input ColoredFill = yes;
input BreakArrows = yes;
input MOBO_midline = no;
input MOBO_displace = 0;
input MOBO_length = 5;
input Num_Dev_Dn = -0.8;
input Num_Dev_Up = +0.8;

# Fuel Cell (MACD) inputs
input showMACD = no; # Turns the Fuel Cells on (yes) or off (no).
input MACDfastLen = 10; # standard MACD parameter.
input MACDslowLen = 15; # standard MACD parameter.
input MACDLen = 10; # standard MACD parameter.
input MACDScaling = 50; # Enlarge or shrink FuelCell size.
input MACDWidth = 3; # Width of individual FuelCell elements.
input MACDColors = {default "Cyan_Only", "Cyan_Magenta", "Red_Green"};
input level = -1;

def Zeroline = 0;

def DPO = price - Average(price[DPO_length / 2 + 1], DPO_length);
#DPO.DefineColor("Highest", Color.YELLOW);
#DPO.DefineColor("Lowest", Color.LIGHT_RED);
#DPO.AssignNormGradientColor(colorNormLength, DPO.Color("Lowest"), DPO.Color("Highest"));

def Midline = Average (data = DPO, MOBO_length);
def sDev = StDev(data = DPO[-MOBO_displace], length = MOBO_length);
def LowerBand = Midline + Num_Dev_Dn * sDev;
def UpperBand = Midline + Num_Dev_Up * sDev;

def MoboStatus =
if DPO > UpperBand then 2 # Mobo Up
else
if DPO < LowerBand then -2 # Mobo Down
else 0; # between the bands

rec BreakStatus = CompoundValue(1,
if BreakStatus[1] == MoboStatus or MoboStatus == 0 then BreakStatus[1]
else
if MoboStatus == 2 then 2
else -2, 0);

def MidlineP =
if MOBO_midline then Midline
else Double.NaN;


def UpperBandP = UpperBand;
#UpperBandP.AssignValueColor (
# if !ColoredMobo then Color.WHITE
# else
# if BreakStatus[0] == 2 then Color.GREEN
# else Color.RED);
#UpperBandP.SetLineWeight(1);
#UpperBandP.HideBubble();

def LowerBandP = LowerBand;
#LowerBandP.AssignValueColor (
# if !ColoredMobo then Color.WHITE
# else
# if BreakStatus[0] == 2 then Color.GREEN
# else Color.RED);
#LowerBandP.SetLineWeight(1);
#LowerBandP.HideBubble();

# Breakout/down arrows.
#plot BreakOutArrow =
# if BreakArrows then
# if BreakStatus[0] == BreakStatus[1] then Double.NaN
# else if BreakStatus[0] == 2 then
# DPO else Double.NaN
# else Double.NaN;

#plot BreakDownArrow =
# if BreakArrows then
# if BreakStatus[0] == BreakStatus[1] then Double.NaN
# else if BreakStatus[0] == -2 then
# DPO else Double.NaN
#else Double.NaN;
#BreakDownArrow.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
#BreakDownArrow.SetDefaultColor(Color.RED);
#BreakDownArrow.SetLineWeight(1);
#BreakDownArrow.HideBubble();
#addChartBubble(BreakdownArrow, high,"D",color.red);
#addChartBubble(BreakOutArrow, high,"U",color.yellow);
# colored clouds
def GreenUpper = if ColoredFill and BreakStatus[0] == 2 then
UpperBandP else Double.NaN;
#GreenUpper.SetDefaultColor(CreateColor(0, 100, 0));
def GreenLower = if ColoredFill and BreakStatus[0] == 2 then
LowerBandP else Double.NaN;
#GreenLower.SetDefaultColor(CreateColor(0, 100, 0));
#AddCloud (GreenUpper, GreenLower, CreateColor(0, 100, 0), color.red);

def RedUpper = if ColoredFill and BreakStatus[0] == -2 then
UpperBandP else Double.NaN;
#RedUpper.SetDefaultColor(CreateColor(200, 0, 0));
def RedLower = if ColoredFill and BreakStatus[0] == -2 then
LowerBandP else Double.NaN;
#RedLower.SetDefaultColor(CreateColor(200, 0, 0));
#AddCloud (RedUpper, RedLower, CreateColor(200, 0, 0), color.green);

plot Signal1 = DPO < Zeroline and DPO crosses above Midline and close > close[1] and Trend2 > Trend1;#
Signal1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Signal1.SetLineWeight(3);
Signal1.AssignValueColor(COLOR.blue);

plot Signal2 = DPO <zeroline and DPO crosses above midline and close < Trend1 and Trend1 < Trend2 and close> trend3;
Signal2.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Signal2.SetLineWeight(3);
Signal2.AssignValueColor(COLOR.blue);
 
Last edited by a moderator:
@Nick
  • I have never had TOS plot on the same candle. The condition occurs and triggers an arrow on the next candle (except maybe? repainting indicators)
  • The technical definition states that DPO does not measure momentum:
What Is a Detrended Price Oscillator (DPO)?
Basically, it strips out price trends in an effort to estimate the length of price cycles from peak to peak or trough to trough.

Unlike other oscillators, such as the stochastic or moving average convergence divergence (MACD), the DPO is not a momentum indicator. It instead highlights peaks and troughs in price, which are used to estimate buy and sell points in line with the historical cycle. ~Investopedia

But when compared to the MACD, it looks very similar. So if it walks like a duck... sounds like a duck?

Suggestions:
I don't use TOS Fw DPO Mobo. I use the one here from @rad14733: https://usethinkscript.com/threads/fw_dpo_mobo-script.4771/#post-44180. He does use different lengths.
This indicator appears on most of my charts. I buy dips and then look for reversals.
I am not a fan of arrows, especially w/ oscillators, especially w/ this particular script. For me, it is more about how the oscillator is lining up with your other three non-collinear indicators on your three timeframes.

All that said, your arrows appear to be working. I kind-a like them.
 
Last edited:
If you're not happy with email, and don't mind registering (free I think -- my credentials are still good YEARS later), you can download the thinkscript code from the firstwave website here:
http://www.fwtrader.com/software/community-software-for-tos/
There is this one and a bunch more. I always liked the ADX Fuel Cells myself.

-mashume
Hi Mashume,

Do you know if the FW_MMG or FW_FisherTransformer indicators can be found anywhere? These are the two that are not included on the FW website.

Best,
Mitch
 
Hey all,
I really enjoying on demand trading with FW_DPO_mobo, those arrows and the cloud changing from green to red is very helpful, but I don't have time to sit and watch my 2 hour candles all day. Is there any way to create an alert with the thinkScript on the mobo indicator when the arrow changes from up to down or vice versa? I'm at a loss.

Any help would be greatly appreciated.
 
@Nick
  • I have never had TOS plot on the same candle. The condition occurs and triggers an arrow on the next candle (except maybe? repainting indicators)
  • The technical definition states that DPO does not measure momentum:
But when compared to the MACD, it looks very similar. So if it walks like a duck... sounds like a duck?
Suggestions:
I don't use TOS Fw DPO Mobo. I use the one here from @rad14733: https://usethinkscript.com/threads/fw_dpo_mobo-script.4771/#post-44180. He does use different lengths.
This indicator appears on most of my charts. I buy dips and then look for reversals.
I am not a fan of arrows, especially w/ oscillators, especially w/ this particular script. Life is about the nuances. I need to see my DPO. For me, it is more about the journey not the data points.

All that said, your arrows appear to be working. I kind-a like them.
MerryDay, could you please share codes in the chart above?
 
Last edited by a moderator:
MerryDay, could you please share codes in the chart above?
Sorry. Guilty of posting an image w/o a chart link. 😵 Must have been something I was working on in passing.
I don't have it anymore. Thanks for the heads up, I deleted the image.
 
Last edited:
@MerryDay this used to show arrows but now not!
is it supposed to show so? any advice please?
I agree. No arrows. This uses a ToS built-in indicator that is copyright-protected.
We can't see the code, so can't see what changed.
You can try contacting Support.
Do come back and tell us what they say.
 
I agree. No arrows. This uses a ToS built-in indicator that is copyright-protected.
We can't see the code, so can't see what changed.
You can try contacting Support.
Do come back and tell us what they say.
I'm sure i saw the arrows couple of days ago, so this is new change?

Sure gonna contact them
 
I convert Mobo Bands from Tradingview for ThinkorSwim, and add band color changes.
https://www.tradingview.com/script/s2yv2eub-Mobo-Bands/

Ruby:
#https://www.tradingview.com/script/s2yv2eub-Mobo-Bands/
declare lower;
def price  = hl2;
def colorNormLength = 3;
def dpoLength       = 13;
def moboDisplace    = 0;
def moboLength    = 10;
input aggregationPeriod = AggregationPeriod.DAY;
def numDevDn  = -0.8;
def numDevUp  = 0.8;
script nz {
    input data = 0;
    def ret_val = if IsNaN(data) then 0 else data;
    plot return = ret_val;
}
def coloredMobo     = yes;
def coloredFill     =  yes;
def breakArrows     = yes;
def moboShowMid     = yes;
#def DPO = price - Average(price[DPO_length / 2 + 1], DPO_length);
def xsma = Average(price[dpoLength / 2 + 1], dpoLength);
#def xsma = sma(price, dpoLength);
def DPO = price - xsma;
def Midline = Average(DPO, moboLength);
def sDev = StDev(DPO, moboLength);
def LowerBand = Midline + numDevDn * sDev;
def UpperBand = Midline + numDevUp * sDev;
plot line_dpo = DPO;
line_dpo.AssignValueColor(if  line_dpo>  line_dpo[1] then Color.cyan else Color.red);
line_dpo.SetLineWeight(5);
plot Line_mid = Midline;
Line_mid.AssignValueColor(if MidLine < dpo then Color.green else Color.magenta);
Line_mid.SetLineWeight(3);
def nan  =  Double.NaN;
input fill = yes;
plot Upper = UpperBand;
Upper.SetDefaultColor(GetColor(7));
plot Lower = LowerBand;
lower.SetDefaultColor(GetColor(7));
plot line_0 = 0;
line_0.SetDefaultColor(GetColor(9));
def Signal1 = DPO > UpperBand and DPO[1] < UpperBand[1];
def Signal2 = DPO < LowerBand and DPO[1] > LowerBand[1];
def wasUp = if Signal1 then 1 else if Signal2 then 0 else nz(wasUp[1]);
def wasDn = if Signal2 then 1 else if Signal1 then 0 else nz(wasDn[1]);
plot plotshape1 = if Signal1 and wasDn[1] then UpperBand else Double.NaN;
plotshape1.SetDefaultColor(GetColor(1));
plot plotshape2 = if Signal2 and wasUp[1] then LowerBand else Double.NaN;
plotshape2.SetDefaultColor(GetColor(1));
def a = (UpperBand > UpperBand[1] and Midline > Midline[1]);
def b = (UpperBand < UpperBand[1] and LowerBand < LowerBand[1]);
def c = (UpperBand > UpperBand[1] and Midline > Midline[1]);
def d = (UpperBand < UpperBand[1] and midline < midline[1]);
def e = average(close)>midline;
def f = midline<average(close);

def Chg      =   If(a, 1, If(b, -1, 0));
def Hold     =   CompoundValue(1, If(Hold[1] == Chg or Chg == 0, Hold[1], If(Chg == 1, 1, -1)), 0);
def Chg_a      =   If((c or e), 1, If((d or f), -1, 0));
def Hold_a     =   CompoundValue(1, If(Hold[1] == Chg or Chg == 0, Hold[1], If(Chg == 1, 1, -1)), 0);
def LBUp     =   if fill and Hold[0] == 1 then lowerBand else nan;
def UBUp     =   if fill and Hold[0] == 1 then upperband else nan;
def LBDn     =   if fill and Hold[0] == -1 then lowerband else nan;
def UBDn     =   if fill and Hold[0] == -1 then upperband else nan;
def MBUP     =   if fill and Hold[0] == 1 then midline else nan;
def MBDn     =   if fill and Hold[0] == -1 then Midline else nan;

DefineGlobalColor("Cloud Up", Color.red);
DefineGlobalColor("Cloud_Up", Color.downtick);
DefineGlobalColor("Cloud_Dn", Color.light_green);
DefineGlobalColor("Cloud Dn", Color.cyan);
AddCloud(LBUp, UBUp, GlobalColor("Cloud Up"), GlobalColor("Cloud Dn"));
AddCloud(LBDn, UBDn, GlobalColor("Cloud Dn"), GlobalColor("Cloud Up"));
AddCloud(MBUp, UBUp, GlobalColor("Cloud_Up"), GlobalColor("Cloud_Dn"));
AddCloud(MBDn, UBDn, GlobalColor("Cloud_Dn"), GlobalColor("Cloud_Up"));
 
DPO weekly timeframe

Hi, i have tried to modify the FW_DPO_MOBO script to fit into upper study to plot the signals in the script below. I am using a WEEKLY chart. The purpose of this plot is to identify the downtrend momentum of the stocks has slowed down then goes sideway before it resumes it uptrend.
Usually when all the plot conditions are met, the Arrow will appear on the same candle. From the attached pic, I observed that this does not happen all the time, and like to know
1. Is there anything wrong with my plot?
2. How can I set the arrow to be plotted on the same candle when the conditions are met?
3. Does the DPO line measure the Momentum of the stock?? If I like to increase the sensitivity of the DPO line, ie the DPO cuts the midline shortest time, should I decrease the DPO Length or the MOBO_length??
4. Any other suggestions are greatly appreciated.

Thank you
Ruby:
#DPO_MOBO
#Based on TOS FW_DPO_MOBO
#modified for personal use
input price = close;
plot Trend1 = MovAvgExponential(close, 10);
plot Trend2 = MovAvgExponential(close, 30);
Plot trend3 = movAvgExponential(close, 3);

# DPO parameters
input colorNormLength = 3;
input DPO_length = 14;

# MOBO parameters
input ColoredMobo = yes;
input ColoredFill = yes;
input BreakArrows = yes;
input MOBO_midline = no;
input MOBO_displace = 0;
input MOBO_length = 5;
input Num_Dev_Dn = -0.8;
input Num_Dev_Up = +0.8;

# Fuel Cell (MACD) inputs
input showMACD = no; # Turns the Fuel Cells on (yes) or off (no).
input MACDfastLen = 10; # standard MACD parameter.
input MACDslowLen = 15; # standard MACD parameter.
input MACDLen = 10; # standard MACD parameter.
input MACDScaling = 50; # Enlarge or shrink FuelCell size.
input MACDWidth = 3; # Width of individual FuelCell elements.
input MACDColors = {default "Cyan_Only", "Cyan_Magenta", "Red_Green"};
input level = -1;

def Zeroline = 0;

def DPO = price - Average(price[DPO_length / 2 + 1], DPO_length);
#DPO.DefineColor("Highest", Color.YELLOW);
#DPO.DefineColor("Lowest", Color.LIGHT_RED);
#DPO.AssignNormGradientColor(colorNormLength, DPO.Color("Lowest"), DPO.Color("Highest"));

def Midline = Average (data = DPO, MOBO_length);
def sDev = StDev(data = DPO[-MOBO_displace], length = MOBO_length);
def LowerBand = Midline + Num_Dev_Dn * sDev;
def UpperBand = Midline + Num_Dev_Up * sDev;

def MoboStatus =
if DPO > UpperBand then 2 # Mobo Up
else
if DPO < LowerBand then -2 # Mobo Down
else 0; # between the bands

rec BreakStatus = CompoundValue(1,
if BreakStatus[1] == MoboStatus or MoboStatus == 0 then BreakStatus[1]
else
if MoboStatus == 2 then 2
else -2, 0);

def MidlineP =
if MOBO_midline then Midline
else Double.NaN;


def UpperBandP = UpperBand;
#UpperBandP.AssignValueColor (
# if !ColoredMobo then Color.WHITE
# else
# if BreakStatus[0] == 2 then Color.GREEN
# else Color.RED);
#UpperBandP.SetLineWeight(1);
#UpperBandP.HideBubble();

def LowerBandP = LowerBand;
#LowerBandP.AssignValueColor (
# if !ColoredMobo then Color.WHITE
# else
# if BreakStatus[0] == 2 then Color.GREEN
# else Color.RED);
#LowerBandP.SetLineWeight(1);
#LowerBandP.HideBubble();

# Breakout/down arrows.
#plot BreakOutArrow =
# if BreakArrows then
# if BreakStatus[0] == BreakStatus[1] then Double.NaN
# else if BreakStatus[0] == 2 then
# DPO else Double.NaN
# else Double.NaN;

#plot BreakDownArrow =
# if BreakArrows then
# if BreakStatus[0] == BreakStatus[1] then Double.NaN
# else if BreakStatus[0] == -2 then
# DPO else Double.NaN
#else Double.NaN;
#BreakDownArrow.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
#BreakDownArrow.SetDefaultColor(Color.RED);
#BreakDownArrow.SetLineWeight(1);
#BreakDownArrow.HideBubble();
#addChartBubble(BreakdownArrow, high,"D",color.red);
#addChartBubble(BreakOutArrow, high,"U",color.yellow);
# colored clouds
def GreenUpper = if ColoredFill and BreakStatus[0] == 2 then
UpperBandP else Double.NaN;
#GreenUpper.SetDefaultColor(CreateColor(0, 100, 0));
def GreenLower = if ColoredFill and BreakStatus[0] == 2 then
LowerBandP else Double.NaN;
#GreenLower.SetDefaultColor(CreateColor(0, 100, 0));
#AddCloud (GreenUpper, GreenLower, CreateColor(0, 100, 0), color.red);

def RedUpper = if ColoredFill and BreakStatus[0] == -2 then
UpperBandP else Double.NaN;
#RedUpper.SetDefaultColor(CreateColor(200, 0, 0));
def RedLower = if ColoredFill and BreakStatus[0] == -2 then
LowerBandP else Double.NaN;
#RedLower.SetDefaultColor(CreateColor(200, 0, 0));
#AddCloud (RedUpper, RedLower, CreateColor(200, 0, 0), color.green);

plot Signal1 = DPO < Zeroline and DPO crosses above Midline and close > close[1] and Trend2 > Trend1;#
Signal1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Signal1.SetLineWeight(3);
Signal1.AssignValueColor(COLOR.blue);

plot Signal2 = DPO <zeroline and DPO crosses above midline and close < Trend1 and Trend1 < Trend2 and close> trend3;
Signal2.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Signal2.SetLineWeight(3);
Signal2.AssignValueColor(COLOR.blue);
hi. thank you for share this great system with us. a quick question, this system only have up arroy or short too, but i only getting for long not for short. thank you very much
 
This information about how to use MoBo indicator to long or short the market is from Tradingview. "This indicator is the Mobo Bands (Momentum Breakout Bands). These bands are bollinger bands that have an adjusted standard deviation. There are Buy signals when it has momentum breakouts above the bands for moves to the upside and Sell signals when it has momentum breakouts below the bands for moves to the downside. The bands simply suggest that all markets have periods of chop which we all know to be true. While the price is inside the bands it is said to be trendless. Once the breakouts happen you can take trades in the breakout direction."
https://www.tradingview.com/script/s2yv2eub-Mobo-Bands/
 
Last edited:
Hey all,
I really enjoying on demand trading with FW_DPO_mobo, those arrows and the cloud changing from green to red is very helpful, but I don't have time to sit and watch my 2 hour candles all day. Is there any way to create an alert with the thinkScript on the mobo indicator when the arrow changes from up to down or vice versa? I'm at a loss.

Any help would be greatly appreciated.
This should do it for you.

def BottomBandUp;
def Break_Down = FW_DPO_MOBO().BreakDownArrow;
def Break_Out = FW_DPO_MOBO().BreakOutArrow;
if Break_Out is true {
BottomBandUp = yes;
} else if Break_Down is true {
BottomBandUp = no;
} else {
BottomBandUp = BottomBandUp[1];
}
def BB_Buy = BottomBandUp;

#RED
def BottomBandDown;
def Breakdown = FW_DPO_MOBO()."breakdownArrow";

def Breakout = FW_DPO_MOBO().BreakOutArrow;

if Breakdown is true {
BottomBandDown = yes;
} else if Breakout is true {
BottomBandDown = no;
} else {
BottomBandDown = BottomBandDown[1];
}
def BB_Sell = BottomBandDown;

plot buy = BB_Buy and !BB_Buy[1];
plot sell = BB_Sell and !BB_Sell[1];

Buy.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP);
Sell.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_DOWN);

Alert(Buy[1], "BUY", Alert.BAR, Sound.Bell);
Alert(Sell[1], "Sell", Alert.BAR, Sound.Bell);
 
I agree. No arrows. This uses a ToS built-in indicator that is copyright-protected.
We can't see the code, so can't see what changed.
You can try contacting Support.
Do come back and tell us what they say.
first reply: I see what you mean, I'm not getting those arrows either. I'm going to reach out to my team to see if this was a recent update or if we can get more clarification.
second:
https://tlc.thinkorswim.com/center/...llator) compares,time periods and tick charts.

this link goes over the FW_DPO_MOBO study which would show those arrows I just found
 
I convert Mobo Bands from Tradingview for ThinkorSwim, and add band color changes.
https://www.tradingview.com/script/s2yv2eub-Mobo-Bands/

Ruby:
#https://www.tradingview.com/script/s2yv2eub-Mobo-Bands/
declare lower;
def price  = hl2;
def colorNormLength = 3;
def dpoLength       = 13;
def moboDisplace    = 0;
def moboLength    = 10;
input aggregationPeriod = AggregationPeriod.DAY;
def numDevDn  = -0.8;
def numDevUp  = 0.8;
script nz {
    input data = 0;
    def ret_val = if IsNaN(data) then 0 else data;
    plot return = ret_val;
}
def coloredMobo     = yes;
def coloredFill     =  yes;
def breakArrows     = yes;
def moboShowMid     = yes;
#def DPO = price - Average(price[DPO_length / 2 + 1], DPO_length);
def xsma = Average(price[dpoLength / 2 + 1], dpoLength);
#def xsma = sma(price, dpoLength);
def DPO = price - xsma;
def Midline = Average(DPO, moboLength);
def sDev = StDev(DPO, moboLength);
def LowerBand = Midline + numDevDn * sDev;
def UpperBand = Midline + numDevUp * sDev;
plot line_dpo = DPO;
line_dpo.AssignValueColor(if  line_dpo>  line_dpo[1] then Color.cyan else Color.red);
line_dpo.SetLineWeight(5);
plot Line_mid = Midline;
Line_mid.AssignValueColor(if MidLine < dpo then Color.green else Color.magenta);
Line_mid.SetLineWeight(3);
def nan  =  Double.NaN;
input fill = yes;
plot Upper = UpperBand;
Upper.SetDefaultColor(GetColor(7));
plot Lower = LowerBand;
lower.SetDefaultColor(GetColor(7));
plot line_0 = 0;
line_0.SetDefaultColor(GetColor(9));
def Signal1 = DPO > UpperBand and DPO[1] < UpperBand[1];
def Signal2 = DPO < LowerBand and DPO[1] > LowerBand[1];
def wasUp = if Signal1 then 1 else if Signal2 then 0 else nz(wasUp[1]);
def wasDn = if Signal2 then 1 else if Signal1 then 0 else nz(wasDn[1]);
plot plotshape1 = if Signal1 and wasDn[1] then UpperBand else Double.NaN;
plotshape1.SetDefaultColor(GetColor(1));
plot plotshape2 = if Signal2 and wasUp[1] then LowerBand else Double.NaN;
plotshape2.SetDefaultColor(GetColor(1));
def a = (UpperBand > UpperBand[1] and Midline > Midline[1]);
def b = (UpperBand < UpperBand[1] and LowerBand < LowerBand[1]);
def c = (UpperBand > UpperBand[1] and Midline > Midline[1]);
def d = (UpperBand < UpperBand[1] and midline < midline[1]);
def e = average(close)>midline;
def f = midline<average(close);

def Chg      =   If(a, 1, If(b, -1, 0));
def Hold     =   CompoundValue(1, If(Hold[1] == Chg or Chg == 0, Hold[1], If(Chg == 1, 1, -1)), 0);
def Chg_a      =   If((c or e), 1, If((d or f), -1, 0));
def Hold_a     =   CompoundValue(1, If(Hold[1] == Chg or Chg == 0, Hold[1], If(Chg == 1, 1, -1)), 0);
def LBUp     =   if fill and Hold[0] == 1 then lowerBand else nan;
def UBUp     =   if fill and Hold[0] == 1 then upperband else nan;
def LBDn     =   if fill and Hold[0] == -1 then lowerband else nan;
def UBDn     =   if fill and Hold[0] == -1 then upperband else nan;
def MBUP     =   if fill and Hold[0] == 1 then midline else nan;
def MBDn     =   if fill and Hold[0] == -1 then Midline else nan;

DefineGlobalColor("Cloud Up", Color.red);
DefineGlobalColor("Cloud_Up", Color.downtick);
DefineGlobalColor("Cloud_Dn", Color.light_green);
DefineGlobalColor("Cloud Dn", Color.cyan);
AddCloud(LBUp, UBUp, GlobalColor("Cloud Up"), GlobalColor("Cloud Dn"));
AddCloud(LBDn, UBDn, GlobalColor("Cloud Dn"), GlobalColor("Cloud Up"));
AddCloud(MBUp, UBUp, GlobalColor("Cloud_Up"), GlobalColor("Cloud_Dn"));
AddCloud(MBDn, UBDn, GlobalColor("Cloud_Dn"), GlobalColor("Cloud_Up"));
does it show arrows?
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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