TensorTom

Pseudo Random Number Generator

617 views
28
617 0
This is my first attempt at a psuedo-random number generator in Pine. It is, as you can see, a failed attempt thus far. I began by trying to implement the random color generator as described here: https://www.tradingcode.net/tradingview/colours/random-colours/ in version 3 Pine (Not sure which version he was using). As you can see, the color isn't random.

The end goal here is to be able to get pseudo-random numbers for use in algorithms that require them, of which there are a significant few. Perhaps numbers aren't required so long as I can map colors to other data. We'll see. This is a work-in-progress and I encourage anyone who can help to do so. Algorithmically, the importance of being able to use random data can't be overstated.
Jul 10
Versionshinweise: switched x to outside the function as in the example this is derived from.
Jul 13
Versionshinweise: It now works!!! It was actually a simple fix. A huge thanks to Julia P. from TradingView Support. Now the real magic begins.
Von Favorisierten Skripten entfernen Zu Favorisierten Skripten hinzufügen
Startseite Aktien-Screener Forex-Screener Krypto-Screener Wirtschaftskalender Shows So funktioniert es! Chartmerkmale Preise Hausregeln Moderatoren Webseite & Brokerlösungen Widgets Charting Lösungen Lightweight Charting Library Hilfe Center Einen Freund empfehlen Feature-Anfrage Blog & News FAQ - Häufige Fragen & Antworten Wiki Twitter
Profil Profileinstellungen Konto und Abrechnung Einen Freund empfehlen Meine Support Tickets Hilfe Center Veröffentlichte Ideen Followers Ich folge Private Nachrichten Chat Abmelden