StockFetcher Forums · General Discussion · SF coding question on ETF trades<< 1 2 >>Post Follow-up
sandjco
648 posts
msg #135837
Ignore sandjco
modified
5/10/2017 10:40:27 PM

Amazing site; so much to digest!

How do I code...

Go long
- if the RSI (14) for SPY is over 90
- if the RSI (14) for GLD is under 10
Then BUY GLD

Close long
- if the RSI(14) for SPY is under 10
- fi the RSI(14) for GLD is over 90
Then SELL GLD

Also, is it possible to create a filter before the trade is triggered that it is only triggered if there was a positive correlation?

Thanks in advance!

mahkoh
1,065 posts
msg #135853
Ignore mahkoh
modified
5/11/2017 2:33:24 PM

The easiest way:

Create a filter and compare the rsi values. I don't think your filter will generate many trades.
Fetcher[
symlist(spy,gld)
add column rsi(14)
draw rsi(14)
]




sandjco
648 posts
msg #135858
Ignore sandjco
5/11/2017 6:42:34 PM

Thank you; I appreciate the help!

sandjco
648 posts
msg #136498
Ignore sandjco
modified
6/25/2017 10:28:49 AM

Hello,

How do I create a filter that shows stocks that have been going up and down at least $1 (or say 5%) every week or month during the last 3 months?

and then a column to count how many times that stock has hit that parameter?

I guess this is what is referred to as "cycles"?

Thanks in advance

graftonian
1,089 posts
msg #136499
Ignore graftonian
6/25/2017 12:22:45 PM

You might find something of interest in TRO's crockpot posts

four
5,087 posts
msg #136501
Ignore four
modified
6/25/2017 1:17:23 PM

try this "same type" of discussion:
http://www.stockfetcher.com/forums2/Filter-Exchange/DEADLY-COMBO/62378

pthomas215
1,251 posts
msg #136503
Ignore pthomas215
6/25/2017 2:01:40 PM

Four, just curious--is what he is asking for more like 'Deadly combo' logic and reasoning, or more like 'Tro's Crock Pot"?

sandjco
648 posts
msg #136505
Ignore sandjco
modified
6/25/2017 7:42:59 PM

Thank you all.

I did find this filter done by Kevin
http://www.stockfetcher.com/forums2/Filter-Exchange/TRO-S-CROCK-POT-2-0/115856/-1/115879

However, being a total newbie...and still trying to digest all the different info from different threads here..it is a daunting but the best thing that I've ever come across! I am grateful for those who share and I do hope one day I can repay by sharing my success as well!

what happened to therumpledone?

I am trying to follow the works from (this is for my own notes ;=D)
- graftonian
- four
- pthomas215
- Kevin_in_GA
- mahkoh

I'm not a programmer nor do I understand the language use here...so, I'm as raw as anyone can be!

My goal:
- to find a filter to will give me candidates that have moved x% over the past x days or months (the "x" is yet to be defined). A list of no more than 10 stocks would be great; any stocks that don't meet the "cycling" criteria will be taken off
- use a simple system for entries
- use a simple money management/profit target
- 2% growth per "x" (week)?

I still cannot believe I didn't find this site years ago! Happy trades to you all!

pthomas215
1,251 posts
msg #136506
Ignore pthomas215
6/25/2017 8:27:29 PM

sandjco, Tro's Crock Pot is good. It may be what you are looking for. I increased days range requirements on it to get more bang for your buck given a good entry. It's still a filter, meaning do some other checks on the ones you like before pulling the trigger to increase your confidence in the trade.

Fetcher[
/* TRO STAT SCAN for SWING TRADERS - use only on Saturday and Sunday */
/*set up for 2.5% gain 9.5% loss*/
/*find weekly profit*/
set{whiop, weekly high - weekly open}
set{Long_Profit, whiop / weekly open }
set{wkProfitPct, 100 * Long_Profit }

/* find weekly losss */
set{wloop, weekly low - weekly open}
set{Long_Loss, wloop / weekly open }
set{wkLossPct, 100 * Long_Loss }

set{win, count(long_profit > 0.0249, 1)}
set{win_count, count(win > .9, 52)}

/*define the gray area*/
set{gray01, count(Long_Profit < .025, 1)}
set{gray02, count(Long_Loss > -0.095, 1)}
set{gray03, gray01 + gray02}
set{ties, gray03 - 1}
set{gray_count, count(gray03 > 1.9, 52)}

set{loss, count(Long_Loss < -0.095, 1)}
set{loss_count, count(loss > .9, 52)}

add column separator
add column win_count{wins}
add column gray_count{ties}
add column loss_count{losses}

set{Win_loss_ratio, win_count / loss_count}
add column separator
add column win_loss_ratio
sort on column 10 descending
draw win
draw loss
draw wkprofitpct
draw wkprofitpct line at 2.5
draw wklosspct on plot wkprofitpct
draw wklosspct line at -9.5
draw win_loss_ratio
draw win_loss_ratio line at 50

not OTCBB
Average Volume(30) > 123456
close > 5
chart-display is weekly
chart-time is 2 years
volume above 2000000
set{s_days, days(slow stochastic(5,1) fast %k below 30, 2)}
add column s_days
s_days equals 1
draw slow stochastic(5,1) fast %k
draw slow stochastic(5,1) fast %k line at 30

set{i_days, days(IFT(2,1) below 0, 2)}
add column i_days
i_days equals 1
draw IFT(2,1)
draw IFT(2,1) line at 0

do not draw s_days
do not draw i_days
Average Day Range(10) > 6
]



sandjco
648 posts
msg #136508
Ignore sandjco
6/25/2017 11:51:29 PM

Thank you pthomas215! This is kinda what I was thinking of....

Pardon my ignorance...this "script" filters out only stocks that have gained 2.5% weekly with max 9.5% loss BUT are stocks that exhibit more "wins" than "loses" right?

I am not sure If I am expressing it correctly.

I was thinking more in terms of stocks that that exhibit movements of say 20% every 6 to 8 days. The logic being, if these stocks are moving at least 20% every 6 to 8 days...we could take advantage of trading within those cycles to compound our money.

Theoretically, the filter would:
- filter stocks that exhibited at least a 20% gain every 6 to 8 days
- a column in the filter would show many many times it has exhibited that during the last 6 months.

I hope I'm making sense...

As always, thank you in advance.



StockFetcher Forums · General Discussion · SF coding question on ETF trades<< 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.