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

RE: [amibroker] Osaka plugin crash loading saved table with > 128 columns (not an AB bug)


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: RE: [amibroker] Re: Example of buying top N stocks ranked by some metric - no takers?
  • From: "Dave Merrill" <dmerrill@xxxxxxx>
  • Date: Sun, 20 Jun 2004 20:50:31 -0700

PureBytes Links

Trading Reference Links

> -----Original Message-----
> From: Tomasz Janeczko
>
> > It's simple to say, harder to code: Buy the top 20 stocks by
> > turnover (for instance).
> > Hold each one until price falls x% below its highest value since buy.
> > When capital is available, buy as many of the highest rated
> > stocks as you can afford.
>
> The answer:
> PURELY ROTATIONAL MODE. Exactly. Nothing more nothing less.
> http://www.amibroker.com/f?enablerotationaltrading
>
>
> > The exit I'm interested in isn't actually quite that simple, or
> > ApplyStop could do it.
> > But it's similar, in that it needs to know entry date and price.
>
> So TELL ME the STOP you want to use and I will show you how to
> code it using APPLYSTOP and you are done.

Thanks for jumping in here, sorry if I'm missing something obvious.

The stop I'm thinking about (usefulness untested, obviously) has several
features I don't know how to get with ApplyStop:

- When the current bar's price isn't driving the stop higher (for longs),
the stop should rise by itself, at y% per bar, somewhat like SAR stops. The
idea is to avoid sitting in a trading range that isn't making any profit or
hitting stops.
  This is quite doable in an AFL loop; I have it coded, and use it in other
situations. However, it needs to know when and at what price it entered,
which isn't known when our code runs in rotational mode.

- My understanding is that dynamic stop settings (like ATR multiples or
other variable calculations) aren't supported in rotational mode. When I set
the 'volatile' parameter to true in rotational mode, I get this error:
"Variable stops are not supported in Rotational Trading mode".

- The stop should check if the Close is more than x% (or ATR multiple) below
the highest Close since Buy (for longs), and exit at the Open the following
day. This corresponds to the way I typically work, analyzing EOD prices in
the evening, and trading the next morning. Far as I can tell, this isn't
directly supported by ApplyStop.
  In an earlier thread on this, you suggested coding it as a loop (see
above), or importing only CLOSE and OPEN prices  to your database, but I
want high and low prices available for other purposes.
  Ideally, we could specify the prices checked for stop violations
independent of exit price.

Hope that's clear, thanks for your help,

Dave Merrill



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/