#strategy("RSI + SMA Strategy (Entry On)", overlay=false, initial_capital=10000)
# --- Input Toggles ---
input triggerCondition = yes; # Enable Trigger Condition
input filterCondition1 = yes; # Enable SMA Filter 1
input filterCondition2 = yes; # Enable SMA Filter 2
# --- Indicators ---
def rsi14 = RSI(length = 14);
def sma50 = Average(close, 50);
def sma100 = Average(close, 100);
def sma200 = Average(close, 200);
# --- Trigger: RSI crosses above 30 ---
def trigger = rsi14[1] < 30 and rsi14 > 30;
# --- Filters ---
def filter1 = sma50 > sma100;
def filter2 = sma200 > sma200[1]; # SMA200 trending upward
# --- Combined Entry Condition ---
def longCondition =
trigger and
filter1 and
filter2 and
triggerCondition and
filterCondition1 and
filterCondition2;
# --- Plot for Study ---
plot LongSignal = longCondition;
LongSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
LongSignal.SetDefaultColor(Color.GREEN);
I (Znewcar1) do not provide personal investment advice and I am not a qualified licensed investment advisor. I am an amateur investor.
All information found here, including any ideas, opinions, views, predictions, forecasts, commentaries, suggestions, or stock picks, expressed or implied herein, are for informational, entertainment or educational purposes only and should not be construed as personal investment advice. While the information provided is believed to be accurate, it may include errors or inaccuracies.
I will not and cannot be held liable for any actions you take as a result of anything you read here.