//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)
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
