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

Notification

Icon
Error

Options
Go to last post Go to first unread
supchart  
#1 Posted : Sunday, November 29, 2015 6:00:11 PM(UTC)
supchart

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 12/15/2011(UTC)
Posts: 3

Thanks: 1 times

Its simple task, if true write "Below" and if false write "Above"

I wrote a command in a column name title "MACD<0"

if(MACD()<0,"BELOW","ABOVE")

but received error "the text that begins with this quote is not being used in a valid location"

How to proceed ?

2. Is there a function that can capture computer system date ?. I want to filter/compare the stock record date with the computer date. What I wrote ;

 (year()=2015) and (month()=11) and (dayofmonth()=30)

{to filter delisted stock, only take stock as at current date 30/11/2015 }

 

Tq.

MS Support  
#2 Posted : Tuesday, December 1, 2015 3:46:44 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
Hi,

There is not a way to output a character/string value, you can use variables which can call other numerical values, or you can use values directly, i.e. 1,0 without quotation marks.

The MetaStock formula language works off of the X-Axis properties and does not have any direct way to interact with your system date/time properties.

 

The following FAQ details a method that can be used to filter securities that are no longer trading:

 

https://www.metastock.com/Customer/Support/KB/faq.aspx?fc=137&rf=137&js=0

Edited by user Tuesday, December 1, 2015 3:49:48 PM(UTC)  | Reason: Not specified

thanks 1 user thanked MS Support for this useful post.
supchart on 12/2/2015(UTC)
supchart  
#3 Posted : Wednesday, December 2, 2015 7:48:21 PM(UTC)
supchart

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 12/15/2011(UTC)
Posts: 3

Thanks: 1 times
Thanks, its clear now..
MS Support  
#4 Posted : Wednesday, December 2, 2015 8:13:10 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
You can nest multiple IF statements and also control the numeric outputs. For example, if you wanted a +1 when MACD is above 0 and a -1 when MACD is below 0, you could write: If(MACD()>0,1,If(MACD()<0,-1,0))
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.