[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

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___