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

Re: [amibroker] Search to include weekly MACD



PureBytes Links

Trading Reference Links

Thanks Anthony
This would be what you have referenced
***********
weeklyprice=C;
Weekly=ValueWhen(DayOfWeek() > Ref( DayOfWeek(),1),WeeklyPrice);
W6ema = EMA(weekly,30);// 6 weeks * 5 days per week
W13ema = EMA(weekly,65);// 13 weeks * 5 days per week
MACDSignal = EMA((W6ema - W13ema),25);// 5 weeks * 5 days per wee
***********

>From this I have a few questions to help me understand what I am seeing,
if someone can please help a programming newbie.

1. The values of a normal MACD are 26, 12 , 9. This formula appears to
be for half of that at 13, 6, 5. Is there a reason for this, or could I
use the normal periods in weeks converted into days (ie 13*5=65 etc)

2. I cannot understand the valuewhen statement in regard to the
dayfweek()>ref(dayofweek(),1)
Am I wrong in assuming that you want today's dayvalue to be greater than
tomorrows dayvalue. Does that mean that the value would be for Saturday
as its value is 6 and sunday is 0. Without seeming too stupid this gives
the day as Saturday when there is no trading, but it needs to find the
closing price for Saturday. I did put this in to an AFL search and it
seems to work, but I do not understand how or why it works.

3. Also in the valuewhen statement the AB help screen has an additional
part at the end of a number being the x number of previous occurence. eg
'1' is the most recent occurence. Does AB have default value of 1 if it
is omitted?

Thanks in advance
Graham

----- Original Message -----
From: Anthony Faragasso <ajf1111@xxxx>
Date: Wednesday, July 17, 2002 11:40 am
Subject: Re: [amibroker] Search to include weekly MACD

> <html><body>
> 
> 
> <tt>
> Hello,
> 
> 
> 
> In the Amibroker library there is a formula. It is located at:
> 
> 
> 
> http://www.amibroker.com/library/formula.php?id=183
> 
> 
> 
> 
> 
> Anthony
> 
> 
> 
> kaveman_aus wrote:
> 
> 
> 
> 
> 
> 
> 
> &gt; I am trying to create an exploration to include weekly MACD with
> 
> &gt; daily
> 
> &gt; indicators. How can I do this.
> 
> &gt; Sorry if there are already examples of this, have not been 
> able to
> 
> &gt; find them. If there are please direct me towards them.
> 
> &gt; Thanks, Graham
> 
> &gt;
> 
> &gt;
> 
> &gt; Yahoo! Groups Sponsor
> 
> ADVERTISEMENT
> 
> 
> 
> &gt;
> 
> &gt; Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
> Service.
> 
> 
> 
> 
> </tt>
> 
> 
> 
> 
> <!-- |**|begin egp html banner|**| -->
> 
> <table border=0 cellspacing=0 cellpadding=2>
> <tr bgcolor=#FFFFCC>
> <td align=center><font size="-1" color=#003399><b>Yahoo! Groups 
> Sponsor</b></font></td></tr>
> <tr bgcolor=#FFFFFF>
> <td align=center width=470><table border=0 cellpadding=0 
> cellspacing=0><tr><td align=center><font face=arial size=-
> 2>ADVERTISEMENT</font><img 
> src="http://us.a1.yimg.com/us.yimg.co</td></tr></table></td></tr>
> </table>
> 
> <!-- |**|end egp html banner|**| -->
> 
> 
> 
> 
> 
> <tt>Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
> Service.</tt></br>
> 
> </body></html>
> 
> 

----------------
Powered by telstra.com