StockFetcher Forums · General Discussion · Syntax question..<< >>Post Follow-up
mktmole
325 posts
msg #108218
Ignore mktmole
9/29/2012 5:07:32 PM

This looks right but comes back with no hits, is there a syntax error that i'm missing?
tks
mm

set{value1,abs(close - cma(close,200)}
set{value2, value1 / Close}
set{value3, value2 * 100)
and value3 above 9.9
and add column value3


four
5,087 posts
msg #108219
Ignore four
modified
9/29/2012 9:13:26 PM

What causes these two filters to return different stocks? Remove "above 9.9" and both return the same stocks =9701.

Fetcher[
set{value1, cma(close,200)} and add column value1
set{value2, close - value1} and add column value2
set{value3, abs(value2)} and add column value3
set{value4, value3 / close} and add column value4
set{value5, value4 * 100}
/*value5 above 9.9*/
and add column value5
]



-OR-

Fetcher[
set{value1, cma(close,200)} and add column value1
set{value2, abs(close - value1)} and add column value2
set{value3, value2 / close} and add column value3
set{value4, value3 * 100}
/*value4 above 9.9*/
and add column value4

]



Kevin_in_GA
4,599 posts
msg #108220
Ignore Kevin_in_GA
9/29/2012 10:00:10 PM

Can the count function go above 100? I think that's as high as it will go - you don't get an error message but it truncates at 100.

mahkoh
1,065 posts
msg #108222
Ignore mahkoh
9/30/2012 5:26:32 PM

Two issues:

Your third filter line:
set{value3, value2 * 100) should end with } instead of )

However, correcting this still doesn't return results

Fetcher[
set{value1,abs(close - cma(close,200)}
set{value2, value1 / Close}
set{value3, value2 * 100}
and value3 above 9.9
and add column value3
]



The second issue is that apparently you cannot use abs(...) on a sum or a subtraction but only on a single number.

Fetcher[
set{value1,close - cma(close,200)}
set{value1b,abs(value1)}
set{value2, value1b / Close}
set{value3, value2 * 100}
and value3 above 9.9
and add column value3
]



mktmole
325 posts
msg #108230
Ignore mktmole
10/1/2012 12:20:39 PM

Four, Kevin, mahkoh... tks kindly for your feedback.

rgds
mm



mktmole
325 posts
msg #108231
Ignore mktmole
10/1/2012 1:06:49 PM

Updated, from SF,

"At this time there is a limitation when using math operations inside of a function, you must use the explicit
phrase for the function (plus, minus, divide, multiply.)
Only direct operations in the "set{}" statements utilize the operation symbols (+,-,/,*).

-----------------------------------
thank you SF for your input.

mm



SAFeTRADE
630 posts
msg #108233
Ignore SAFeTRADE
10/1/2012 3:36:54 PM

This is the correct coding, I think. You needed to put an extra ) in the first line of code at the end of 200).

Fetcher[
set{value1,abs(close minus cma(close,200))}
set{value2, value1 / Close}
set{value3, value2 * 100}
and value3 above 9.9
and add column value3
]



Kevin_in_GA
4,599 posts
msg #108235
Ignore Kevin_in_GA
10/1/2012 4:41:45 PM

"At this time there is a limitation when using math operations inside of a function, you must use the explicit
phrase for the function (plus, minus, divide, multiply.)
Only direct operations in the "set{}" statements utilize the operation symbols (+,-,/,*).


What an odd limitation. Why would the standard mathematical operators not work within a function? Who would have guessed this? I would have thought the opposite was more likely to be the wrong approach.

The SF syntax really needs an overhaul. Ease of use does not have to mean limitations in functionality.

stockfetcher
979 posts
msg #108236
10/1/2012 4:56:34 PM

We agree that this limitation is rather odd; however, it is related to how the StockFetcher syntax is structured.

The basic math operations were included in the based StockFetcher syntax. These were designed to match the "plain-text" syntax of StockFetcher.



The symbol-based math operations were only added/designed with the more advanced "set{}" syntax, that was introduced later.



StockFetcher Support

StockFetcher Forums · General Discussion · Syntax question..<< >>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.