StockFetcher Forums · General Discussion · Is it possible to measure divergence of indicator lines ?<< >>Post Follow-up
here41trade
4 posts
msg #153702
Ignore here41trade
8/22/2020 6:17:16 PM

No matter what I try I am coming to conclusion this may not be possible. I use the two period Double Stochastic here. I would change the numbers to (3,6) . What I am trying to do is scan for divergence between the %K line and the %D line. So trying to create a scan that would show when these lines were 15 or more apart, no matter if the %K was above or below. Even if I could scan and just say if %K is 15 or more above %D I could still get results across two filter but making the second say below. Stochastic(3,6) %K is 15 or more above %D ? Possible ? Thanks for and ideas

xarlor
581 posts
msg #153704
Ignore xarlor
8/22/2020 9:05:51 PM

Welcome to the forums, here41trade! Hope this helps. Don't forget to drop by every now and again and share any filters you're had good success with.

Fetcher[
set{diff1,Stochastic %K(3,6,3) - Stochastic %D(3,6,3)}
set{diff,abs(diff1)}
diff >= 15

add column Stochastic %K(3,6,3)
add column Stochastic %D(3,6,3)
add column diff
draw Stochastic %K(3,6,3)
draw Stochastic %D(3,6,3)
do not draw diff
sort column 7 ascending
]



here41trade
4 posts
msg #153707
Ignore here41trade
8/23/2020 1:15:28 PM

Hi Xarlor , and thanks for the welcome. Unfortunately the filter did not work at all for me. I even copied it exact and got a syntax Error on every line. Not sure why as it looked like you got scans out of it. Will keep up my pursuit for it though, hopefully someone can help that has done such scans ? Am I doing something wrong ? I will contact support to why it will not run for me, I will update soon ....

nibor100
1,031 posts
msg #153711
Ignore nibor100
8/24/2020 4:30:46 AM

@here41trade,

There is a handy shortcut to running a filter that is posted in the Forums, just click on any part of the blue text of the posted filter and your browser should open up a new window with that filter in it and run it automatically for the latest date that has data.

Then you can compare it to the one you copied and see if there are any differences.

Hope this helps,
Ed S.

here41trade
4 posts
msg #153740
Ignore here41trade
8/25/2020 10:46:37 PM

Nibor and Xarlor, I did hit on the filter and It happily runs for me. Thanks so much, I will build most of my filters around this one as Stochastic is my core indicator. I do not understand the code but can make my way around with the user guide, and now the forum examples. I will have to dig through here and learn some more, thanks again !

nibor100
1,031 posts
msg #153745
Ignore nibor100
8/26/2020 9:35:58 AM

I know some of SF filter code looks like GobblyGook but most of it is fairly straightforward so here is some explanation of Xarlor's filter to speed your learning process along:

In SF the Set command is used to assign a value to a named variable and sometimes SF allows simple math to be done withing the Set statement as can be seen in the 1st line of the filter.

Xarlor is creating the variable Diff1 to a value which is the %D being subtracted from the %K.
His 2nd line is creating the variable Diff to be the Absolute Value of his variable Diff1.
His 3rd line is filtering the SF stock universe down to just those stocks whose value for his Diff variable is greater than or equal to 15.

The add column lines are used to display values and the draw lines are to add more drawings to the standard SF chart display for each stock in the filter results.

Generally when SF uses a variable as a filtering method it will automatically draw that variable in its own subchart, in this case Xarlor is using the Do Not Draw command to have the Diff variable not drawn.

Finally, he is sorting column 7 of the Results output as Ascending which are his Diff variable values.

Hope this helps some,
Ed S.



snappyfrog
721 posts
msg #153746
Ignore snappyfrog
8/26/2020 10:06:51 AM

Welcome here41trade.

On any chart, you can click on "historical" to see each time your setup would pick that stock. This can give you a good visual on tweaks you can implement to make it better.

I like Stochastic also. I'm a big fan of the Stochastic %k(20,20,2) and %k(40,40,4)

here41trade
4 posts
msg #153789
Ignore here41trade
8/28/2020 10:34:01 PM

Thanks Nibor100, I will be working on building on this. I will keep an eye on the forums too and see what else I can discover.
Nice tip Snappyfrog, I did not know that. It has opened me up using the charts a little more. I usually just go off site though for that. Stochastic is very flexible over numerous frames. I more day trade, sometimes hold a few days, I see everything within a week. Good short term trades are what I hope to learn how to build and scan for here. I do hold about a third of my portfolio long though, just a few Gems that I pick up only when heavily oversold.

StockFetcher Forums · General Discussion · Is it possible to measure divergence of indicator lines ?<< >>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.