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

Notification

Icon
Error

Options
Go to last post Go to first unread
kaushik1  
#1 Posted : Thursday, May 3, 2012 3:35:32 AM(UTC)
kaushik1

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/11/2012(UTC)
Posts: 45

Hello friends, I am new user of metastocks. I am looking to write a bar value(close),Date since cross(mov(c,5,e),mov(c,13,e)). also want to count a bar since cross(mov(c,5,e),mov(c,13,e)) to today's close... please help me out,, thanks in advance
wabbit  
#2 Posted : Thursday, May 3, 2012 3:42:07 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
RTFM: WriteVal() and BarsSince()

As for the dates, you're going to need, ValueWhen(), DayOfMonth(), Month() and Year()


wabbit [:D]

kaushik1  
#3 Posted : Thursday, May 3, 2012 4:14:58 AM(UTC)
kaushik1

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/11/2012(UTC)
Posts: 45

can you please make it for me..?? I want the closing price when mov(c,5,e) cross mov(c,13,e) thanks dear
wabbit  
#4 Posted : Thursday, May 3, 2012 4:28:11 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
kaushik1 wrote:
can you please make it for me..?? I want the closing price when mov(c,5,e) cross mov(c,13,e) thanks dear


No. Make a genuine attempt yourself, and people will HELP you.

"There are no slaves here; either learn to do it yourself or pay someone to do it for you."

"Give a man a fish and he eats today; teach a man to fish an he eats everyday."



wabbit [:D]

kaushik1  
#5 Posted : Thursday, May 3, 2012 4:43:18 AM(UTC)
kaushik1

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/11/2012(UTC)
Posts: 45

oki thanks .. i had done . but .. not able to plot a date.... so still doing exparimant thanks
jjstein  
#6 Posted : Thursday, May 3, 2012 8:49:20 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
kaushik1 wrote:
Hello friends, I am new user of metastocks. I am looking to write a bar value(close),Date since cross(mov(c,5,e),mov(c,13,e)). also want to count a bar since cross(mov(c,5,e),mov(c,13,e)) to today's close... please help me out,, thanks in advance


kaushik1 wrote:
can you please make it for me..?? I want the closing price when mov(c,5,e) cross mov(c,13,e) thanks dear


kaushik1 wrote:
oki thanks .. i had done . but .. not able to plot a date.... so still doing exparimant thanks


Kaushik -- You need to get used to "thinking in MetaStock" -- there are some very flexible/powerful functions, you just need to carefully define exactly what you want to do.

You will probably need just the "ValueWhen()" function, mainly. If you look it up in HELP, it shows:

SYNTAX: valuewhen ( Nth, EXPRESSION, DATA ARRAY )

In your case, Nth would be the most recent occurance: 1.

The EXPRESSION would be your condition, "cross(mov(c,5,e),mov(c,13,e))".

The DATA ARRAY you asked for is the CLOSE.

The other function you want is "BarsSince()". Use that with the EXPRESSION to get a count.

You can use these functions in formulas for Indicators, then call that Indicator name in other places within MetaStock, like Charts, Explorations, Expert Commentary, Symbols, Highlights, etc,

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.