Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Ayumi, Akow, AndrewAMD), 1,505 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Margin in use #429519
09/13/13 14:54
09/13/13 14:54
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
Is there a variable to check how much Margin is currently in use?

Re: Margin in use [Re: blaub4r] #429521
09/13/13 15:26
09/13/13 15:26
Joined: Jul 2013
Posts: 522
D
dusktrader Offline
User
dusktrader  Offline
User
D

Joined: Jul 2013
Posts: 522
It might be related to ProfitOpen, but I'm not sure

Re: Margin in use [Re: dusktrader] #429613
09/15/13 12:12
09/15/13 12:12
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
I didn't find anything here: http://manual.zorro-trader.com/winloss.htm
And since my trades have different margins, I cannot simply multiply the number of trades with the current margin. That's why I'm asking.

Re: Margin in use [Re: blaub4r] #429615
09/15/13 12:56
09/15/13 12:56
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
Ok, I'm currently using this one:

var MiU = 0;
for(open_trades)
MiU += TradeLots*MarginCost;

(Tradeloops are pretty handy laugh )

Re: Margin in use [Re: blaub4r] #429659
09/16/13 10:01
09/16/13 10:01
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
It's "MarginVal". The manual has a search function, so if you look for something particular, just enter a keyword like "margin".

Re: Margin in use [Re: jcl] #429662
09/16/13 10:41
09/16/13 10:41
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
Hmm, MarginVal does not seem to work:
Error in 'line 135:
'MarginVal' undeclared identifier
< plot("MiU2",MarginVal,1,BLACK);
>.

By the way, where is that search function jcl mentioned?

Re: Margin in use [Re: blaub4r] #429663
09/16/13 11:33
09/16/13 11:33
Joined: Apr 2013
Posts: 57
3
3DCat Offline
Junior Member
3DCat  Offline
Junior Member
3

Joined: Apr 2013
Posts: 57
@blaub4r
MarginVal didn't work for me too. Just didn't bother to mention it.

I always search via google:)
site:zorro-trader.com/manual MarginVal

Re: Margin in use [Re: 3DCat] #429664
09/16/13 11:40
09/16/13 11:40
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, sorry. It's "MarginSum", not "MarginVal". For some reason the variable was renamed some time ago. Here's the updated manual page:

http://manual.zorro-trader.com/balance.htm

Search is when you click on the tab named [Search]. All Zorro variables are also listed in the file variables.h in the include folder, so that's a fast way to look for a certain variable.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1