MessageHello,

You don't need to set for every stock. Just add single line to your formula
MarginDeposit = -10;

And it will work for all symbols under test.

Yes account manager is going to be updated with margin and other features.

Best regards,
Tomasz Janeczko
amibroker.com
  ----- Original Message ----- 
  From: David Smith 
  To: [email protected] 
  Sent: Tuesday, May 01, 2007 3:34 PM
  Subject: RE: [amibroker] Re: Account Margin


  Thanks Tomasz, I will try the future approach again & compare.  I did like 
using the margin approach, its quite simple.  I had read the manual carefully 
and thought that using the margin setting was appropriate for CFD's.  I checked 
thru the trade database & was happy with the position size & trade log so have 
continued using that method.  I found that it gives me the correct position 
sizing as long as I set the position size correctly as it references position 
value not the capital outlay.  CFD's seem pretty much the same at the 50% 
margin accounts in the US, just the margin is lower.  

  Just reading the futures method again, this would mean for every stock I am 
using I would need to set the margin of -10 %, but I suppose the 
'margindeposit' function is global yes?

  Anyway, I really didn't want to give someone the wrong advice, thanks for 
describing the alternatives.

  As an aside, then, CFD's have another feature, that interest is charge on 
long positions, & credited (at a lower rate of course) on short positions.  
Would you consider adding this function in the future.  Also will the account 
manager be able to handle margin in the future?

  Cheers, Dave

    -----Original Message-----
    From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
Tomasz Janeczko
    Sent: Tuesday, 1 May 2007 11:09 PM
    To: [email protected]
    Subject: Re: [amibroker] Re: Account Margin



    Hello,

    The idea behind CFD is very similar to futures, forex and other leveraged 
instruments.
    Therefore personally I would use futures mode and
    MarginDeposit = -10 
    (negative deposit represents percentage). 

    But you are of course free to use account margin if you like it better.

    Best regards,
    Tomasz Janeczko
    amibroker.com
      ----- Original Message ----- 
      From: David Smith 
      To: [email protected] 
      Sent: Tuesday, May 01, 2007 2:48 PM
      Subject: RE: [amibroker] Re: Account Margin


      Hi Tomasz.  I am using the margin setting for CFD trading of stocks on 
the ASX Australian market which allow 10% margin trading.  I did not mean to 
use it as a deposit function like futures, perhaps I have used the wrong 
terminology.  For CFD's on 10 % margin, I can put up $1000 for a position size 
of $10,000.  I thought that was how I should use the margin setting at 10 %, 
then all calls to position size have to refer to the cash*leverage.  Have I 
used the margin function incorrectly for this?

      Cheers, David


        -----Original Message-----
        From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
Tomasz Janeczko
        Sent: Tuesday, 1 May 2007 10:34 PM
        To: [email protected]
        Subject: Re: [amibroker] Re: Account Margin



        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:

        http://www.amibroker.com/guide/h_futbacktest.html

        Best regards,
        Tomasz Janeczko
        amibroker.com
          ----- Original Message ----- 
          From: David Smith 
          To: [email protected] 
          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....


            -----Original Message-----
            From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf 
Of bernardedmond01
            Sent: Tuesday, 1 May 2007 11:12 AM
            To: [email protected]
            Subject: [amibroker] Re: Account Margin


            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 [email protected], "David Smith" <[EMAIL PROTECTED]> 
            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: [email protected] [mailto:[EMAIL PROTECTED] 
            On Behalf
            > Of bernardedmond01
            > Sent: Monday, 30 April 2007 9:56 PM
            > To: [email protected]
            > 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
            >





   

Reply via email to