Universal Oscillator
Author: ichechet
Creation Date: 4/13/2015 9:37 AM
profile picture

ichechet

#1
Greetings!

Found some strange code in Universal Oscillator. Marked it with comments:

CODE:
Please log in to see this code.
profile picture

Eugene

#2
The highlighted lines only affect the first two bars, or practically do not affect anything considering the typical data loading range is likely to be in the ballpark of hundreds and thousands bars. For a more precise initialization (seed data), I'll check in these two minor changes:

CODE:
Please log in to see this code.


Igor, thank you for staying on top of this.
profile picture

ichechet

#3
As for me, we don't need the PeakAGC list. It could be only a variable.

Also Filt[1] = 0 and Filt[2] = 0, so we don't need the code there.

You have to have the value of 1 on the 1st valid value, because of the AGC. AGC causes the poor stabilisation.
profile picture

Eugene

#4
QUOTE:
You have to have the value of 1 on the 1st valid value, because of the AGC. AGC causes the poor stabilisation.

It's not in the code provided by Mr. Ehlers.
profile picture

ichechet

#5
CODE:
Please log in to see this code.


Strange Code...

The next thing. FirstValidValue. We have very small initial PeakAGC = .0000001 Then we mult it by 0.991. And then we compare it with SuperSmoother value. This value always will be more than PeakAGC on the first value. So PeakAGC = Filt. Then:

CODE:
Please log in to see this code.


It means that the first value will be 1. Just to check the indicator.
profile picture

Eugene

#6
QUOTE:
Strange Code...

Such was the original EasyLanguage code by Mr. Ehlers.
profile picture

Carova

#7
Hi!

I seem to be having some issues with this indicator for some symbols. using the following code
CODE:
Please log in to see this code.


and setting the Dares from 1/1/1990 to Present

the following symbols
QUOTE:
AAL,ABBV,AMBA,ANET,AR,ARMK,AXTA,BABA,BERY,BURL,CDK,CFG,CST,DATA,FANG,FEYE,FIT,GPRO,GRUB,HLT,HPE,INFO,JD,KHC,MBLY,MNK,NCLH,NOW,PANW,PE,PF,PYPL,Q,QRVO,RDUS,RICE,RLGY,RSPP,SABR,SERV,SFM,SHOP,SYF,TWTR,VOYA,W,WB,WDAY,WRK,WUBA,WWAV,YY,ZAYO,ZTS


gives the following error
QUOTE:
DataSeries do not have equal number of values for mathematical operation


My Data Source is Fidelity and I have checked that there are no missing dates.

Any thoughts?

Vince
profile picture

Eugene

#8
Hi,

Try to choose a different data loading range option. Anything goes except "Date Range": "Most recent XX years", All Data or Fixed Bars. The thing is, Wealth-Lab passes on an empty DataSeries to the UniversalOscillator indicator which isn't OK with it. This has something to deal with
wide discrepancy of bars count between the stocks like AAL and PYPL.
profile picture

Carova

#9
Hi Eugene!

"Date Range" is the only realistic way to deal with maintaining a Training Set for development and a Test Set to be used Out-Of-Sample. All other approaches fail to allow this "bright line" separation.

What do I need to do to create a "local" version of this indicator to solve the "Date Range" problem"

Vince
profile picture

Eugene

#10
Vince, I've looked into it and can say that "fixing" the UO is not required and will not help.

The problem is that your Date Range is incorrect. You cannot use a date in 1990 when a bunch of stocks has started trading only in 2015. If you look at the chart of HPE, for example, you should see a "No data available". Some might expect Wealth-Lab to present the available history instead but I'm not sure if this is expectation is correct. (Robert?) Consequently, what you get is an empty Close DataSeries which throws the UO off, and an error message in the Debug log. The indicator cannot process an empty DataSeries by design. The only "patch" that you might roll out is perhaps to return a 0.

P.S. I'll suppress the error message in the UniversalOscillator indicator in TASCIndicators in a later release.
profile picture

Cone

#11
QUOTE:
Some might expect Wealth-Lab to present the available history instead but I'm not sure if this is expectation is correct. (Robert?)
If data are available in the range selected, they should be loaded. As for me, it works. I tested it using the Fidelity provider too and no such error occurs.

Are you sure that you're not executing some other code?

With the snippet above, as long as at least 3 bars load, no error should occur.
profile picture

Eugene

#12
This seems like an intermittent something. Since I had already fixed the UO in my primary 64-bit installation of WLD I've loaded its 32-bit version to re-run the test. Although I could reproduce the Debug log error yesterday night and "No data available", right now the code is working correctly when I to load data since 1/1/1990 and then a chart is rendered which previously failed to load (e.g. HPE). Go figure.
profile picture

Eugene

#13
QUOTE:
P.S. I'll suppress the error message in the UniversalOscillator indicator in TASCIndicators in a later release.

This error message is suppressed in TASCIndicators v2017.02.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).