Discussions
»
Product and Service Development
»
Formula Assistance
»
How to assign a character value in a DATA ARRAY parameter
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.
|
|
|
|
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
|
1 user thanked MS Support for this useful post.
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 12/15/2011(UTC) Posts: 3
Thanks: 1 times
|
|
|
|
|
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)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
How to assign a character value in a DATA ARRAY parameter
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.