Page 1 of 1
Random Numbers
Posted: Tue May 07, 2024 7:44 am
by anon
Is there any way to generate a random number? I am interested in creating a random entry chartscript, to compare to a signal entry in POE template.
Re: Random Numbers
Posted: Tue May 07, 2024 7:45 am
by Chris White
There is a RAND function which generates a seeded sequence of random numbers where the seed is the symbol. This means that for any given symbol the random sequence will be identical. If your data starts 10 years ago, the first random number will be x, they y then z. However, tomorrow when you update your data the start day will have changed but the sequence will still by x,y,z. I hope that makes sense. Please let me know if you have any questions or any requirement for having a random number that is unseeded or where you can specify a seed as a parameter (those functions are not yet in EdgeRater).
I would suggest using the POT/POE multiple symbols template instead of the POE template as it was developed after the POE template and is more flexible:
This template differs from the POTBOT and Probabiltiy of Expiring individual templates in that it shows both Probabiltiy Of Touch and Probability of Expiry in one report and more signifcantly it allows you to show the combined probabilities of an entire symbol list or selected stocks from a symbol list (use the check box next to symbols in your list to include or exclude stocks)
I would also suggest testing using the ‘AlwaysTrue’ script, which generates a signal on every bar.
Here's a chart to show how you might use RAND to generate entry events: