logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Bullstock  
#1 Posted : Thursday, January 10, 2008 5:05:41 AM(UTC)
Bullstock

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/28/2006(UTC)
Posts: 32

Hi,

I would like to have a code to count on the number of bars for the intraday, say 1 for the first intraday bar and then add up as more bars displayed. It resets to one on the coming first intraday bar tomorrow.

How can I do code it?

Bullstock

mstt  
#2 Posted : Sunday, January 13, 2008 1:46:18 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)

Hi Bullstock

This indicator should do what you want. You will need to install the Forum DLL from the Files section for this formula to function. Depending on the name you assign to the DLL you might need to change the ExtFml() function to match. I've used the Forum DLL to eliminate a leading N/A bar, which then allows an accurate bar count to be calculated for the first day. Hope this helps.

{Intraday Bar Counter}

D:=DayOfMonth();

FirstBar:=Cum(1)=1;

NewDay:=ExtFml("Forum.Sum",D<>Ref(D,-1),1);

1 + BarsSince(FirstBar OR NewDay);

Roy

MetaStock Tips & Tools
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.