StockFetcher Forums · Filter Exchange · stochastics signal with backtest<< >>Post Follow-up
tmuesing
30 posts
msg #149338
Ignore tmuesing
10/14/2019 5:16:02 PM

Submit
Fetcher[/* The stochastics INN signal backtest */
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */

/*getting the riff raff out */
market is not otcbb
close > 1 for the last 21 days
volume 21 day low > 500000
average day range(21) > 1
do not draw average day range(21)

/* stochastics INN signal */
set{stoc, slow stochastic(7,4,3) %D}
set{innsto1, count(2 day slope stoc > 0,1)}
set{innsto2, count(stoc > 20,1)}
set{innsto, innsto1 * innsto2}
draw slow stochastic(7,4,3) %D
draw innsto

/* XXXXXXXXXXXXXXXXXXXXXXXX THE BACKTEST XXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* calculate the daily profit */
set{c2c1, close / close 1 day ago}
set{c2c2, c2c1 - 1}
set{daily%, c2c2 * 100}
/* The IN Signal */
set{biginn, count(innsto 1 day ago > 0.5,1)}
set{inday%, daily% * biginn}
/* calculate profit for last 251 days(1 year) */
/* daily % gains, of the in days only, added together */
set{inday1, CMA(inday%,251)}
set{profittotal%, inday1 * 251}

set{zzzz,0}
draw inday% on plot zzzz

/* the real profit % over 251 days */
set{real1, close / close 251 days ago}
set{real2, real1 - 1}
set{realprofit%, real2 * 100}

/* monthly(21 day) gain/loss */
set{profit21day%, SUM(inday%,21)}
set{xxxx,0}
draw profit21day% 251 day low on plot xxxx
draw profit21day% 251 day high on plot xxxx

add column separator
add column daily%
add column inday%
add column biginn
add column separator
add column profittotal%
add column realprofit%
add column profit21day%
sort on column 10 descending

]




Cheese
1,374 posts
msg #149341
Ignore Cheese
10/14/2019 10:15:43 PM

Smart tool. Thanks for sharing, tmuesing.

stephenmcmahon83
15 posts
msg #149344
Ignore stephenmcmahon83
10/15/2019 5:11:16 AM

Could someone be a saint and post the poor man's version of this signal?

Cheese
1,374 posts
msg #149346
Ignore Cheese
modified
10/15/2019 10:53:41 AM

Fetcher[


/* **************** ORIGINAL VERSION by tmuesing is here ***************** */

/* https://www.stockfetcher.com/forums/Filter-Exchange/test/149333 */
/* The stochastics INN signal backtest */
/* tmuesing modified 10/14/2019 12:53:24 PM */


/* **************** ALTERATED VERSION FOR BASIC SUBS ***************** */

/* The stochastics INN signal backtest */
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */

/*getting the riff raff out */
market is not otcbb
close > 1 for the last 21 days
volume 21 day low > 500000
average day range(21) > 1
do not draw average day range(21)

/* stochastics INN signal */
/*
set{stoc, slow stochastic(7,4,3) %D}
set{innsto1, count(2 day slope stoc > 0,1)}
set{innsto2, count(stoc > 20,1)}
*/
set{innsto1, count(2 day slope slow stochastic (7,4,3) %D > 0,1)}
set{innsto2, count(slow stochastic (7,4,3) %D > 20,1)}
set{innsto, innsto1 * innsto2}
draw slow stochastic(7,4,3) %D
draw innsto

/* XXXXXXXXXXXXXXXXXXXXXXXX THE BACKTEST XXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* calculate the daily profit */
set{c2c1, close / close 1 day ago}
set{c2c2, c2c1 - 1}
set{daily%, c2c2 * 100}
/* The IN Signal */
set{biginn, count(innsto 1 day ago > 0.5,1)}
set{inday%, daily% * biginn}
/* calculate profit for last 251 days(1 year) */
/* daily % gains, of the in days only, added together */
set{inday1, CMA(inday%,251)}
set{profittotal%, inday1 * 251}

/*
set{zzzz,0}
draw inday% on plot zzzz
*/

/* the real profit % over 251 days */
set{real1, close / close 251 days ago}
set{real2, real1 - 1}
set{realprofit%, real2 * 100}

/* monthly(21 day) gain/loss */
set{profit21day%, SUM(inday%,21)}
/*
set{xxxx,0}
draw profit21day% 251 day low on plot xxxx
draw profit21day% 251 day high on plot xxxx
*/

add column separator
add column daily%
add column inday%
add column biginn
add column separator
add column profittotal%
add column realprofit%
add column profit21day%
sort on column 10 descending
]






