StockFetcher Forums · Filter Exchange · How to phrase part of a filter, to add a column for<< >>Post Follow-up
RocketFetcher
58 posts
msg #45751
Ignore RocketFetcher
7/13/2006 8:44:19 AM

I would like to add this to one of my filters; so it will indicate in a column whether or not the close is below the MA(20) - not to make that part of the criteria but rather just to show, for the stocks returned in the filter, this info - ie put a 1 in the column if close is below MA(20) and a 0 in the column if close is above.

Any ideas how to do this?
Thanks!


shelupinin
120 posts
msg #45796
Ignore shelupinin
7/14/2006 12:40:19 AM

Fetcher[set{clma,close - MA(20)}
and add column clma
]


if value is "-" then close below MA(20), if "+" then above

Alex


guru_trader
485 posts
msg #45801
Ignore guru_trader
modified
7/14/2006 5:17:02 AM

Enjoy ...

Fetcher[
set{ma20_minus_close,ma(20) - close}
set{close_below_ma20,count(ma20_minus_close > 0,1)}
and add column close_below_ma20
]



and, for visual verification ...

Fetcher[
set{ma20_minus_close,ma(20) - close}
set{close_below_ma20,count(ma20_minus_close > 0,1)}
and add column close_below_ma20

/* Visual Verification */
and draw ma20_minus_close
and draw close on plot ma20_minus_close
and draw close_below_ma20
]




RocketFetcher
58 posts
msg #45891
Ignore RocketFetcher
7/14/2006 7:57:31 PM

thank you, shel and guru!


guru_trader
485 posts
msg #45911
Ignore guru_trader
7/17/2006 2:55:18 AM

You are welcome!

I added the "line at 0" below

Fetcher[set{ma20_minus_close,ma(20) - close}
set{close_below_ma20,count(ma20_minus_close > 0,1)}
and add column close_below_ma20

/* Visual Verification */
and draw ma20_minus_close
and draw ma20_minus_close line at 0
and draw close on plot ma20_minus_close
and draw close_below_ma20
]




StockFetcher Forums · Filter Exchange · How to phrase part of a filter, to add a column for<< >>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