StockFetcher Forums · View by Author: (1,062 messages)  [ Display By: Date / Subject ]<< 1 ... 2 3 4 5 6 ... 107 >> 
Filter Exchange · TRUE Average True Range (ATR)
mahkoh
msg #146476
modified
2/8/2019 12:23:22 PM

Fetcher[
average true range percent(14) above 10
]



Edit, forgot to state the period, now set to 14.
I used a similar code:

set{atr1,weighted atr(20) / close}
set{atr20,atr1 * 100}
add column atr20

until I found out SF has a built in atr percent.

Filter Exchange · Waddah Attar Explosion
mahkoh
msg #146404
modified
2/2/2019 4:22:28 PM

https://www.mql5.com/en/code/531
https://www.tradingview.com/script/iu3kKWDI-Waddah-Attar-Explosion-LazyBear/

This indicator relates the strength of a trend to the recent volatility. It is originally a forex indicator, one might play with the factor 150 in the x6 code to adjust for stocks.

Fetcher[
sp500
set{x1,ema(20) - ema(40)}
set{x2,cema(x1,1)}
set{x3,cema(x1,1) 1 day ago}
set{x4,x2 - x3}
set{x6,x4 * 150}
set{explosion,abs(x6)}
draw explosion
add column explosion

set{line,upper bollinger band(20,2) - lower bollinger band(20,2)}
draw line on plot explosion
]


The above filter does not show whether the trade should be entered long or short, but I think one look at the chart can tell you which direction should be taken. But below is a version that suggests to short on a break below the green line.

Fetcher[
sp500
set{x1,ema(20) - ema(40)}
set{x2,cema(x1,1)}
set{x3,cema(x1,1) 1 day ago}
set{x4,x2 - x3}
set{explosion,x4 * 150}
draw explosion
add column explosion

set{buyline,upper bollinger band(20,2) - lower bollinger band(20,2)}
draw buyline on plot explosion
set{selline,buyline * -1}
draw selline on plot explosion
]






General Discussion · 1,600% with only 42 trades
mahkoh
msg #146211
1/22/2019 12:25:44 PM

If I place a market on open order I either get the open price or there is no trade, no such thing as slippage.

Filter Exchange · Interesting options filter
mahkoh
msg #145930
1/8/2019 5:56:39 PM

You can use "draw ema (10)"

General Discussion · BEHOLD THE HOLY GRAIL
mahkoh
msg #145877
1/5/2019 1:01:07 PM

KSK8, I wouldn't worry too much about increasing percent profitable. In the last year 19 times a stock gained more than 100 % from open to close. Glancing through the list only GBR looks like it could have qualified the day before as a candidate. I just wouldn't bet the farm on every trade.

Fetcher[
set{x,count(close 100% above open,200)}
close above 0.1
close below 10
volume above 100000
x above 0
add column x
chartlength 200 days
volume 200 days ago above 0
]



Edit: GBR did not qualify, probably because rsi(2) was too low as it closed way below the open.


General Discussion · BEHOLD THE HOLY GRAIL
mahkoh
msg #145870
1/5/2019 8:42:23 AM

What do you exactly mean with "premarket fails to hold the morning spike?

General Discussion · BEHOLD THE HOLY GRAIL
mahkoh
msg #145856
1/4/2019 8:39:45 AM

KSK8,

I think you may learn to appreciate Stratasearch as a very powerful piece of software, but it all comes down to reliable data.

Fetcher[
market is not OTCBB
market is not ETF
close > 0.1
close < 10
]


returns about 2000 stocks, but for proper backtesting you also need data for stocks that were below 10 in the past. Stratasearch has an option to download historical data in csv format, obtaining data may cost something but could be worth it.

But all in all, I think your system has merit. You may have to stomach a few 50+% drawdowns every once in a while, but it only took 3 years to become a millionaire with a starting capital of 50000.

General Discussion · BEHOLD THE HOLY GRAIL
mahkoh
msg #145855
1/4/2019 8:13:38 AM

@Nibor:
The signal date is the date SS labels as the date when the trade is opened. ref(open,1) in the order type means the trade is executed at the next open.

CNET turns out to be a data error. As you can see in the linked file it misses data from 1/4/18 to 1/9/18. Without these days the 1/11/18 spike probably led to a rsi(2) value of 99 thus triggering the trade.
https://imghostr.com/mcadZNcq
Stratasearch has settings on when to exclude a stock due to missing days, the default is 10.

Stratasearch uses yahoo eod data as a source but changed things to their website which prevents a smooth download. I have another instance with a 2500 stock database that is running fine, but 6000+ with a lot of obscure companies that may not even be listed anymore is a problem. Usually my download crashes at the letter "M" due to excessive connection failures, so there will be few trades for tickers beyond that. Here is a list for the trades going back to February 2018. Remember that only one stock is selected alphabetically and I use rsi(2) above 99. And I accidentally coded volume > 1mln instead of price*volume>1mln
https://imghostr.com/hgP2zaNd


General Discussion · BEHOLD THE HOLY GRAIL
mahkoh
msg #145850
modified
1/3/2019 5:57:41 AM

OK, results.
A few things to consider: Out of the 6000+ securities I only have reliable data for some 3500 symbols. Getting data for all is a hassle which I do not intend to go through as I don't trade stock below $10.
I cannot filter out OTC/BB and biotech.
Most pricedata goes back to 2013 -2014, but the further back I go less stocks are covered. That is probably why the position count graph looks more crowded towards the present. I would suggest using a portfolio size of 2, thus risking half your capital on a trade, but for fun we'll just evaluate going all-in on every trade. If there were 2 candidates Stratasearch would pick the ticker which came first alphabetically but that can be optimized.
I have used a variable for rsi number, it turns out rsi(2) above 99 without having to cross above gives best results.
https://imghostr.com/A8fw2mXa

Position count: https://imghostr.com/fwgzkXqz

Equity curve: https://imghostr.com/dXO6Bdx4

Statistics: https://imghostr.com/FgSe73tY

Worst results: https://imghostr.com/DsDAPa4G

Regarding the worst results, I don't think a trade like HTBX on 5/1/2018 would have materialized trying to short 1.7 million shares at the open. Take the equity curve with a grain of salt..

I found a way to eliminate biotech by feeding the results into Stockfetcher. Out of 198 results 91 were labelled Industry: Medical. Average win for those was 4.59% per trade accumulating to 418 % over the test period.
Non medical: 107 trades, average 5.40% totaling 577%






General Discussion · BEHOLD THE HOLY GRAIL
mahkoh
msg #145844
modified
1/2/2019 9:39:01 PM

Stratasearch code:

Entry string:
close>0.1
and
close<10
and
volume>1000000
and
crossabove(rsi(2),98)
and
close/high<0.9

Exit string:
1=1

Order types: Entry: ref(open, 1), Exit: close




StockFetcher Forums ·  · << 1 ... 2 3 4 5 6 ... 107 >>

*** 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 2018 - 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