Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (EternallyCurious, howardR), 646 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

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