Rank: Member
Groups: Registered, Registered Users Joined: 12/15/2005(UTC) Posts: 13
|
Hi,
How can one know the first bar and last bar from the MS itself. If this is not possible, can we get in in the dll
Thanks
Madhavi Roy
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
I'm not sure about in MetaStock, but if you pass the data to a DLL, the first bar is the first in the array and the last bar is the last in the array.
The array will tell you how many bars it has so you can grab whichever you want.
|
|
|
|
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)
|
Roy
The first bar loaded on a chart or for an exploration or system test can be identified with..
Cum(1)=1;
The last bar loaded on a chart or for an exploration or system test can be identified with..
LastValue(Cum(1))=Cum(1);
Variations on these expressions can identify almost any numbered bar you care to find.
{Bar Count}
Cum(1);
{Bar Count Reversed}
LastValue(Cum(1))-Cum(1);
Roy
MetaStock Tips & Tools
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey roymadhavi.... your question can be taken several ways..... so let me throw this in also.... right click on the dates on the botom of the chart.... choose x axis properties.... the dates , first, last, displayed and loaded will be shown.... my charts are loaded maxed out so it should always show the first and last bars available .....h
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 12/15/2005(UTC) Posts: 13
|
Hi All,
Thanks for the info...
Madhavi Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 12/15/2005(UTC) Posts: 13
|
Hi Roy,
Can this be used with the Expert Advisor also??
Thanks
Madhavi Roy
|
|
|
|
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 Roy
Yes. Most functiions and expressions are completely interchangable between different MS tools. There are only about 6 exceptions that I can think of, and no tool has more than two unique functions. For example, Input() is unique to the Indicator Builder.
Roy
MetaStock Tips & Tools
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 12/15/2005(UTC) Posts: 13
|
|
|
|
|
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.