[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RANDOM function



PureBytes Links

Trading Reference Links


yep, no random in TS4.

if all you need is psuedo random numbers,
try making a function with 2 prime numbers,
A and B where A > B. To make the sequence
useful, try to use a large A.

then the Nth random number is (B * N) mod A
the sequence will fill in all the possible
values from 0 to A - 1 randomly.

TS4 has barnumber function to facilitate the
needed N.

e.g. A = 11, B = 3

N    result  
0    0
1    3
2    6
3    9
4    1
5    4
6    7
7    10
8    2
9    5
10   8
11   0

if you need to have unpredictable result,
try feed a starting point for N.


--- John Sweeney  S&C <JSweeney@xxxxxxxxxxx> wrote:
> Am I just missing it, or is there no RANDOM function
> in TS 4.0?
> 
> John
> 
> John Sweeney, Interim Editor  Technical Analysis of
> Stocks & Commodities
> Technical Analysis, Inc.    The Traders' Magazine
> 4757 California Ave. S.W.   Phone: 206 938-0570 
> Fax: 206 938-1307
> Seattle, WA 98116-4499 USA  Web:
> http://www.traders.com/
>
____________________________________________________________________
> Contents may not reflect official opinion of
> Technical Analysis, Inc.
> 
> 


=====
Lawrence Chan                   http://www.tickquest.com    
Innovative Analytical Software for Trading Professionals

_______________________________________________________
Do You Yahoo!?
Get your free @yahoo.ca address at http://mail.yahoo.ca