StockFetcher Forums · Filter Exchange · Finding difference between MAs<< >>Post Follow-up
siliconhippy
37 posts
msg #34243
Ignore siliconhippy
12/6/2004 10:30:11 PM

I would like to use an ma difference in my filters...but get errors below:

set{maDiff, ma(10)-ma(50)}
maDiff has been increasing for the last 2 weeks

Also can I use ema instead of ma?

siliconhippy


yepher
353 posts
msg #34244
Ignore yepher
12/6/2004 11:16:54 PM

siliconhippy,

Sometimes you have to use "minus" instead of "-" to do subtraction. I am not sure why that is. I have also noticed that you can sometimes do more "set" operations by playing with "-" and "minus".

Fetcher[

set{maDiff, ma(10) minus ma(50)}
maDiff has been increasing for the last 2 weeks

and price above 1
and add column maDiff
and add column ma(50)
and add column ma(10)
and sort column 5 descending
]




Just a thought but another way you could write the same filter is:

Fetcher[

ma(10)minus ma(50) has been increasing for 2 weeks
and price above 1

]




siliconhippy
37 posts
msg #34245
Ignore siliconhippy
12/6/2004 11:22:37 PM

Thanks. Will try...


cegis
235 posts
msg #34251
Ignore cegis
12/7/2004 3:18:09 PM

siliconhippy,

Just as another thought (which may help in the futire), you may need spaces around your minus sign. It doesn't look like there are any.

HTH,

C


siliconhippy
37 posts
msg #34261
Ignore siliconhippy
12/7/2004 11:12:41 PM

cegis,

Sure. Got the same feedback from TomB. Now just wondering why they haven't rectified such an obviously discomforting bug so far...

siliconhippy


cegis
235 posts
msg #34269
Ignore cegis
12/8/2004 3:56:25 PM

siliconhippy,

Not sure I'd call it a bug... It is pretty much "standard practice" with computers to use a space to delimit (separate) individual "words with meaning". By using space, it allows you to use variable names with a dash. I don't know if SF allows it, but you might be able to do something like set{my-vol, volume 30 day low}. Here, I wouldn't want to subtract...

HTH


siliconhippy
37 posts
msg #34281
Ignore siliconhippy
12/8/2004 11:05:45 PM

cegis,

I see what you mean. But SF should make a note of it in description of the set command. Sometimes small things like these become big hurdles: after all SF is useful because it does not require programming experience like other advanced packages !

siliconhippy


cegis
235 posts
msg #34289
Ignore cegis
12/9/2004 10:56:58 AM

no arguement there!

Hey, yepher. How 'bout adding it to your documentation??

C


StockFetcher Forums · Filter Exchange · Finding difference between MAs<< >>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