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

[EquisMetaStock Group] Re: Bar Count since certain date



PureBytes Links

Trading Reference Links

------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.

To reply:  http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=5936
------------------------------------------------------------------------

Hi Spyros! As a beginner with Metastock formula language I 
implemented your suggestion (as an indicator) just to check how it 
worked.

It seems to work fine most of the time, except for a few days at the 
end of each month (try Nov 29 or Nov 30, 2002). How can that be? 
Maybe something related to the '<' sign in the BarsSince condition?

BTW, what is the rationale for the condition 'd<DayOfMonth() AND 
m=Month() AND y=Year()'. Does it mean that BarsSince counts from the 
last time the condition was true?

And why is the assignment 'count:=count + Cum(If(count=0,1,0))' 
necessary?

Thanks a lot. 

=====================================================================

--- In equismetastock@xxxxxxxxxxxxxxx, "SR" <raftsp@xxxx> wrote:
> {BarsSinceDate}
> 
> d:=Input("Day",1,31,1);
> m:=Input("Month",1,12,1);
> y:=Input("Year",1920,2030,2002);
> 
> 
> count:=BarsSince(d<DayOfMonth() AND m=Month() AND y=Year());
> count:=count + Cum(If(count=0,1,0));
> count
> 
> Spyros
> 
> Message: 1
>    Date: Wed, 01 Jan 2003 15:52:35 -0000
>    From: "trend2trader <trend2trader@xxxx>" <trend2trader@xxxx>
> Subject: Bar Count since certain date
> 
> hi list,
> 
> is there a possibility to program an indicator which counts the 
bars 
> since a certain data i.e. how many bars since 1/1/2000?
> 
> thanks in advance
> trend2trader
> 
> 
> 
> _


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/