Gamestudio Links
Zorro Links
Newest Posts
2 questions
by jcl. 08/14/20 12:50
New Zorro version 2.30
by jcl. 08/14/20 12:48
Reducing Function Times
by txesmi. 08/14/20 12:13
NeoDumont's open world treadmill project
by NeoDumont. 08/13/20 23:33
Corvitextu texture browser released...
by NeoDumont. 08/13/20 23:19
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/13/20 12:00
AUM Magazine
Latest Screens
Untitled Walking Simulator
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
8 registered members (kvm, AndrewAMD, txesmi, 3run, alibaba, danatrader, Superku, 1 invisible), 485 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Janusz, Sovattha, DonSergio, bigimpactsound, tzw101
18492 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: 23
Q
Qw3rty Offline OP
Newbie
Qw3rty  Offline OP
Newbie
Q

Joined: Jun 2019
Posts: 23
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,071
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,071
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: 23
Q
Qw3rty Offline OP
Newbie
Qw3rty  Offline OP
Newbie
Q

Joined: Jun 2019
Posts: 23
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: 23
Q
Qw3rty Offline OP
Newbie
Qw3rty  Offline OP
Newbie
Q

Joined: Jun 2019
Posts: 23
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: 220
D
danatrader Online
Member
danatrader  Online
Member
D

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

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

Joined: Jun 2019
Posts: 23
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: 220
D
danatrader Online
Member
danatrader  Online
Member
D

Joined: Mar 2019
Posts: 220
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 | chip programmers | 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