|
2 registered members (Quad, AndrewAMD),
1,007
guests, and 6
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Understanding Lots, Margin, Capital and Balance
#427506
08/08/13 20:03
08/08/13 20:03
|
Joined: Jul 2013
Posts: 522
dusktrader
OP
User
|
OP
User
Joined: Jul 2013
Posts: 522
|
I'm trying to get a grasp on these controls, so that I can understand how to properly utilize phantom/equity-curve trading. My confusion is regarding Lots and how it interacts with Margin... for example, manual says: Lots Trade volume given by the number of lots per trade (default = 1). One lot is the smallest possible order unit of the account (see remarks). If Margin and/or Risk are used for calculating the trade volume, set Lots at 1. If Lots is 0, no trades are executed. If Lots is negative, trades are executed in phantom mode (see below); they are only simulated, but not sent to the broker. That seems a little contradictory... if I'm setting the Margin (for example, reinvesting based on OptimalF) then wouldn't that imply that Lots are > 1? When equity-curve trading, how do I indicate to Zorro that I want to come out of phantom mode but still honor my Margin setting for the next trade? Does Margin take precedence over Lots?
// equity curve trading: switch to phantom mode when the equity
// curve goes down and is below its own lowpass filtered value
function checkEquity()
{
vars EquityCurve = series(EquityLong+EquityShort);
vars EquityLP = series(LowPass(EquityCurve,10));
if(EquityLP[0] < LowPass(EquityLP,100) && falling(EquityLP))
Lots = -1; // drawdown -> phantom trading
else
Lots = 1; // profitable -> normal trading
}
// reinvest the square root of your profits
checkEquity();
var MarginLong = sqrt(WinLong-LossLong)*OptimalFLong;var MarginShort = sqrt(WinShort-LossShort)*OptimalFShort;
Margin = clamp((MarginLong+MarginShort)/2, 5, 1000);
Will the above example code (from manual) work to put trades in and out of phantom mode and still adjust margin accordingly? Separately, what is the difference between Capital and Balance? THANKS in advance.
|
|
|
Re: Understanding Lots, Margin, Capital and Balance
[Re: jcl]
#427553
08/09/13 11:04
08/09/13 11:04
|
Joined: Apr 2013
Posts: 57
3DCat
Junior Member
|
Junior Member
Joined: Apr 2013
Posts: 57
|
Can you use Risk and Margin at the same time?
Edit: OK, stupid question, since you can move both Sliders in Z-Strategies. But somewhere i read the Sliders are not the same as the Variables
Last edited by 3DCat; 08/09/13 11:39.
|
|
|
|