All these "explanations" below are wrong.
When everything fails - read the manual.
This "MarginRequirement" setting is the property of the
BROKERAGE ACCOUNT -
account margin (not position margin). It decides how
much borrowed funds can be used.
US regulations allow 50% margin ONLY.
When account margin is set to 50% it allows position sizes
of upto 200% of your cash.
It does NOT involve deposits.
This is for STOCKS, not for futures.
This is completely different from futures-like margins and
other leveraged instruments.
You should read the manual about futures
margins:
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Tuesday, May 01, 2007 1:09
PM
Subject: RE: [amibroker] Re: Account
Margin
Hi Bernard,
try the following. As I understand position sizing, when you
set position size it is setting the actual postion bought, so a $1000
deposit on 10 % margin will be a position size of $10000. It also
depends if you meant actual risk per trade or you meant a deposit of $1000
per trade (this is also called fixed position size).
For fixed position size, this is simply as follows ( I like to set
everything in my code rather than using the tester).
Capital = 10000; // Initial Capital $10,000
Margin = 10; // Margin 10 % CFDs
// Position
Sizing
PercentCapitalpertrade = 10; // ie
$1000 out of a $10K account
PositionSize = Capital *
PercentCapitalPerTrade / Margin;
// Initial
Trade Parameters
SetOption("InitialEquity", Capital );
SetOption("MarginRequirement", Margin); // CFD trading
requiring 10 % margin
Alternatively you can just set PositionSize =10000; // ie
$1000 deposit on 10 % margin
For $1000 risk, you need to set the risk according to the stop
value. Check the user manual for this full explanation of
this.
Positionsize =
-2*BuyPrice/(StopDelta);
Cheers, Dave
etc....
David
Further to my earlier post - if I can't use "positionsize =
-10",
how do I go about saying therefore that I have a starting
equity of
say, $10,000, with purchasing power of $100,000 (account
margin of
10) but I only want to risk $1,000 per
trade?
Bernard
--- In amibroker@xxxxxxxxxps.com,
"David Smith" <david.smith5@...>
wrote:
>
>
Have you overriden the margin settings in your code & set to 100,
or perhaps
> set PositionSize in code to a fixed value. This
would cause this
to occur.
>
>
> -----Original
Message-----
> From: amibroker@xxxxxxxxxps.com
[mailto:amibroker@xxxxxxxxxps.com]
On Behalf
> Of bernardedmond01
> Sent: Monday, 30 April
2007 9:56 PM
> To: amibroker@xxxxxxxxxps.com
>
Subject: [amibroker] Account Margin
>
>
>
>
Hi All
> Why is that when I change my account margin setting (e.g.
from 100
to
> 10) it does not change/affect my position size?
I have read
through the
> manual and searched on here for any
clues but I can't find what
I'm
> doing wrong. Any
ideas?
>
Cheers
>