RicardoSantos

Function Pseudo Random Generator

Function to return a pseudo random number.
you can constrict it to a range and provide a seed to step through on the same bar.

thanks to Duyck, for the link.
版本注释: Update for V4, the function now can return a prng value every time its called.
it uses a external global variable to parse the seed in and out via parameters and output.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,因此交易者可以理解和验证它。为作者加油! 您可以免费使用它,但是在发布中重复使用此代码受网站规则的约束。您可以收藏它以在图表上使用。

想在图表上使用此脚本?

评论

not clear what is this indicator how do you use it
回复
Hi Sir , absolute work. I have a question : Can we limit range ? ( For example : Random numbers between : 20 - 100 ) . Best regards.
回复
@Noldo, 20 + f_pseudo_random_number(80, 0)
+1 回复
Noldo RicardoSantos
@RicardoSantos, Thank you so much !
回复
You're undervalued, as a coder and a trader, I admire your work from a long time. I've been thinking how to generate random numbers for a while and I've only found failure - and there you go.

Good find!
回复
You are a historic trader in Trading View
回复
nice
回复