Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Maximum Value #480809
07/15/20 10:33
07/15/20 10:33
Joined: Jun 2019
Posts: 24
Q
Qw3rty Offline OP
Newbie
Qw3rty  Offline OP
Newbie
Q

Joined: Jun 2019
Posts: 24
How do I get the maximum Equity Value over a period?

I have tried with MaxVal but not sure how pointers work:
vars max_value = series(MaxVal(Equity,500)); //Error - MaxVal(): Pointer expected

Any ideas?

Thank you

Re: Maximum Value [Re: Qw3rty] #480810
07/15/20 12:50
07/15/20 12:50
Joined: Feb 2017
Posts: 1,806
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,806
Chicago
You need a vars (a pointer to an array of values), but Equity is a var (just one value).

So you need to feed the MaxVal function a vars of Equity, using series(), so that MaxVal can read an array of values.

Re: Maximum Value [Re: Qw3rty] #480821
07/17/20 07:09
07/17/20 07:09
Joined: Jun 2019
Posts: 24
Q
Qw3rty Offline OP
Newbie
Qw3rty  Offline OP
Newbie
Q

Joined: Jun 2019
Posts: 24
That's really helpful, thank you!

Last edited by Qw3rty; 07/17/20 07:09.
Re: Maximum Value [Re: Qw3rty] #480839
07/18/20 02:06
07/18/20 02:06
Joined: Jun 2019
Posts: 24
Q
Qw3rty Offline OP
Newbie
Qw3rty  Offline OP
Newbie
Q

Joined: Jun 2019
Posts: 24
Is there anyway of getting the same result without using MaxVal?

The reason I ask is I noticed that I need to make the period a huge value to store the maximum equity otherwise it can decrease in value.

Re: Maximum Value [Re: Qw3rty] #480842
07/18/20 07:46
07/18/20 07:46
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
HH() / LL() maybe?

Re: Maximum Value [Re: Qw3rty] #480845
07/18/20 10:44
07/18/20 10:44
Joined: Jun 2019
Posts: 24
Q
Qw3rty Offline OP
Newbie
Qw3rty  Offline OP
Newbie
Q

Joined: Jun 2019
Posts: 24
Looks like HH is for price but I'll try this with the Equity value. Thank you!

Re: Maximum Value [Re: Qw3rty] #480847
07/18/20 11:20
07/18/20 11:20
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
For equity it will not work, didn't read it all.
Maybe you use maxVal on a static var.

Max value for last 48 hours and put it into a static var.


Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1