StockFetcher Forums · General Discussion · price line<< >>Post Follow-up
fokane
74 posts
msg #58948
Ignore fokane
1/13/2008 9:22:51 AM

Fetcher[
apply symlist(ADVS)
and draw price line at close
]


See this example above which draws a horizontal line at the last close value. Is it possible to get this value into a variable so that the count() function can be used with it?
At the moment when I use close in the count() function it uses each days' close rather than the last close value.
There is a function in Metastock called lastvalue() which I think does what I want.


nikoschopen
2,824 posts
msg #58953
Ignore nikoschopen
1/13/2008 2:50:35 PM

Count() function merely "adds" the number of conditionals that evaluates as either TRUE or FALSE. Hence, it will spit out either 1 or 0 as its value depending on the parameter used for the period. The following example will show either 1 or 0 in the "cl" column.

Fetcher[
apply symlist(ADVS)
set{cl, count(close above open,1)}
and draw price line at cl
add column cl
]



On the other hand, a set() statement can be used to assign a given array to a variable.

Fetcher[
apply symlist(ADVS)
set{cl, close}
and draw price line at cl
]



Hope that helps.


StockFetcher Forums · General Discussion · price line<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus