Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 902 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
difference between MarginTotal, MarginVal ? #487133
01/26/23 03:07
01/26/23 03:07
Joined: Jan 2023
Posts: 15
Q
qin Offline OP
Newbie
qin  Offline OP
Newbie
Q

Joined: Jan 2023
Posts: 15
Dear there, I wonder what is the difference between MarginTotal, MarginVal. I did some tests and found that they returned the same values.
Any idea?

Re: difference between MarginTotal, MarginVal ? [Re: qin] #487140
01/26/23 15:54
01/26/23 15:54
Joined: Oct 2022
Posts: 13
N/A
J
juanex Offline
Newbie
juanex  Offline
Newbie
J

Joined: Oct 2022
Posts: 13
N/A
MarginTotal:

The current allocated margin of all open trades of the strategy, calculated through MarginCost under the assumption of a constant margin requirement of open trades. This can be different in live trading when brokers adapt the margin requirement to the market situation or asset price. A margin call is simulated in test and training mode when Capital > 0 and Equity - MarginTotal reaches zero.

MarginVal:

The current allocated margin of the account. The account is threatened by a margin call when Equity - MarginVal approaches zero. In live trading, this parameter is updated from the broker API if available; in test and training it follows MarginTotal.

P.S. both definitions of the variables can be found in the Zorro manual

Re: difference between MarginTotal, MarginVal ? [Re: juanex] #487141
01/26/23 23:53
01/26/23 23:53
Joined: Jan 2023
Posts: 15
Q
qin Offline OP
Newbie
qin  Offline OP
Newbie
Q

Joined: Jan 2023
Posts: 15
I read the manual but still confused. could tell me when they return different values.

Re: difference between MarginTotal, MarginVal ? [Re: qin] #487144
01/27/23 15:40
01/27/23 15:40
Joined: Oct 2022
Posts: 13
N/A
J
juanex Offline
Newbie
juanex  Offline
Newbie
J

Joined: Oct 2022
Posts: 13
N/A
They would return different values when you are trading with a live account, based on the margin requirements of your broker.

for example, let's say that your margin rules while testing is 25% of the initial position, while your broker's are actually 50%. It is possible that while you test you may experience some drawdowns but never a margin call, yet when you go live you can have a drawdown and then get a margin call from your broker.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1