SHO – Simple Harmonic Oscillator
A Time Cycle Oscillator – Published on IFTA Journal 2018 by Akram El Sherbini (pages 80-84)
(http://www.ftaa.org.hk/Files/2018130101754DGQ1JB2OUG.pdf)
Bullish signals are generated when SHO crosses over 0
Bearish signals are generated when SHO crosses under 0
- OverBought level is 40
- OverSold level is -40
- ExtremeOB level is 60
- ExtremeOS level is -60
As with most oscillators, divergences can be taken advantage of.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
DEFPARAM CalculateOnLastBars = 1000 //EmaPeriod = 14 //Number of Periods of the EMA EmaPeriods = max(2,min(999,EmaPeriods)) //range 2-999 // EmaPeriods = 14 Cy = close[1] Vt = close - Cy Vy = Vt[1] Att = Vt - Vy Ema = average[EmaPeriods,1](Att) Tt = sqrt(abs(Vt/Ema)) Ti = ((close > Cy) * Tt) OR (((close <= Cy) * Tt) * -1) Vp = average[EmaPeriods,1](Ti) Tp = average[EmaPeriods,1](Tt) Sho = Vp / Tp * 100 RETURN Sho AS "Sho",0 AS "0",60 AS "ExtremeOB",40 AS "Ob",-40 AS "Os",-60 AS "ExtremeOS" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
good job, its fine for divergences. Thank you
Hello Roberto!
Thank you for this indicator. I thought I would try it out in a strategy, but something goes wrong when I “call” it. I made a graph from the strategy and comparing it to the indicator and it shows some totally different numbers. I also inserted the whole code inside the strategy but I get the same result. Any idea what could be wrong?
I just realized that there’s a line that shouldn’t be there.
It’s line 5, please remove it, since It overrides any setting you may want to change by either CALLing it or setting the indicator’s properties.
I think this is the cause.
Sorry for any inconvenience.
I just discovered that ProOrder (for automated strategies) does not evaluate the expression in line 12 correctly (as Probuilder does), so if you want to embed the code in your strategy you need to replace that line with:
//Ti = ((close > Cy) * Tt) OR (((close Cy) THEN
Ti = Tt
ELSE
Ti = -Tt
ENDIF