Next I created another custom formula $PPO_EMA_9 and was trying something like this
= ($PPO_1 + PPO_2 +… $PPO_9)/9 [I know this is sma, I was just trying quick and dirty to see if that works]
but it gives an error as custom formulae cannot be used in another custom formula.
Big Picture: I am trying to implement Stock Charts Techincal Rank (SCTR) for, say sp1500 and one of the things that SCTR uses is 3-day slope of PPO-Histogram. I have attached to write up, if you care. Once again any help is appreciated
You can’t use a custom formula within a custom formula, but there is an alternative. You can use the SetVar functionality to define what is, in essence, a custom formula within a screen.
Then, you can do whatever you want with @PPO_EMA_9
Some users don’t like the fact that you need to do this within a screen, rather than a stored variable. That’s unfortunate. It’s actually a very powerful function that can d a lot – a a heck of a lot.
What if I want to use @PPO_EMA_9 in a rank? (That is my intent)
And while I have you, let me ask, can we implement a simple PPO function in P123.
This is what I had in mind (from one of my other posts)
I was thinking something like PPO(small,large,offset) would be useful to have in P123.
So $PPO_2 (=((ema(9,2)-ema(26,2))/ema(26,2))*100) would be like (new function) PPO(9,26,2).
I’ll have to defer to Marco on the rationale re: nesting.
As to simply adding a PPO function, technical analysis is not really my wheelhouse. But if it’s a helpful concept, we should be able to add it. Can you point me to something where i could study up? (The pdf to which you linked seems to use PPO as part of a larger model.)
I think that having a nesting (or using the custom formula in another custom formula) would be a good add and so would be PPO.
Please find the PPO writeup attached with this post.
I guess, that marco does not allow nesting, because it would use up too much computing resources.
Nesting can get very complex to compute, especially if it gets recursive and ends up in an endless loop