PureBytes Links
Trading Reference Links
|
Ed - I use Ehler's SafeZone Stop... here's my stop stuff. This works
for me:
----------------------------------------
///////////////////////
// - Position Sizing
// - Stop Setting
///////////////////////
SZLookback = 10;
SZDownMultiple = 2;//Optimize("Multiple", 5.9, 1, 7, 1);
SZDownPenetration = IIf( Ref(L, -1) > L, Ref(L, -1) - L, 0);
SZDownSum = Sum(SZDownPenetration, SZLookback);
SZDownPenetrationFlag = IIf( SZDownPenetration != 0, 1, 0);
SZDownNumber = Sum(SZDownPenetrationFlag, SZLookback);
SZDownAverage = SZDownSum/SZDownNumber;
SZStop = Ref(L,-1) - SZDownMultiple * Ref(SZDownAverage, -1);
// Determine # of Shares to buy
RiskAmount = Equity() * 0.01;
NumShares = IIf(C-SzStop>1, int(RiskAmount / (C - SZStop)), Equity()/
(3*C));
PositionSize = NumShares * C;
-----------------------------------------
--- In amibroker@xxxxxxxxxxxxxxx, "ed nl" <ed2000nl@xxxx> wrote:
> Al,
>
> but how do you implement the risk factor now?
>
> ed
> ----- Original Message -----
> From: Al Venosa
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Friday, December 10, 2004 5:32 PM
> Subject: Re: [amibroker] PositionSize / Capital
>
>
> Use -1 without the Capital rather than 0.01:
>
> Positionsize = -1*BuyPrice/TrailStopAmount;
>
> ed nl wrote:
> hello,
>
> I found this question has been asked before but I couldn't find
the answer.
> If one tries to use moneymanagement techniques I find the
following example
> in the manual:
>
> 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 );
>
> However, in this example the Capital will be constant
throughout the
> backtest. I need to use the Capital value of my portfolio as
it progresses
> through time. What can I use?
>
> thanks
>
> rgds, Ed
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
>
> --------------------------------------------------------------------
----------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
>
> b.. To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
------------------------ Yahoo! Groups Sponsor --------------------~-->
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|