搜尋
產品
社群
市場
新聞
經紀商
更多
TW
立即開始
Nifty 50指數
看多
1月29日
My new parash
0
取得這個圖表
取得這個圖表
//
version
=5
strategy("Nifty 15-Min Intraday Strategy", overlay=true, margin_long=100, margin_short=100)
// Inputs
emaLength = input.int(20, "EMA Length")
rsiLength = input.int(14, "RSI Length")
stopLossPoints = input.int(15, "Stop Loss (Points)")
takeProfitPoints = input.int(30, "Take Profit (Points)")
useTimeFilter = input.bool(true, "Restrict Trading Hours (9:45-14:30 IST)")
// Calculate Indicators
ema20 = ta.ema(close, emaLength)
rsi = ta.rsi(close, rsiLength)
volumeUp = volume > ta.sma(volume, 5)
// Define Trading Session (9:45 AM to 2:30 PM IST)
timeAllowed = time(timeframe.period, "0945-1430")
// Trend Identification
bullishTrend = close > ema20
bearishTrend = close < ema20
// Entry Conditions
longCondition =
bullishTrend and
ta.crossover(rsi, 50) and
(low <= ema20) and
volumeUp and
(useTimeFilter ? timeAllowed : true)
shortCondition =
bearishTrend and
ta.crossunder(rsi, 50) and
(high >= ema20) and
volumeUp and
(useTimeFilter ? timeAllowed : true)
// Execute Trades
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", "Long", stop=close - stopLossPoints, limit=close + takeProfitPoints)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", "Short", stop=close + stopLossPoints, limit=close - takeProfitPoints)
// Plotting
plot(ema20, color=color.blue, title="20 EMA")
bgcolor(bullishTrend ? color.new(color.green, 90) : color.new(color.red, 90))
// Alerts
alertcondition(longCondition, "Long Entry", "Nifty Long Signal on 15-min")
alertcondition(shortCondition, "Short Entry", "Nifty Short Signal on 15-min")
parashkalita040194
關注
Technical Indicators
parashkalita040194
關注
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在
使用條款
閱讀更多資訊。