StockFetcher Forums · Filter Exchange · Stock Pair trading<< 1 2 >>Post Follow-up
dtatu
126 posts
msg #135936
Ignore dtatu
5/17/2017 8:08:01 AM

Anybody can tell me if a 2 symbols pair( or rather 2 symbols spread) ( ex . EWJ close minus FXY close, or GLD close minus GDX close) can be used as a single security to which, then, I could apply a moving average, momentum indicators, etc.

Thanks in advance

mahkoh
1,065 posts
msg #135950
Ignore mahkoh
modified
5/17/2017 12:51:55 PM

I assume you mean to divide the two instead of subtract?

Fetcher[
symlist(GLD)
set{ratio,ind(GLD,close) / ind(GDX,close)}
set{ratioma,cma(ratio,20)}
draw ratioma
set{ratiorsi,crsi(ratio,14)}
draw ratiorsi
]




dtatu
126 posts
msg #135960
Ignore dtatu
5/17/2017 7:25:52 PM

Beautiful !

Thanks

Eltonm45
19 posts
msg #136047
Ignore Eltonm45
5/24/2017 2:38:20 PM

Hello
Wound you mind sharing how you approach this filter? I have been papertrading a few 2x and 3x ETFs ( mainly gold, ng,oil) but usually base my buys/sells on price patters. Sometimes it works great, sometimes not so much. Thank you.

dtatu
126 posts
msg #157274
Ignore dtatu
modified
7/25/2021 10:19:55 AM

4 years later: did not pursue with this idea, in 2017.
- Q: is it possible to gather several Pairs under a watchlist in order to apply , to all of them , the same filters?
ex:
apply to watchlist( GLD/GDX, FXA/FXY, SPY/IWM,XLK/XLP), etc.

dtatu
126 posts
msg #157275
Ignore dtatu
modified
7/25/2021 10:49:31 AM

symlist(SPY)
set{ratio,ind(SPY,weekly close) / ind(IWM,weekly close)}
set{ratioWma20,weekly cWma(ratio,20)}
draw ratioWma20
set{ratioWma8,weekly cWma(ratio,8)}
draw ratioWma8

ratioWMA8 crossed above ratioWMA20

by doing this I get a cross signal on SF on May 17 , but on a Barchart.com weekly chart the cross takes place on April 12.
Where is the error?( Basically I want to see a weekly WMA(8) crossing above weekly WMA(20) of the Pair Ratio

nibor100
797 posts
msg #157278
Ignore nibor100
7/26/2021 1:03:13 PM

Using your script above I get no crossover results on any date and when I plot the 8 on the 20 plot no crossovers ever appear in past year.
However when I add columns to see the values of the 8 and 20 on given days, the 8 is below the 20 in a few days in May.

changing the chart display to weekly did not seem to help.

are those all of the lines of your script in your post?

weekly stuff in SF is many times inconsistent.

Thanks,
Ed S.

dtatu
126 posts
msg #157279
Ignore dtatu
modified
7/26/2021 1:34:35 PM

Thanks Ed,
This is the latest filter which is lighting up SPY since May 17.
As I said, : on Barchart.com the same up cross takes place on the week of April 5.
I use ONLY weekly charts and weekly filters on SF and I have reliable signals usually.

symlist(SPY)
set{ratio, ind(SPY,close)/ ind(IWM,close)}
set{ratiowkWma20, weekly cWma(ratio,20)}
draw ratiowkWma20

set{ratiowkWma8, weekly cWma(ratio,8)}
draw ratiowkWma8

ratiowkWMA8 above ratiowkWMA20

nibor100
797 posts
msg #157301
Ignore nibor100
7/29/2021 12:17:38 PM

@dtatu,

I joined the free barchart.com site but I can't figure out how to do a weekly ratio chart on it?

Your last filter, without the word "crossed", does show SPY on May17 when I run it that way.

Thanks
Ed S.

dtatu
126 posts
msg #157304
Ignore dtatu
modified
7/30/2021 8:39:31 AM

https://www.barchart.com/etfs-funds/quotes/SPY/technical-chart?plot=LINE&volume=total&data=WO&density=L&pricesOn=0&asPctChange=0&logscale=0&indicators=WMA(8);WMA(20)&sym=SPY%2FIWM&grid=1&height=375&studyheight=100&isSpread=1


try this and let me know; I think it's a very interesting concept , if we can get it work reliably on SF; of course, any other combinations of momentum signals are welcomed( without trying to tweek/complicate too much and get into curve fitting)

https://www.barchart.com/etfs-funds/quotes/GLD/technical-chart?plot=LINE&volume=total&data=WO&density=L&pricesOn=0&asPctChange=0&logscale=0&indicators=WMA(8);WMA(20)&sym=GLD%2FGBTC&grid=1&height=375&studyheight=100&isSpread=1

this is GLD/GBTC spread: you could have been short the spread( short GLD/long GBTC) from Oct to April from a ratio of 15 down to below 4 before an up cross

StockFetcher Forums · Filter Exchange · Stock Pair trading<< 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 2021 - 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.