Tomasz, thank you that is great. If I can just confirm I am using this correctly I got an error in the format due to the function was missing the in percent of equity so it should read SetPositionSize( IIF( index < MA( index, 50 ), 12.5, 25 ),2); correct?
Thanks DM --- In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]> wrote: > > Yes, > > index = Foreign("!NDX", "C"); > > Assumming you have 4 open positions (25 of equity) > > SetPositionSize( IIF( index < MA( index, 50 ), 12.5, 25 ); // use 12.5% of equity if market is below 50 day average, otherwise 25% > > Best regards, > Tomasz Janeczko > amibroker.com > ----- Original Message ----- > From: "dmcleod1981" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Wednesday, February 13, 2008 3:10 AM > Subject: [amibroker] Rotational Trading - Questions > > > > In a rotational trading system is there a way to cut position sizes > > down if a certain condition is true. A simple example can you cut the > > position size in half if the market is under its 50 day moving > > average? I tried using an iif statement but couldn't get it to work. > > > > Also, I have been searching the archives for a post that described how > > to combine the signals of different systems into one then back test > > that as a single portfolio. If anyone remembers the thread name or has > > that thread marked I would love to review that information. > > > > Thanks > > DM > > > > > > > > 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 > > > > > > >
