Vinnertrade
New member
Does anyone know how to scan for stocks that are bullish per the Ripster EMA cloud.
Here is the script for it. Can someone help with converting it to a scanner?
Is it possible to not wait for the candle to close and get the alert when the price is crossing the clouds or within the cloud (5/12) and (34/50)
Here is the script for it. Can someone help with converting it to a scanner?
Code:
input price = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.ten_MIN;
input displace = 0;
input averageType = AverageType.EXPONENTIAL;
input length1 = 5;
input length2 = 12;
input length3 = 34;
input length4 = 50;
def MovAvg1 = MovingAverage(averageType, Fundamental(price, period = aggregationPeriod), length1);
def MovAvg2 = MovingAverage(averageType, Fundamental(price, period = aggregationPeriod), length2);
def MovAvg3 = MovingAverage(averageType, Fundamental(price, period = aggregationPeriod), length3);
def MovAvg4 = MovingAverage(averageType, Fundamental(price, period = aggregationPeriod), length4);
input BubbleOn = yes;
input bubblemover = 1;
def n = bubblemover;
def n1 = n + 1;
def bloc = bubbleon and isnan(close[n]) and !isnan(close[n1]);
# Plot EMAs
plot fib1 = MovAvg1;
plot fib2 = MovAvg2;
plot fib3 = MovAvg3;
plot fib4 = MovAvg4;
# Create separate plots for different cloud conditions
plot greenCloud1 = if fib1 >= fib2 then fib1 else Double.NaN;
plot blueCloud1 = if fib1 < fib2 then fib2 else Double.NaN;
plot greenCloud2 = if fib3 >= fib4 then fib3 else Double.NaN;
plot pinkCloud2 = if fib3 < fib4 then fib4 else Double.NaN;
# Add clouds between EMAs with updated colors
AddCloud(greenCloud1, fib2, Color.GREEN, Color.GREEN);
AddCloud(blueCloud1, fib1, Color.BLUE, Color.BLUE);
AddCloud(greenCloud2, fib4, Color.yellow, Color.yellow);
AddCloud(pinkCloud2, fib3, Color.magenta, Color.magenta);
# Set EMA line colors
fib1.SetDefaultColor(CreateColor(255, 255, 255));
fib2.SetDefaultColor(CreateColor(116, 189, 232));
fib3.SetDefaultColor(CreateColor(255, 165, 0));
fib4.SetDefaultColor(CreateColor(255, 105, 180));
# Add bubbles
AddChartBubble(bloc, fib1[n1], "5 TenEma", CreateColor(255, 255, 255), yes);
AddChartBubble(bloc, fib2[n1], "12 TenEma", CreateColor(116, 189, 232), yes);
AddChartBubble(bloc, fib3[n1], "34 TenEma ", CreateColor(255, 165, 0), yes);
AddChartBubble(bloc, fib4[n1], "50 TenEma", CreateColor(255, 105, 180), yes);
Is it possible to not wait for the candle to close and get the alert when the price is crossing the clouds or within the cloud (5/12) and (34/50)