Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 6,260 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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,840
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

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