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

[amibroker] Alert Output box question ?



PureBytes Links

Trading Reference Links

Olivier:

I don't know what kind of stops you are using to establish your stop level,
but if it is based on volatility, you could use something like this to limit
your risk to 1% of current equity:

StopPd = Optimize("StopPd",10,1,20,1); //period for ATR
m = Optimize("m",2,0.5,3,0.25); // ATR multiplier
ApplyStop(0, 2, m*ATR(StopPd),1); // max stoploss based on volatility
PSize = -1*C/(m*ATR(StopPd); // positionsize equal to 1% of current equity
PositionSize = Min(PSize,-50);

Hope this helps.

Al Venosa


----- Original Message ----- 
From: "olivier_molongo" <olivier_molongo@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, July 04, 2004 4:22 PM
Subject: [amibroker] Re: Which function gives "current portfolio value"?


> It is because I want to risk a maximum of 1% of my equity on any
> trade. So I need to calculate Position1. I don't always want to
> invest half of my equity.
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "dingo" <dingo@xxxx> wrote:
> > what's wrong with doing it the way the help file says to do it?
> You're
> > making it more complicated than necessary.  Positionsize = -50;
> will take
> > 1/2 of the current equity.
> >
> > d
> >
> >
> >   _____
> >
> > From: olivier_molongo [mailto:olivier_molongo@x...]
> > Sent: Sunday, July 04, 2004 3:36 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Which function gives "current portfolio value"?
> >
> >
> > > Hi,
> > >
> > > How can I get max position to be half of the portfolio value.
> > >
> > > I use the following function:
> > >
> > > Position = Min (Position1,Equity()/2) ;   /* position1 is a
> > > calculated value
> > >
> > > but amibroker will cap my position to half of the "initial"
> > portfolio
> > > value and not the current portfolio value. So if I start with 10
> > 000
> > > in equity and end up with 20 000, I expect to be cap at 10 000
> but
> > > Amibroker will always cap my position at 5 000.
> > >
> > > Is this a bug? How can I get the current portfolio value?
> > >
> > > Regards,
> > > Olivier
> >
> >
> >
> > 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
> >
> >
> <http://us.ard.yahoo.com/SIG=129pk725c/M=295196.4901138.6071305.300117
> 6/D=gr
> >
> oups/S=1705632198:HM/EXP=1089056204/A=2128215/R=0/SIG=10se96mf6/*http:
> //comp
> > anion.yahoo.com> click here
> >
> > <http://us.adserver.yahoo.com/l?
> M=295196.4901138.6071305.3001176/D=groups/S=
> > :HM/A=2128215/rand=301827469>
> >
> >
> >   _____
> >
> > 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
> > <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> >
> >
> > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service
> > <http://docs.yahoo.com/info/terms/> .
>
>
>
>
> 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
>
>
>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.713 / Virus Database: 469 - Release Date: 6/30/2004



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/