PureBytes Links
Trading Reference Links
|
Hi,
Your question has been asked a number of times in the forum. Here is a link to one answer previously posted:
http://finance.groups.yahoo.com/group/amibroker/message/129312
Mike
--- In amibroker@xxxxxxxxxxxxxxx, "Corey Saxe" <cesaxe@xxx> wrote:
>
> Hi Ed,
>
> I don't use MaxOpenPositions because it pertains to open positions in multiple symbols at one time, (Portfolio trading).
> I can set it to 3 and still easily open more than 3 contracts at a time in one symbol, like the old backtester. And that's all I'm trying to do.
> Just increase or decrease the number of contracts to trade in just one symbol, depending on the current equity.
>
> Using:
> Eq = Foreign("~~~EQUITY", "C");
> Does return the correct equity for use in a backtest, but the backtest button has to be pushed twice.
>
> I think that in the end, unless I'm missing something simple, I'll have to manually program separate code to keep track of my equity.
>
> -CS
>
> ----- Original Message -----
> From: Edward Pottasch
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Thursday, May 28, 2009 3:02 AM
> Subject: Re: [amibroker] Using Equity to Compute Position Size
>
>
>
>
>
>
> Hi Corey,
>
> you can use equity but indeed you need one level deeper inside the backtest code. What I do not understand is why MaxPositions does not seem to work on a higher level backtest. Will ask Marcin later.
>
> I will maybe try to code using Equity in the custom backtester later.
>
> But on a higher level in the backtester you need to use PositionSize for reasons Graham gave.
>
> I use Equity on this higher level though. For instance I have written code that takes a profit per day at e.g. 500$, or per trade at e.g. 150$. What I do is that I let the code first calculate the equity without these restrictions and then feed the resulting equity into a procedure that takes the profits. So basicly within 1 AFL code the equity curve is calculated twice.
>
> But I do not see you can use that for your question.
>
> And yes if you use:
>
> PositionSize = -10;
> SetOption("MaxOpenPositions", 3);
> RoundLotSize = 1;
> MarginDeposit = 5000;
> TickSize = 0.25;
> PointValue = 50;
>
> the equity curve should not be able to explode because the MaxOpenPositions is set to 3. But I also see it explode because it takes more than 3 positions as the equity increases. This seems to be wrong. I will ask marcin or TJ.
>
> regards, Ed
>
> Recent Activity
> a.. 38New Members
> b.. 1New Files
> Visit Your Group
> Give Back
> Yahoo! for Good
>
> Get inspired
>
> by a good cause.
>
> Y! Toolbar
> Get it Free!
>
> easy 1-click access
>
> to your groups.
>
> Yahoo! Groups
> Start a group
>
> in 3 easy steps.
>
> Connect with others.
> .
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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/
|