TradingView
mdenson
Jun 19, 2022 4:59 AM

Zero Lag Detrended Price Oscillator (ZL DPO) 

GoldOANDA

Description

This indicator attempts to create a zero lag Detrended price oscillator using 2 different scripts. I actually really like the results so far. I hope you all find it useful too.

Green>Red = long
Red>Green = short

The lines on the example chart are some of the signals that the indicator gave on default settings.

The greens are wins, reds are outright losses, and blues are "scratch" trades(signal for other side before hitting stop loss).
All of the signals tested were using NNFX money management to see if they are wins or losses(1.5x atr for SL and 1 Atr for TP).
Comments
Ari9191
But it's working for me perfectly. Why do you think you made a mistake sir?
dmitrievich
Hi! Liked the idea. But for what purpose was used zlma in the first section if in the code further you use only length = 50? Possible mistake somewhere.
mdenson
Just realized using bar replay that these signals do not line up with where they took place on the chart. 😞 Sorry guys, I'll see if I can figure out why, but until then this oscillator isn't as good as I thought.

I'm still just an amateur coder. I thought it was a cool idea. I may not have executed it will though lol. I'm still learning.
dmitrievich
@mdenson, i think that's because of offset in plot
mdenson
@dmitrievich, thank you. That's definitely the problem, but you raise a great question with your original comment.

I literally just started learning to code stuff and just in the early stages of knowing what will work and what won't.

I just saw some good results when I back tested what I had and I didn't really care how I got there, but then I figured out that I was wrong about that as well haha.
More