//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)
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
