Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (rki), 405 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
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