Unanswered Question Graveyard

MerryDay

Administrative
Staff member
Staff
VIP
No solutions have been found for these questions so far. They will reside here in hopes that someone will be able to provide some direction.
 
Last edited:

AverageMishka

New member
Hi,

I'm looking to plot the avg of 3 moving averages and the other 2 moving averages instead of having them as 5 separate lines.


Screenshot-2021-10-29-153441.png



Code:
declare lower;

input length1 = 8.0;
input length2 = 24.0;
input length3 = 50.0;
input length4 = 113.0;
input length5 = 200.0;
input displace = 0;


input averageTypeE = AverageType.EXPONENTIAL;
input averageTypeW = AverageType.EXPONENTIAL;

def ema8 = ExpAverage(close, 8);
def ema24 = ExpAverage(close, 24);
def wma50 = WMA(close, 50);
def ema113 = ExpAverage(close, 113);
def wma200 = WMA(close, 200);
def price = close;


plot EMA8_ = ExpAverage(close, 8);
plot EMA24_ = ExpAverage(close, 24);
plot WMA50_ = WMA(close, 50);
plot EMA113_ = ExpAverage (close, 113);
plot WMA200_ = WMA(close, 200);

AddLabel(close, ”Stacked AVGs(CALLS)” , (if wma200 and price > ema113 and price > wma50 and price > ema24 and price > ema8 then Color.GREEN else Color.GRAY));

AddLabel(close, ”Stacked AVGs(PUTS)” , (if wma200 and price < ema113 and price < wma50 and price < ema24 and price < ema8 then Color.GREEN else Color.GRAY));


AddChartBubble(EMA8_ and EMA24_ and WMA50_ crosses above WMA200_ and EMA113_, close, "GO", Color.PINK);

AddChartBubble(EMA8_ crosses above WMA200_ and EMA113_, close, "9 Cross", Color.DARK_GREEN);

AddChartBubble(EMA24_ crosses above WMA200_ and EMA113_, close, "21 Cross", Color.LIGHT_GREEN);

AddChartBubble(WMA50_ crosses above WMA200_ and EMA113_, close, "50 Cross", Color.GREEN);

AddChartBubble(EMA8_ crosses below WMA200_ and EMA113_, close, "9 Cross", Color.DARK_RED);

AddChartBubble(EMA24_ crosses below WMA200_ and EMA113_, close, "21 Cross", Color.LIGHT_RED);

AddChartBubble(WMA50_ crosses below WMA200_ and EMA113_, close, "50 Cross", Color.RED);

AddChartBubble(EMA8_ and EMA24_ and WMA50_ crosses below WMA200_ and EMA113_, close, "BYE", Color.BLUE);
 

lmk99

Member
VIP
Use SPY with RSMK on stocks - what would be good to use with RSMK on SPY itself?
I have some success with using RSMK to compare a stock's trend strength against SPY. I'd like to employ a similar method for trading SPY but it's not at all clear to me what SPY should be compared against, in an analogous way to how equities can be compared to SPY.

Any ideas? It's kind of interesting to look at SPY using the RSMK indicator correlated to GLD but I don't think it's necessarily useful. Maybe theoretically if there was a global markets index that wasn't just dominated by SPY then that could be a benchmark for comparison with SPY? Like an index of the European + Asian stock markets? Are they all so correlated that it wouldn't even be useful?

How can you benchmark the trend strength of SPY against another index or reference, is it even possible to do this usefully?

Very interested in the ideas of all the smart people here.

EDIT: The correlation of SPY with FXI (China ETF) is fairly high, with EEM (Emerging Markets) seems to be higher still. DIA and GLD seem the least correlated with SPY but I don't know if that has any conceptual usefulness or relevancy for using the RSMK indicator to scalp SPY's moves in reference to trend strength vs. these other indexes. Maybe /ES would make the most sense but I don't think the RSMK indicator would accept "/ES" as an input, would it?
 
Last edited by a moderator:

Similar threads

Top