StockFetcher Forums · General Discussion · Filter grammar help wanted<< 1 2 >>Post Follow-up
lkustb
6 posts
msg #140950
Ignore lkustb
1/13/2018 2:53:26 PM

Hello Everyone,

I want to use the following filter, but when it's run, the "undefined" error shows up for the last line, can anyone help me to see how to make it work?
======Begin=====
set{YS1, 0.25 times high+0.25 times low+0.5 times close}
set{RK3,EMA(YS1,10)}
set{RK4,cstddev(YS1,10)}
set{RK51,100 / RK4}
set{RK52,YS1-RK3 }
set{RK5,RK51 * RK52}
set{RK6,EMA(RK5,5)}
set{RK7,EMA(RK6,10)}
set{zhan,EMA(RK6,10)+100/2-5}
set{xdie,EMA(zhan,4)}

show stocks where zhan crossed above xdie
=====End=========
Thank you!

four
5,087 posts
msg #140951
Ignore four
1/13/2018 3:11:08 PM

You must breakup the multiple items in your SET statements.
StockFetcher allows one "thing" per SET...

For example... Here you are asking for more than one calculation and StockFetcher doesn't understand.

set{YS1, 0.25 times high+0.25 times low+0.5 times close}

lkustb
6 posts
msg #140956
Ignore lkustb
1/13/2018 4:15:09 PM

Thank you for the advice, four! I changed to the following, but still not able to get the result, can you see what the problem is now?
===============================
set{YS11, 0.25 * high}
set{YS12, 0.25 * low}
set{YS13, 0.5 * close}
set{YS1_1, YS11 + YS12}
set{YS1, YS1_1 + YS13}

set{RK3,EMA(YS1,10)}
set{RK4,cstddev(YS1,10)}
set{RK51,100 / RK4}
set{RK52,YS1-RK3 }
set{RK5,RK51 * RK52}
set{RK6,EMA(RK5,5)}
set{RK7,EMA(RK6,10)}
set{zhan_1,EMA(RK6,10)}
set{zhan,zhan_1+45}
set{xdie,EMA(zhan,4)}

show stocks where zhan crossed above xdie
===============
Thank you!

four
5,087 posts
msg #140957
Ignore four
1/13/2018 4:36:58 PM

Where did the calculations come from?
Do you have an example of when the cross over has occurred in the last few months or weeks?

graftonian
1,089 posts
msg #140958
Ignore graftonian
modified
1/13/2018 4:50:05 PM

YOU NEED THE CEMA STATEMENT TO FIND CUSTOM EMA ( set{RK6, CEMA(RK5,5)} )
Fetcher[
set{YS11, 0.25 * high}
set{YS12, 0.25 * low}
set{YS13, 0.5 * close}
set{YS1_1, YS11 + YS12}
set{YS1, YS1_1 + YS13}

set{RK3, CEMA(YS1,10)}
set{RK4,cstddev(YS1,10)}
set{RK51,100 / RK4}
set{RK52,YS1-RK3 }
set{RK5,RK51 * RK52}
set{RK6,CEMA(RK5,5)}
set{RK7,CEMA(RK6,10)}
set{zhan_1,CEMA(RK6,10)}
set{zhan,zhan_1+45}
set{xdie,CEMA(zhan,4)}

show stocks where zhan crossed above xdie
]



four
5,087 posts
msg #140959
Ignore four
1/13/2018 4:55:48 PM

thanks GR

--

You may need to change to the advanced plan to run this many SET statements:
https://www.stockfetcher.com/sf/compareplans.php

lkustb
6 posts
msg #140960
Ignore lkustb
1/13/2018 5:09:47 PM

Per Four, yes, I am certain the cross over happens on daily basis.

So, with graftonian's modification, you guys can see some stocks being filtered out? If so, I will consider upgrade. I currently cannot see the result, please let me know that you can see some stocks generated out of it.

Thank you!


four
5,087 posts
msg #140961
Ignore four
1/13/2018 5:21:34 PM

I don't run the advanced subscription.

You could try the advanced subscription and later switch back to the regular subscription if there is no value in your filter. Check with StockFetcher.

nibor100
1,031 posts
msg #140962
Ignore nibor100
1/13/2018 6:05:44 PM

@lkustb,

When I run Graftonian's version I get 685 stocks for the 12th and a little over 500 for the 11th.
Ed S.

lkustb
6 posts
msg #140963
Ignore lkustb
1/13/2018 6:37:52 PM

nibor100, thank you for the feedback! I will think about it then.

StockFetcher Forums · General Discussion · Filter grammar help wanted<< 1 2 >>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.