Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 889 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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