Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Loops? Who needs them... ;)
To find the highest LinearReg over 13~52 periods:
[code:1:6cd19b51e3]max(LinearReg(C,13),
max(LinearReg(C,14),
max(LinearReg(C,15),
max(LinearReg(C,16),
max(LinearReg(C,17),
max(LinearReg(C,18),
max(LinearReg(C,19),
max(LinearReg(C,20),
max(LinearReg(C,21),
max(LinearReg(C,22),
max(LinearReg(C,23),
max(LinearReg(C,24),
max(LinearReg(C,25),
max(LinearReg(C,26),
max(LinearReg(C,27),
max(LinearReg(C,28),
max(LinearReg(C,29),
max(LinearReg(C,30),
max(LinearReg(C,31),
max(LinearReg(C,32),
max(LinearReg(C,33),
max(LinearReg(C,34),
max(LinearReg(C,35),
max(LinearReg(C,36),
max(LinearReg(C,37),
max(LinearReg(C,38),
max(LinearReg(C,39),
max(LinearReg(C,40),
max(LinearReg(C,41),
max(LinearReg(C,42),
max(LinearReg(C,43),
max(LinearReg(C,44),
max(LinearReg(C,45),
max(LinearReg(C,46),
max(LinearReg(C,47),
max(LinearReg(C,48),
max(LinearReg(C,49),
max(LinearReg(C,50),
max(LinearReg(C,51),
LinearReg(C,52))))))))))))))))))))))))))))))))))))))))
[/code:1:6cd19b51e3]
Note that the above 39-nested Max() functions may not run too well in anything less than a Pentium VII 256THz (terahertz) with 512Tb (terabytes) of RAM. For slower machines, try splitting the formula into four.
jose '-)
|