Thanks. That looks like the answer. Happy coincidence that the Beta has just been published!
Steve --- In [email protected], "droskill" <[EMAIL PROTECTED]> wrote: > > Yes, as of beta version 5.11.0, there are new AFL calls: > > http://www.amibroker.com/devlog/wp- content/uploads/2008/06/readme5111.html > > Two cool tools in this release: > > - The ability to have different ranking criteria for longs vs. shorts > > - The ability to determine the number of long and short positions - > read the docs for more info, but here's a summary from the release notes: > > MaxOpenLong - limits the number of LONG positions that can be open > simultaneously > MaxOpenShort - limits the number of SHORT positions that can be open > simultaneously > > Example: > SetOption("MaxOpenPositions", 15 ); > SetOption("MaxOpenLong", 11 ); > SetOption("MaxOpenShort", 7 ); > > --- In [email protected], "steve_almond" <me@> wrote: > > > > Thanks for the clues. > > > > Using a simple PositionScore like: > > C-MA(C,21) > > > > Amibroker automatically chooses long or short irrespsective of > > whether 'Positions' is set to 'Long' or 'Long and Short'. > > > > It rotationally trades depending on the absolute value of the > > PositionScore. So it will close a long position with a current score > > of +0.8 to sell short a position with a score of -0.9. > > > > So far, so excellent. > > > > Currently, 9 of my 10 stocks are below the MA so Amibroker is holding > > all short positions. > > > > Is there a way to insist on, say, 3 long positions (if available) and > > 3 short positions? > > > > > > Steve > > > > > > --- In [email protected], "droskill" <droskill@> wrote: > > > > > > Yes, it is possible - you need to: > > > > > > 1. Make sure, in settings, that you enable both long and short > > trades. > > > 2. Figure out how to apply a negative score to the equities you wish > > > to short. > > > > > > So, you might do it based on distance from the 10 week moving > > average, > > > with those stocks that are below a 10 week moving average having > > > negative scores. > > > > > > --- In [email protected], "steve_almond" <me@> wrote: > > > > > > > > Is it possible to combine long/short in rotational trading? > > > > > > > > Assume a universe of just 10 stocks. > > > > > > > > Case 1: > > > > I want to buy stocks above their 10 week MA and sell short those > > below > > > > their 10 week MA. This may not require rotational trading - just > > > > buy/short? > > > > > > > > Case 2: > > > > I want to buy the 3 stocks most above their 10 week MA and sell > > short > > > > the 3 stocks most below their 10 week MA. > > > > > > > > > > > > > > > > Is it possible? > > > > > > > > Steve > > > > > > > > > >
