Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by MonsterX. 12/05/25 02:43
ZorroFix. ini /data and /log path
by Martin_HH. 12/02/25 11:42
Parameter selection
by jcl. 12/01/25 12:28
ZorroGPT
by TipmyPip. 11/29/25 09:38
webGL
by Ezzett. 11/27/25 23:22
Chart viewer
by clint000. 11/27/25 21:21
Black Friday discounts!
by jcl. 11/27/25 13:58
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 1,437 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
MonsterX, KF_Investments, Luuk, decotb, clint000
19184 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Max value of an entire Series #477717
07/24/19 18:02
07/24/19 18:02
Joined: Jul 2019
Posts: 26
M
maxwellreturn Offline OP
Newbie
maxwellreturn  Offline OP
Newbie
M

Joined: Jul 2019
Posts: 26
Sorry for my dumb question but it seems simple but it's not confused

How can i get the max value of an entire series? All functions ( statistical or sortData) get the problem of LookBack and Time Period

Ps.im tryng to obtain a current Max Drawdown, so i need a current Max Value of the equity Curve

Last edited by maxwellreturn; 07/24/19 18:42.
Re: Max value of an entire Series [Re: maxwellreturn] #477719
07/24/19 20:18
07/24/19 20:18
Joined: Feb 2017
Posts: 1,810
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,810
Chicago
You don't need the length. Use a static var. It holds its value between function calls. Alternatively, use an AssetVar or AlgoVar in the same manner.

Code
vars ThisSeries = series(...);
static var maxThisSeries = -999.99; // arbitrary low initial number
maxThisSeries = max(maxThisSeries, ThisSeries[0]);

Re: Max value of an entire Series [Re: AndrewAMD] #477720
07/24/19 22:18
07/24/19 22:18
Joined: Jul 2019
Posts: 26
M
maxwellreturn Offline OP
Newbie
maxwellreturn  Offline OP
Newbie
M

Joined: Jul 2019
Posts: 26
perfect, thank you andrew


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1