PureBytes Links
Trading Reference Links
|
Hi Reni,
The code draws historical pivots looking back from the current day.
The purpose of the code is to make it easy to write explorations that
find fibonacci time and price pretracements. The code includes arrays
that store the respective highs and lows, as well as on what bar
indexes they occurred. In addition to the fibonacci retracements, you
can also measure "symmetry" using those arrays -- e.g., suppose you
had higher highs and lows, and you were looking at a retracement from
the most recent high pivot. You might be interested that it had
retraced 38% or 50% or whatever of the previous upward thrust. That
wouldn't be enough by itself. A useful qualifier can be that the size
of the retracement, in bars, points, or both, is the same as or close
to the same as the prior retracement. That bolsters the case for a
resumption of the upwards trend. If you add to that a reversal bar on
higher volume, and the low of the reversal touched support, say a
prior break-out area, then it gets even more appealing, etc. All of
those kinds of qualifiers can be easily coded into an exploration.
The notion of symmetry, btw, comes from Derrik Hobbes' book on
fibonacci. The book is very good. In it, he mentions that symmetry is
an edge because there aren't any computer programs out there that
automatically search for it, but we know better <g>. (It's called
AmiBroker.)
On my computer, I put the pivot discovery code in an include file,
and reference the include it at the top of new fibonacci-related
explorations. One I'm eager to try, and I'll pass it on, is Derrik
Hobbes' "Shark attack" -- where an up-leg is 127% of the previous
down leg and represents a new high. Look at SMH (and many others) and
its recent new high -- a perfect shark attack -- and the divergence
in almost any momentum indicator at the same time. A very interesting
setup! It would have allowed for a very low-risk short setup, as a
stop would be just above the peak of the setup.
One important WARNING. Since we're talking explorations, you'll note
that the code includes a check for whether it is running in an
exploration, and if so, discovers pivots working back from the end
date of the exploration date range. What I've discovered, I believe,
is that when an exploration spans a date range, all refernced arrays
are calculated using the end date of the exploration as the last bar
of data. Then, the exploration steps through the arrays starting with
the first bar of the date range, etc. In other words, AB doesn't
appear to start with the first date in the range, calculate all
arrays, apply filter, go to next date in rage, recalculate all
arrays, apply filter, etc. This makes sense. Explorations would be
really slow otherwise. However, that means you can't realy backtest
an exploration like the shark attack over a date range. The pivots
would all be discovered using the last date of the exploration, and
that WOULD be cheating. I emailed Tomasz to ask for clarification --
but I'm pretty sure this is how explorations work. Perhaps Tomasz
would be open to a switch for explorations/backtests that would
instruct them to recalculate everything as successive bar in the date
range is processed. The user would have to understand that would
change the speed of the exploration quite a bit. But for pattern-
based explorations, wouldn't that be cool? What do you think, Tomasz?
Btw, when I posted the code, it asked for name, so I entered it --
mine. Seemed logical at the time <g>. Now I don't know how to change
it to something like "Pivot Discovery", but that's what it is!
Regards,
Gordon
--- In amibroker@xxxxxxxxxxxxxxx, "renilange" <reni.lange@xxxx> wrote:
> I have discovered in the Amibroker Library a long AFL formula
edited
> by Gordon Rose. Somebody could explain me what is the idea behind
> this formula? It gives fantastic results (arrows) but I suppose
they
> are not buy and sell points.
> What do they mean?Perhaps Gordon Rose will see this thread.
>
> Thank you for explanations
> Reni
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/
|