[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Capital is not a key word?



PureBytes Links

Trading Reference Links

Equity is used in the AFL for capital (account amount)
eg
SetOption("InitialEquity", 5000 );

-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com

On 29/05/07, Keith McCombs <kmccombs@xxxxxxxxxxxx> wrote:
>
>    Clement --
>  I assume you are referring to this code:
>  ============
>  Buy = <your buy formula here>
>
>
> Sell = 0; // selling only by stop
>
> TrailStopAmount = 2 * ATR( 20 );
>  Capital = 100000; /* IMPORTANT: Set it also in the Settings: Initial Equity */
>
> Risk = 0.01*Capital;
>  PositionSize = (Risk/TrailStopAmount)*BuyPrice;
>  ApplyStop( 2, 2, TrailStopAmount, 1 );
>  ==============
>
>
> Capital is NOT a keyword, just a number.  You could have written:
>
> MyWifesMoney = 100000; /* IMPORTANT: Set it also in the Settings: Initial Equity */
>  Risk = 0.01*MyWifesMoney;
>
>
> And it would have worked just as well.
>
>
> Also note the comment starting with /* IMPORTANT
>  You should be setting this in AA->Settings->General
>  Alternatively you could written:
>
>
> MyWifesMoney = 100000;
>  Risk = 0.01*MyWifesMoney;
>  SetOption("InitialEquity", MyWifesMoney);  /* Overrides Initial Equity setting in AA->Settings */
>
>
> BTW, InitialEquity is not a keyword either, just string of characters that SetOption() recognizes.
>   -- Keith
>
>
>  Clement Chin wrote:
>
>
>
>
>
>
> Hi,
>
>
>
> From a help topic, Back-testing your trading ideas, it seems to me that Capital is a key word.
>
>
>
> When I enter it in AB, it is not shown in bold characters. Is it a key word to set the initial risk capital?
>
>
>
> TIA.
>
>
>
> Clement
>


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/