Good morning,
I'm working on an ETF mean reversion signal in Powerlanguage using daily bars. Basically, I'd like to buy SLV when it's oversold (RSI(2) < 10 for example) AND the S&P 500 (or XLY) is above the 200d moving average. Is there a simple way to code this without calling a separate data series for SPY?
Pattern1 = C > Average(C,200) <-- buying SLV, but I want to buy only when SPY > 200d moving average
Thank you, Shawn
Calling an indicator from another chart
Re: Calling an indicator from another chart
I don't know of a simpler way than adding SPY as Data 2 and creating the SMA.
viewtopic.php?t=6929#p35429
Something like:
viewtopic.php?t=6929#p35429
Something like:
Code: Select all
Var: SMASPY(0, data2 );
SMASPY = Average_FC( Close, 200 ) of data2;