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

[EquisMetaStock Group] Finding future events



PureBytes Links

Trading Reference Links

Hello,

I´d like to calculete the value of MACD by signal for determined price. e.g.

open 		low 		hight 	close 	mac
...		...		...		...		...
1,00		0,90		1,10		1,09		1,324
1,10		1,10		1,14		1,14		2,356
1,13		1,10		1,13		1,11		2,364

If I believe that next close price i´ll be 1,00. How i calculete the new
MACD ?

Regards


-----Mensagem original-----
De: Roy [mailto:rlarsen@xxxxxxxxxxxxxx]
Enviada em: quinta-feira, 29 de maio de 2003 23:20
Para: equismetastock@xxxxxxxxxxxxxxx
Assunto: Re: [EquisMetaStock Group] Finding future events


Preston

It seems that the formula below for predicting the closing price 
needed for the signal line to cross the MACD is not as accurate as 
it could be. The reason, at least with my version of MS (7.03), is 
that the MACD in MetaStock is based on EMA's that are slightly off 
the assumed 12/26 periods. The MACD EMA's are calculated using 
proportions of 0.075 and 0.15 instead of 2/13 and 2/27. The latter 
is what the code you posted uses for the 'top' variable, hence the 
small errors that occur when tested against the MS canned MACD.

I've taken the liberty of revamping the code so that the predictive 
prices work for my version of MS.

Roy

  {MACD MS Look Ahead}
x:=0.15; y:=0.075;
a:=If(Cum(1)=1,C,PREV*(1-x)+C*x);
b:=If(Cum(1)=1,C,PREV*(1-y)+C*y);
a:=a*(1-x); b:=b*(1-y); top:=b-a;
  {C required for signal/MACD crossover}
(Mov(MACD(),9,E)+top)/(x-y);



--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxxx> wrote:
> This is from another group. See if it gives you any ideas.
> 
> Preston
> 
> a user asked if the tommorows close could calculated which would 
> cause the MACD to cross the 0 line, or the trigger line.  we 
worked 
> it out and got:
> 
> a:=12;b:=26;x:=2/(1+a);y:=2/(1+b);
> top:=Mov(C,b,E)*(1-y)-Mov(C,a,E)*(1-x);
> 
> {C required for trigger line crossover}
> (Mov(MACD(),9,E)+top)/(x-y);
> 
> {C required for 0 value MACD}
> top/(x-y)
> 
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "will65shak" <nexus42@xxxx> 
> wrote:
> > > to point out that a little lateral thinking goes a long way
> > 
> > I'm almost horizontal, and I _still_ don't get it!-)
> > 
> > I'm sure I'm missing something obvious, but:
> > 
> > I'm not calculating the distance between two events, but instead 
> > from the _current bar_ until the next event. Knowing this 
distance, 
> > I then plan to calculate & plot a value _at each_ current bar, 
and 
> > this value will change for every bar since distance (and price) 
> > changes at each bar. If I 'wait' with the calculation until the 
> next 
> > event, I can only plot a value at that event, but not at the 
dozens 
> > of bars between events. 
> > 
> > Is this even possible in MS? Or is it just impossible to make me 
> get 
> > it?-)
> > 
> >     Cheers!Kristian
> > 
> > 
> > > How to create a BarsFuture(), i.e. a BarsSince() that finds 
the 
> > next true bar instead of the last true bar?



To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

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


Esta mensagem, incluindo seus anexos, pode conter informações privilegiadas
e/ou de caráter confidencial, não podendo ser retransmitida sem autorização
do remetente. Se você não é o destinatário ou pessoa autorizada a recebê-la,
informamos que o seu uso, divulgação, cópia ou arquivamento são proibidos.
Portanto, se você recebeu esta mensagem por engano, por favor, nos informe
respondendo imediatamente a este e-mail e em seguida apague-a.

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

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