DPO (Detrended Price Oscillator) compares the closing price to the prior moving average, eliminating cycles longer than the moving average. The MOBO (Momentum Breakout) band settings are used to filter out the DPO noise to produce buy and sell signals for trend moves. This works for all time periods and tick charts.
I have my own custom versions of the ToS FW_DPO_MObo and have posted my short version below... Note that my settings differ from the original release...
I have my own custom versions of the ToS FW_DPO_MObo 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);
Last edited by a moderator: