Hi,
New to the forum, first post! 🙂
I’m trying to reproduce an indicator I have in another platform in PRT, but can’t make it work. Results differ from the “orginal”.
It’s using Slow Stochastics, %K=5, %D=3.
First part of it is comparing Slow Stochastic from two periods back with current period. I’ve tried like this:
Stochastic[3,5](Close[2]) < Stochastic[3,5]
Also tried SmoothedStochastic. I’m not sure how to handle the Stochastic indicator in PRT. Any advice is greatly appreciated.
Cheers,
Hi chrille,
You should code your stochastic comparing statement like this instead:
sto = Stochastic[3,5](Close)
condition = sto[2]<sto
The “sto” variable array will be built on the fly by the platform, so you just have to refer to this array of data with number under bracket considering the last n value.
Hi Nicolas,
Thanks for the suggestion, it works much better. Although I still get slightly different results compared to the”original”, but I’ll keep working on it. 🙂
Cheers,
Maybe you could share us the indicator you’d like to be converted, this is something I’m used to 🙂