Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percentage Price Oscillator - PPO #110

Open
iblislin opened this issue Apr 17, 2018 · 4 comments
Open

Percentage Price Oscillator - PPO #110

iblislin opened this issue Apr 17, 2018 · 4 comments

Comments

@iblislin
Copy link
Member

https://www.investopedia.com/terms/p/ppo.asp

@alexandrebrilhante
Copy link
Contributor

I would like to tackle this. Would something like below suffice?

Largely inspired by macd.

function ppo(ta::TimeArray{T,N}, fast::Int=12, slow::Int=26, signal::Int=9; wilder::Bool=false) where {T,N})
    x = ema(ta, fast, wilder=wilder)
    y = ema(ta, slow, wilder=wilder)
    
    dif = x .- y
    sig = ema(ta, signal, wilder=wilder)
    osc =  dif ./ y .* 100

    cols = ["ppo", "dif", "signal"]
    new_cols = (N > 1) ? gen_colnames(ta.colnames, cols) : cols
    
    merge(merge(osc, dif), sig, colnames=new_cols)
end

@alexandrebrilhante
Copy link
Contributor

Just saw #114.

@Arkoniak
Copy link
Member

Arkoniak commented Apr 4, 2021

I guess we can revive #114, add some tests, and merge.

@iblislin
Copy link
Member Author

iblislin commented Apr 6, 2021

yeah, that's a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants