StockFetcher Forums · Filter Exchange · Graftonian's cross count code with column count adds<< >>Post Follow-up
Mactheriverrat
3,132 posts
msg #158205
Ignore Mactheriverrat
modified
12/19/2021 5:05:14 PM

Graftonian's cross count code and was updated by one or two other posters. I add the cross counts with column's. These code's were based on Guppy moving averages.

Now these can be used to anyone's liking with draw all the Guppy moving averages on a chart or if one wants to narrow down their filters say like " Market is not otcbb" or Market is not ETF".

Enjoy!!!!

Submit
Fetcher[
/*Identify when each pair of MAs cross and sum the crosses */
set{3x5, count(ema(3) > ema(5), 1)}
draw 3x5
set{cc1, 3x5}

set{5x7, count(ema(5) > ema(7), 1)}
draw 5x7
set{cc2, cc1 + 5x7}

set{7x9, count(ema(7) > ema(9), 1)}
draw 7x9
set{cc3, cc2 + 7x9}

set{9x11, count(ema(9) > ema(11), 1)}
draw 9x11
set{cc4, cc3 + 9x11}

set{11x13, count(ema(11) > ema(13), 1)}
draw 11x13
set{cc5, cc4 + 11x13}

set{13x15, count(ema(13) > ema(15), 1)}
draw 13x15
set{cc6, cc5 + 13x15}

set{30x35, count(ema(30) > ema(35), 1)}
draw 30x35
set{cc7, cc6 + 30x35}

set{35x40, count(ema(35) > ema(40), 1)}
draw 35x40
set{cc7_35x40, cc7 + 35x40} /* CORRECTED FOR OMISSION */

set{40x45, count(ema(40) > ema(45), 1)}
draw 40x45
set{cc8, cc7_35x40 + 40x45} /* CORRECTED FOR OMISSION */

set{45x50, count(ema(45) > ema(50), 1)}
draw 45x50
set{cc9, cc8 + 45x50}

set{50x55, count(ema(50) > ema(55), 1)}
draw 50x55
set{cc10, cc9 + 50x55}

set{55x60, count(ema(55) > ema(60), 1)}
draw 55x60 */
set{CrossCount, cc10 + 55x60}

add column CrossCount /* graftonian CrossCount seems quite good */
-----------------------------------------------------
/* Below cross count by Mactherriver (John) */


/* 3x5 is number of consecutive days EMA(3) above (+)/below(-) previous EMA(5) */
set{e3e5b,days( ema(3) is above ema(5) ,250)}
set{e3e5a,days( ema(3) is below ema(5) ,250)}
set{35, e3e5a - e3e5b} and add column 35 {35}

/* 5x7 is number of consecutive days EMA(5) above (+)/below(-) previous EMA(7) */
set{e5e7b,days( ema(5) is above ema(7) ,250)}
set{e5e7a,days( ema(5) is below ema(7) ,250)}
set{57, e5e7a - e5e7b} and add column 57 {57}

/* 7x9 is number of consecutive days EMA(7) above (+)/below(-) previous EMA(9) */
set{e7e9b,days( ema(7) is above ema(9) ,250)}
set{e7e9a,days( ema(7) is below ema(9) ,250)}
set{79, e7e9a - e7e9b} and add column 79 {79}

/* 9x11 is number of consecutive days EMA(9) above (+)/below(-) previous EMA(11) */
set{e9e11b,days( ema(9) is above ema(11) ,250)}
set{e9e11a,days( ema(9) is below ema(11) ,250)}
set{911, e9e11a - e9e11b} and add column 911 {911}

/* 11x13 is number of consecutive days EMA(11) above (+)/below(-) previous EMA(13) */
set{e11e13b,days( ema(11) is above ema(13) ,250)}
set{e11e13a,days( ema(11) is below ema(13) ,250)}
set{1113, e11e13a - e11e13b} and add column 1113 {1113}

/* 13x15 is number of consecutive days EMA(13) above (+)/below(-) previous EMA(15) */
set{e13e15b,days( ema(13) is above ema(15) ,250)}
set{e13e15a,days( ema(13) is below ema(15) ,250)}
set{1315, e13e15a - e13e15b} and add column 1315 {1315}

/* 30x35 is number of consecutive days EMA(30) above (+)/below(-) previous EMA(35) */
set{e30e35b,days( ema(30) is above ema(35) ,250)}
set{e30e35a,days( ema(30) is below ema(35) ,250)}
set{3035, e30e35a - e30e35b} and add column 3035 {3035}

/* 35x40 is number of consecutive days EMA(35) above (+)/below(-) previous EMA(40) */
set{e35e40b,days( ema(35) is above ema(40) ,250)}
set{e35e40a,days( ema(35) is below ema(40) ,250)}
set{3540, e35e40a - e35e40b} and add column 3540 {3540}

/* 40x45 is number of consecutive days EMA(40) above (+)/below(-) previous EMA(45) */
set{e40e45b,days( ema(40) is above ema(45) ,250)}
set{e40e45a,days( ema(40) is below ema(45) ,250)}
set{4045, e40e45a - e40e45b} and add column 4045 {4045}

/* 45x50 is number of consecutive days EMA(45) above (+)/below(-) previous EMA(50) */
set{e45e50b,days( ema(45) is above ema(50) ,250)}
set{e45e50a,days( ema(45) is below ema(50) ,250)}
set{4550, e45e50a - e45e50b} and add column 4550 {4550}

/* 50x55 is number of consecutive days EMA(50) above (+)/below(-) previous EMA(55) */
set{e50e55b,days( ema(50) is above ema(55) ,250)}
set{e50e55a,days( ema(50) is below ema(55) ,250)}
set{5055, e50e55a - e50e55b} and add column 5055 {5055}

/* 55x60 is number of consecutive days EMA(55) above (+)/below(-) previous EMA(60) */
set{e55e60b,days( ema(55) is above ema(60) ,250)}
set{e55e60a,days( ema(55) is below ema(60) ,250)}
set{5560, e55e60a - e55e60b} and add column 5560 {5560}

Chart-time is one year

]



Cheese
1,374 posts
msg #158206
Ignore Cheese
12/19/2021 5:48:38 PM

https://www.stockfetcher.com/forums/Filter-Exchange/Graftonian-s-cross-count-code-with-column-count-adds/158205
======================================

@ John (Mac),
EXCELLENT. Thank you very much for your enhanced graftonian's CrossCount.


StockFetcher Forums · Filter Exchange · Graftonian's cross count code with column count adds<< >>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.