Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by 7th_zorro. 04/16/24 13:19
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
6 registered members (7th_zorro, Aku_Aku, VoroneTZ, 11honza11, ricky_k, Nymphodora), 427 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 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,724
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

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