sandjco
648 posts
msg #149353
Ignore sandjco
10/15/2019 9:39:41 PM

Thanks for doing the po man's version Cheese and thanks for sharing tmuesing!

If i understand this filter correctly...the entry criteria is this:
Fetcher[
set{innsto1, count(2 day slope slow stochastic (7,4,3) %D > 0,1)}
set{innsto2, count(slow stochastic (7,4,3) %D crossed above 50,1)}
set{innsto, innsto1 * innsto2}
]



Thanks in advance

Cheese
1,374 posts
msg #149356
Ignore Cheese
10/15/2019 10:22:37 PM

I hope tmuesing will pop in at some time and tell us more about the thinking behind this "stochastic signal with backtest" tool and how to best use it.

Cheese
1,374 posts
msg #149382
Ignore Cheese
modified
10/21/2019 11:09:04 AM

Fetcher[

/* **************** ORIGINAL VERSION by tmuesing is here ***************** */

/* https://www.stockfetcher.com/forums/Filter-Exchange/test/149333 */
/* The stochastics INN signal backtest */
/* tmuesing modified 10/14/2019 12:53:24 PM */


/* **************** ALTERATED VERSION FOR BASIC SUBS ***************** */

/* The stochastics INN signal backtest */
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */

/* market direction BLIND SQUIRREL WILD GUESSES */
SYMLIST(SPY,QQQ,IWM)

/* stochastics INN signal */
/*
set{stoc, slow stochastic(7,4,3) %D}
set{innsto1, count(2 day slope stoc > 0,1)}
set{innsto2, count(stoc > 20,1)}
*/
set{innsto1, count(2 day slope slow stochastic (7,4,3) %D > 0,1)}
set{innsto2, count(slow stochastic (7,4,3) %D > 20,1)}
set{innsto, innsto1 * innsto2}
draw slow stochastic(7,4,3) %D
draw innsto

/* XXXXXXXXXXXXXXXXXXXXXXXX THE BACKTEST XXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* calculate the daily profit */
set{c2c1, close / close 1 day ago}
set{c2c2, c2c1 - 1}
set{daily%, c2c2 * 100}
/* The IN Signal */
set{biginn, count(innsto 1 day ago > 0.5,1)}
set{inday%, daily% * biginn}
/* calculate profit for last 251 days(1 year) */
/* daily % gains, of the in days only, added together */
set{inday1, CMA(inday%,251)}
set{profittotal%, inday1 * 251}

/*
set{zzzz,0}
draw inday% on plot zzzz
*/

/* the real profit % over 251 days */
set{real1, close / close 251 days ago}
set{real2, real1 - 1}
set{realprofit%, real2 * 100}

/* monthly(21 day) gain/loss */
set{profit21day%, SUM(inday%,21)}
/*
set{xxxx,0}
draw profit21day% 251 day low on plot xxxx
draw profit21day% 251 day high on plot xxxx
*/

add column separator
/* add column daily% */
add column inday%
add column biginn
add column separator
add column profittotal%{total%}
add column realprofit%{real%}
add column profit21day%{21day%}
sort on column 10 descending
]



tmuesing
30 posts
msg #149440
Ignore tmuesing
modified
10/27/2019 5:37:11 PM

bye

StockFetcher Forums · Filter Exchange · stochastics signal with backtest<< >>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.