PureBytes Links
Trading Reference Links
|
Oops,
guess I was being dyslexic or something, you're right. Funny Joe didn't say
so; trying not to show me up I suppose (;-).
<SPAN
class=825250912-30122003>
So the
answer is as simple as:
<SPAN
class=825250912-30122003>
ma_shifted = Ref(ma_original,
-4);
<SPAN
class=825250912-30122003>
<SPAN
class=825250912-30122003>Dave
<BLOCKQUOTE
>
<FONT face=Tahoma
size=2>-----Original Message-----From: harveyhp
[mailto:harveyhp@xxxxxxx]Sent: Tuesday, December 30, 2003 1:26
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker]
Shifting MA's
As I read the original message he is talking
about a RIGHT-shifted moving average. Several programs do this, eg
Profitunity. They are not looking into the future, they just want the MA
from N bars ago plotted under the current bar. A left-shifted MA would
be looking into the future and would probably require additional equipment,
such as a crystral ball.
HHP
=============
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Dave Merrill
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: 29 December, 2003 8:49 PM
Subject: RE: [amibroker] Shifting
MA's
<SPAN
class=026461604-30122003>Joe, please excuse if I'm over-whacking the obvious
here, but I think you said you were new to AB, so I wanted to make sure you
understood some important basics.
<SPAN
class=026461604-30122003>
<SPAN
class=026461604-30122003>Just because you can write a formula that directly
refers to future data doesn't mean that that's a valid thing to do. The most
obvious example, Ref(array, offset) can take a negative offset, meaning
the number of bars BACK to look, or a positive offset, meaning the
number of bars IN THE FUTURE to look. While there are situations where it
may make sense to do that (pattern analysis etc), obviously you can't trade
signals based on future data, because as good as AB is, the future bars it
would have to look at don't exist yet today, which is when you need the
signal. Systems that peek into the future can backtest amazingly well (see
the Zig function), but can't be traded in real life; it'd be like looking
past the right edge of the chart. There are a bunch of ways to reference
future data in AB, and it's mostly up to you do understand how your formulas
work and avoid it. The Check btn in the backtester will try to warn you, if
it can tell, but understanding is your real tool here.
<SPAN
class=026461604-30122003>
<SPAN
class=026461604-30122003>Directly referencing future data is fundamentally
different from extrapolating an estimate of it, which at the root of it is
what we're all trying to do -- guess the future by looking at the past. As
long as you don't actually read data from future bars to generate today's
indicators, any way you can think of to make today's decisions is ok. As to
how you might do that, well, that's trading system design
(;-).
<SPAN
class=026461604-30122003>
<SPAN
class=026461604-30122003>I'm probably going on and on here explaining the
painfully obvious. The point is just that until you're really confident of
your AFL skills and fully understand the limited situations when it's ok,
I'd strongly suggest not referencing future data, ever.
<SPAN
class=026461604-30122003>
<SPAN
class=026461604-30122003>Make sense?
<SPAN
class=026461604-30122003>
<SPAN
class=026461604-30122003>Dave
<BLOCKQUOTE
>
Dave..
It's certainly interesting that you can write
code for projecting MA's ahead of current price bars....into the future so
to speak.
That makes me think that you might be
able to also project other data into the future as well. What I have in
mind specifically is price data and my interest arises from the fact
that the "projection of price data" into the future and the manipulations
that can be done with it, account in large measure for the development of
Jim Hurst's "Cycle Analysis Program".
Jim Hurst is regarded by many to be the
father of cyclic analysis.
Maybe I could use an example to more clearly
show what I'm driving at.
Suppose you had a printed copy of a daily
chart of say the Nasdaq.....could be anything actually. Then you take an
ordinary drafting room "bow compass" and adjust the points (needle point
on one end and pencil point on the other end) to say 40 days.
Then with the needle point of the compass you
trace over the current price bar centers starting with the last
bar and working backward....simple enough and by keeping the two compass
points horizontal as you trace over the price data with the needle point
you also leave a "line trail" that's made by the pencil
point.
That trail is, in effect, a
projection of current daily prices 40 days into the future and
that's what I would like to be able to
convince the computer to do.
It was not unusual in Hurst's program for
several price projections, of different lengths, to be drawn and shown
together in what he called "cascading patterns".
He called the projections FLD LINES for
"future lines of demarcation" and were the foundation of most of his
work.
His program was detailed in 10, elaborately
done, lessons which could only be described as a labor of
love.
I frequently use the bow compass projection
routine but it would be great if there were AB code available that could
do the job.
Does it sound possible?
thanks for listening,
...........Joe Platt
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Dave
Merrill
To: <A
title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Monday, December 29, 2003
11:10 AM
Subject: RE: [amibroker] Shifting
MA's
<SPAN
class=021230616-29122003>ma_shifted = Ref(ma_original,
4);
<SPAN
class=021230616-29122003>
<SPAN
class=021230616-29122003>I'm probably misunderstanding what you're
trying to do, but that makes the average appear 4 bars before the data
from which it was created, looking into the future. Not a tradable
design.
<SPAN
class=021230616-29122003>
<SPAN
class=021230616-29122003>Dave
<BLOCKQUOTE
>How
can I shift a moving average horizontally to the right? I am
trying to move the moving average of the close 4 bars to the
right.Thanks in
advance.BillSend
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page:
<A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
To visit your group on the web, go to:<A
href="">http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:<A
href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Send BUG REPORTS to
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
To visit your group on the web, go to:<A
href="">http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:<A
href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
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 the Yahoo! Terms of Service.
|