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...

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

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, moboDisplace, moboLength, numDevDn, numDevUp, coloredMobo, coloredFill, breakArrows, moboShowMid).DPO;
#DPO.DefineColor("UpTrend", Color.LIME);
#DPO.DefineColor("DnTrend", Color.MAGENTA);
DPO.SetPaintingStrategy(PaintingStrategy.LINE);
DPO.SetLineWeight(2);
DPO.AssignValueColor(Color.YELLOW);
DPO.HideBubble();
DPO.HideTitle();

#plot MidlineP = Double.NaN;
plot MidlineP = FW_DPO_MOBO(price, colorNormLength, dpoLength, moboDisplace, moboLength, numDevDn, numDevUp, coloredMobo, coloredFill, breakArrows, moboShowMid).MidlineP;
MidLineP.SetPaintingStrategy(PaintingStrategy.LINE);
MidLineP.SetLineWeight(2);
MidlineP.AssignValueColor(if MidlineP > MidlineP[1] then Color.GREEN else Color.RED);
MidlineP.HideBubble();
MidlineP.HideTitle();

#plot UpperBandP = Double.NaN;
plot UpperBandP = FW_DPO_MOBO(price, colorNormLength, dpoLength, moboDisplace, moboLength, numDevDn, numDevUp, coloredMobo, coloredFill, breakArrows, moboShowMid).UpperBandP;
UpperBandP.SetDefaultColor(Color.WHITE);
UpperBandP.SetLineWeight(1);

#plot LowerBandP = Double.NaN;
plot LowerBandP = FW_DPO_MOBO(price, colorNormLength, dpoLength, moboDisplace, moboLength, numDevDn, numDevUp, coloredMobo, coloredFill, breakArrows, moboShowMid).LowerBandP;
LowerBandP.SetDefaultColor(Color.WHITE);
LowerBandP.SetLineWeight(1);

#plot Zeroline = Double.NaN;
plot Zeroline = FW_DPO_MOBO(price, colorNormLength, dpoLength, moboDisplace, moboLength, numDevDn, numDevUp, coloredMobo, coloredFill, breakArrows, moboShowMid).Zeroline;
Zeroline.SetStyle(Curve.MEDIUM_DASH);
Zeroline.SetDefaultColor(Color.ORANGE);
Zeroline.SetLineWeight(2);


#plot BreakOutArrow = Double.NaN;
plot BreakOutArrow = FW_DPO_MOBO(price, colorNormLength, dpoLength, moboDisplace, moboLength, numDevDn, numDevUp, coloredMobo, coloredFill, breakArrows, moboShowMid).BreakOutArrow;


#plot BreakDownArrow = Double.NaN;
plot BreakDownArrow = FW_DPO_MOBO(price, colorNormLength, dpoLength, moboDisplace, moboLength, numDevDn, numDevUp, coloredMobo, coloredFill, breakArrows, moboShowMid).BreakDownArrow;

AddCloud(UpperBandP, LowerBandP, Color.MAGENTA, Color.MAGENTA);
I can't find the link for this indicator.
 
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.
This is very interesting @MerryDay , and @rad14733
I find your MomentumBreakout function fascinating and your explanations you shared enlightening.

This learnings here might be applied to others analogous problems as well.
https://www.seeitmarket.com/using-momentum-bands-with-a-risk-on-ratio-filter/

In particular I think I might use this with our relative volume studies to understand how mobile an volume might be. Or rather why some unusual volumes are more restless than others.
https://usethinkscript.com/threads/time-based-volume-indicator-for-thinkorswim.124/post-136003

Thank you and have a happy new year.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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