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

[amibroker] Re: simplest way to detect a reversal of direction in an indicator



PureBytes Links

Trading Reference Links

Dave,
your questions are somehow confusing: you wrote, for example, 
for "san diego wave" strategy : 
"...switches long when the MTI  rises by .12"
If the MTI goes like
MTI0
MTI1=MTI0+0.13
MTI2=MTI1+0.15
MTI3=MTI2+0.12
MTI4=MTI3+0.13
ie it increases 4 consequtive bars by >0.12, they go long every day ?
I dont think so and, anyway, it is not a reversal.
You probably mean MTI go lower and lower and, on day0, change 
direction and go higher by >0.12.
If this is requested, you should specify how many descending bars you 
need *before* the change.
Do you need just one ?
Then 
cond=roc(c,1)>0 AND Ref(roc(c,1),-1)<0;
is enough to describe this "reversal".
Equivalent condition would be the
cond1=Ref(c,-1)==LLV(c,3);
Do you need more than one consecutive descending bars before the 
reversal ?
Then
k=4; 
cond=ROC(C,1)>0 AND Ref(Sum(ROC(C,1)<0,k),-1)==k;
would give you the reversal after four *consecutive* descending bars.
Do you need just the previous bar to be the lower of the last k bars ?
Then, 
k=10;
Cond=Ref(C,-1)==LLV(C,k);
would describe that yestedays close was the lowest of the last k 
bars, ie we do have a reversal without asking *all* previous bars to 
be descending.
As you see, there are many alternatives and it would be better to be 
more specific.
Decide first how would you like the reversal and then AFL will solve 
your request in 2 or 102 lines [they will be executed with the same 
speed, in one way or another]
Dimitris Tsokakis
PS1: All above described conditions are realistic, you should avoid 
*ANY* zig/peak/trough functions. 
The known trouble of zig use is simple : You are informed that Day X 
*was* a peak, but this information arrives 2 or 12 or 102 days later 
and it is totally useless for trading. Zig and its derivatives are 
*very* useful for the historical study of an indicator, but totally 
useless for decision making.
PS2. Although it may be obvious, just know that all above conditions 
are equally applied to indicators, not only Close value. Just 
describe how do you like the reversal.

--- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
wrote:
> I've been examining VectorVest's tools for a while now, and I'd say 
that
> while that link tells you some of the party line, that's not the 
whole
> enchilada. once you have a good long/short timing signal, there's a 
pretty
> rich toolkit for stock selection, and a lot of canned and user group
> strategies that I and others have tested and believe can do quite 
well.
> timing's another story. as the tampa group's approach indicates, 
many people
> think you can do better than VV's standard recommendations. some 
people
> include the MTI and other proprietary VV indicators in their overall
> formula, some not.
> 
> anyway, I just used the MTI as an example of the kind of turn 
detection I
> was looking for; I didn't mean to discuss any particular way of 
interpreting
> it as a strategy. the MTI is range-bounded, so crossings of fixed 
levels can
> have meaning. but how do you make use of other indicators that 
aren't
> range-bounded? besides zero crossing or crossing some other 
indicator line,
> another one that occurred to me was this idea of direction 
reversals of some
> particular amount.
> 
> I just need to figure out how to implement it...
> 
> dave
> 
> 
> > Some insight on Vectorvest MTI indicator:
> >
> > http://www.sctxcompclub.org/MtgFollowUp/Jul1_02Invest.html
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
wrote:
> > > one example is the vectorvest-based "san diego wave" strategy, 
which
> > > switches long when the MTI (vectorvest's proprietary Market 
Timing
> > > Indicator) rises by .12, and goes short when it falls by .12.
> > absolute level
> > > doesn't matter, just having reversed direction by that amount. 
(not
> > that I'm
> > > saying that specifically is a great strategy or anything.)
> > >
> > > any indicator could be interpreted this way, and I thought it'd 
be
> > > interesting to see which ones turned out to be useful.
> > >
> > > it's really easy to see these turns visually on a chart. I'm
> > surprised that
> > > it doesn't seem easy to determine them procedurally. I'd have
> > thought tj or
> > > one of the other AFL gurus would have put my feeble brain to 
shame
> > with a 2
> > > line solution by now (;-).
> > >
> > > dave


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/