Worden Trainer
Joined: 10/7/2004 Posts: 65,138

SMI Ergodic Oscillator
Template (v17+)
XAVG(XAVG(C  C1, p), q) / XAVG(XAVG(ABS(C  C1), p), q)  XAVG(XAVG(XAVG(C  C1, p), q) / XAVG(XAVG(ABS(C  C1), p), q), r)
Where p is the Short Period.
Where q is the Long Period.
Where r is the Signal Period.
Related Topics
Bruce Personal Criteria Formulas TC2000 Support Articles


Registered User Joined: 6/26/2011 Posts: 128

Hi Bruce: Is it possible to code this oscillator as a pcf? (I don't care about the histogram, colors etc.):
https://www.tradingview.com/script/vWzBujcZAdaptiveErgodicCandlestickOscillatorLazyBear/


Administration
Joined: 9/30/2004 Posts: 9,187

Yes, that is the formula above. You just need to sub the short, long and signal periods to your liking.


Registered User Joined: 6/26/2011 Posts: 128

QUOTE (StockGuy)
Yes, that is the formula above. You just need to sub the short, long and signal periods to your liking.
I don't think so. It is an adaptive form which uses stochastic 14.


Worden Trainer
Joined: 10/7/2004 Posts: 65,138

I am not quite sure I understand the code and I don't think this is right (I don't think I am understanding the use of the EP variable).
100 * XAVG(ABS(STOC14  50) / 50 * XAVG(ABS(STOC14  50) / 50 *(C  O), 2), 2) / XAVG(ABS(STOC14  50) / 50 * XAVG(ABS(STOC14  50) / 50 * (H  L), 2), 2)
And the SE values used to calculate some of the colors is the following.
100 * XAVG(XAVG(ABS(STOC14  50) / 50 * XAVG(ABS(STOC14  50) / 50 * (C  O), 2), 2) / XAVG(ABS(STOC14  50) / 50 * XAVG(ABS(STOC14  50) / 50 * (H  L), 2), 2), 9)
Bruce Personal Criteria Formulas TC2000 Support Articles


Registered User Joined: 6/14/2016 Posts: 285

Hi Bruce,
This is a little more complex. I'm trying to write a PCF Indicator (not condition) for the
1. Klinger Volume Oscillator (9, 13) as the source derived from the price;
2. Next up in the hierarchy, I looking for the SMI Ergodic Indicator (3, 7) sourced by the KVO (9,13);
And lastly the 7 period ROC of the SMI Ergodic Indicator (3, 7).
It would be easy to make a Condition PCF, but I would like to have an indicator which shows zero line (of the Ergodic Osc) crossings from trhe ROC. Ideally a +1 bar when the ROC crosses the zero line up and a 1 bar when the ROC crosses the zero line down.
Is this doable?
Many thanks,
Chris


Worden Trainer
Joined: 10/7/2004 Posts: 65,138

I don't think I am going to be able to do this. So far, I haven't been able to reproduce the Klinger Volume Oscillator. Assuming I can do so eventually, I suspect the formula is gonig to be too long and slow to be practical or post in the forums.
Bruce Personal Criteria Formulas TC2000 Support Articles


Registered User Joined: 6/14/2016 Posts: 285

Hi Bruce,
I understand. Do you think you could program it without the KVO.
Just by means of the ROC(7) of the SMI Ergodic Indicator (3, 7)?
That would help alot, i.e. also having a +1 Histogram bar with the ROC7 crossing the zero line up, and a 1 histogram bar for the ROC7 crossing the zero line down.
Perhaps it is easy to change the ROC7 parameter subsequently into a ROC5 or so.
Many thanks Bruce.
Chris


Registered User Joined: 6/14/2016 Posts: 285

Hi Bruce,
I just found a better way, but don't know if it's possible:
To the the MoneyStream (instead of the KVO), then to source the TSI35 from the MS. And lastly to have the ROC(5) being sourced from the TSI35.
That would elimiate the KVO but using MS, it would be superior to just using the ROC(7) of the TSI37.
Do you think with may be doable?
Thanks, Bruce
Chris


Registered User Joined: 6/14/2016 Posts: 285

Sorry, I got all all confused looking at a differen chart.
What I mean is:
1. Use MS instead of KVO.
2. Then source SMI Ergodic Indicator (3, 5) from the MS.
3. Then source ROC5 from the SMI Ergodic (3,5)
Somehow the TSI slipped in there instead of the SMI Ergodic indicator, very sorry.
Chris
This is definately correct.


Registered User Joined: 6/14/2016 Posts: 285

Many thanks indeed:
Do I make 2 separate PCF Indicators here? One for the top and one for the bottom one...


Worden Trainer
Joined: 10/7/2004 Posts: 65,138

I keep trying to respond to your question and then you post a clarification before I respond which makes my response incorrect (or in the last case it just made me think it was wrong as TSI and SMI Ergodic are two different names for the same thing).
So I think the base formula for your most recent proposal would be the following.
XAVG(XAVG(MS  MS1.1, 3), 5) / XAVG(XAVG(ABS(MS  MS1.1), 3), 5)  XAVG(XAVG(MS1.5  MS1.6, 3), 5) / XAVG(XAVG(ABS(MS1.5  MS1.6), 3), 5)
And a histogram for the crossovers would be the following.
(SGN(XAVG(XAVG(MS  MS1.1, 3), 5) / XAVG(XAVG(ABS(MS  MS1.1), 3), 5)  XAVG(XAVG(MS1.5  MS1.6, 3), 5) / XAVG(XAVG(ABS(MS1.5  MS1.6), 3), 5))  SGN(XAVG(XAVG(MS1.1  MS1.2, 3), 5) / XAVG(XAVG(ABS(MS1.1  MS1.2), 3), 5)  XAVG(XAVG(MS1.6  MS1.7, 3), 5) / XAVG(XAVG(ABS(MS1.6  MS1.7), 3), 5))) / 2
These are two different formulas and/or Custom PCF Indicators.
Bruce Personal Criteria Formulas TC2000 Support Articles


Registered User Joined: 6/14/2016 Posts: 285

Thanks Bruce, sorry about all the confusion.


Registered User Joined: 6/14/2016 Posts: 285

Hi Bruce,
I really don't want to be a bother. But looking at the two new indicators I can see a 23 bar delay in the zero line crossing of the basic indicator as compared to the histogram signals. I have (tried to) attach a respective screen print. Any thought on this?


Registered User Joined: 1/11/2019 Posts: 28

Can I also get a copy in TC Mail please?
Regards


Worden Trainer
Joined: 10/7/2004 Posts: 65,138

I have sent you a copy of a chart containing my interpretation of ROC of SMI of MS via TCMail. It will only work for TC2000 v17 or newer. You should be able to edit the Custom PCF Indicators to view the formulas.
How to Receive Messages with TC Mail
Bruce Personal Criteria Formulas TC2000 Support Articles


Guest1 