//version=5
strategy("Scalping XRP/IDR MA + RSI", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
/// INPUT
maLength = input.int(9, title="MA Period")
rsiLength = input.int(14, title="RSI Period")
rsiOverbought = input.int(75, title="RSI Overbought Level")
rsiEntryMin = input.int(50, title="Min RSI for Entry")
tp = input.int(500, title="Take Profit (IDR)")
sl = input.int(200, title="Stop Loss (IDR)")
/// INDICATORS
ma = ta.sma(close, maLength)
rsi = ta.rsi(close, rsiLength)
/// ENTRY LOGIC
longCondition = close > ma and rsi > rsiEntryMin and rsi < rsiOverbought
if (longCondition)
strategy.entry("Buy", strategy.long)
/// EXIT LOGIC
strategy.exit("Take Profit / Stop Loss", from_entry="Buy", limit=close + tp, stop=close - sl)
/// PLOT
plot(ma, color=color.blue, title="MA")
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiEntryMin, "Min Entry RSI", color=color.green)
strategy("Scalping XRP/IDR MA + RSI", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
/// INPUT
maLength = input.int(9, title="MA Period")
rsiLength = input.int(14, title="RSI Period")
rsiOverbought = input.int(75, title="RSI Overbought Level")
rsiEntryMin = input.int(50, title="Min RSI for Entry")
tp = input.int(500, title="Take Profit (IDR)")
sl = input.int(200, title="Stop Loss (IDR)")
/// INDICATORS
ma = ta.sma(close, maLength)
rsi = ta.rsi(close, rsiLength)
/// ENTRY LOGIC
longCondition = close > ma and rsi > rsiEntryMin and rsi < rsiOverbought
if (longCondition)
strategy.entry("Buy", strategy.long)
/// EXIT LOGIC
strategy.exit("Take Profit / Stop Loss", from_entry="Buy", limit=close + tp, stop=close - sl)
/// PLOT
plot(ma, color=color.blue, title="MA")
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiEntryMin, "Min Entry RSI", color=color.green)
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
