StockFetcher Forums · General Discussion · Help writing count function<< >>Post Follow-up
tradewind
4 posts
msg #58239
Ignore tradewind
12/17/2007 6:59:01 PM

Can someone explain to me why the following line of code does not work.

set {Var4, count (ADX(14) above 25, 1)}

Whenever I put this line of code in, the whole filter bombs.
This line of code is supposed to set Var4 to 1 if ADX(14) is greater than 25, otherwise Var4 is 0. This is part of a logical OR construct.
How should this idea be written?

TheRumpledOne
6,411 posts
msg #58240
Ignore TheRumpledOne
modified
12/17/2007 7:06:53 PM

Fetcher[
set{ var4, count(ADX(14) above 25, 1)}

var4 equal 1
]



Careful with your spaces.

tradewind
4 posts
msg #58271
Ignore tradewind
12/18/2007 5:24:38 PM

Thanks TRO
that fixed the problem. Thank you also for the caution about spaces which was causing problems as well.

StockFetcher Forums · General Discussion · Help writing count function<< >>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.