| 
 PureBytes Links 
Trading Reference Links 
 | 
maybe this will help
NoUpDays = ValueWhen( Ref(numonth,1) OR BarIndex()==(BarCount-1), 
Sum( Avg>=ddf, BarsSince(numonth)+1 ) ); // looks for when the next
bar is the numonth of the current bar is last of chart and sums the
bars
On 6/20/05, ricko8294_98 <ricko@xxxxxxxxxx> wrote:
> I have been beating my brains out for a couple of days trying to
> solve what seems to be a simple problem.
> 
> I want to build John Clayburg's Market Direction Indicator. But since
> I only have EOD right now, I want to apply it to monthly data for now.
> 
> Here is what I can do
> 
> numonth = Month() != Ref(Month(),-1);  // start of a new month
> nuopen = ValueWhen(numonth,O);  // the Open on the first day each mo.
> nuclose = ValueWhen(numonth,C); // the Close on the first day each mo.
> DDF = (nuopen + nuclose)/2;  // Directional Day Finder
> Plot(DDF,"DDF",colorYellow,1); // plots the DDF
> 
> So far so good.
> Here is what I can't figure out.
> 
> I want to know the number of days [lets call it NoUpDays] in each
> month that the "avg" - [or (H+L+C)/3] is equal to or higher than the
> DDF for that month, and then reset to zero at the start of the next
> month.
> 
> Any help would be most appreciated
> 
> tia
> Rick
> 
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
 
 |