StockFetcher Forums · General Discussion · how to write a IF condition<< >>Post Follow-up
gvphubli
14 posts
msg #112653
Ignore gvphubli
4/5/2013 12:21:23 AM

Hi,

I am looking for a way to have a IF conditions for my filter (its a simple one)

show stocks where
price dropped more than 10% in last 10 days
and index is S&P 500

I want to apply this filter only IF S&P500 is below its MA(100) .

How can I achieve this ?



Kevin_in_GA
4,599 posts
msg #112657
Ignore Kevin_in_GA
4/5/2013 8:28:36 AM

This is less of an "if" condition as it is simply another criterion for entry. Add this line to your filter:

Ind(^spx,close) above cma(ind(^spx,close),100)

Now the filter will only return results if the ^spx is above its 100 day moving average.

gvphubli
14 posts
msg #112675
Ignore gvphubli
4/6/2013 10:32:42 AM

thank you sir !

my intention was to have 2 of those simple conditions within one filters IF for for GT MA(100) and another IF for LT MA(100)..but I can have 2 separate filters altogether.


four
5,087 posts
msg #112679
Ignore four
4/6/2013 9:17:55 PM

http://help.stockfetcher.com/sfhelp/?topicid=100318&qrid=

StockFetcher Forums · General Discussion · how to write a IF condition<< >>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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.