Bank Nifty Buy 5 Min
Bank Nifty Buy 5 Min
indicator("ChartArt-Bankniftybuying5min", overlay=true)
// Time condition (between 9:30 AM and 14:35 PM IST)
startTime = timestamp("GMT+5:30", year, month, dayofmonth, 9, 30)
endTime = timestamp("GMT+5:30", year, month, dayofmonth, 14, 45)
timeCondition = (time >= startTime and time <= endTime)
// EMA Conditions
ema7 = ta.sma(close, 7)
ema5 = ta.sma(close, 5)
intradayDowntrend = ema5 < ema7
// RSI and VWMA Condition
rsi14 = ta.rsi(close, 14)
sma14 = ta.sma(rsi14, 14)
rsiCondition = rsi14 <= sma14
// Relaxed Hammer or Doji Condition
secondCandleHammer = (open[1] - close[1]) < (high[1] - low[1]) * 0.3
secondCandleDoji = math.abs(open[1] - close[1]) / (high[1] - low[1]) < 0.36
secondCandleCondition = secondCandleHammer or secondCandleDoji
// First and Third Candle Conditions
firstBearish = close[2] < open[2]
thirdBullishCloseNearHigh = (high - close) < (high - low) * 0.18
thirdBullish = close > open and close > high[1] and low > low[1] and
thirdBullishCloseNearHigh
// Labels
label.new(bar_index + 4, sl, text="SL", color=color.red, textcolor=color.white,
style=label.style_label_up, size=size.small)
label.new(bar_index + 1, target1, text="1st TG", color=#79c9ffbe,
textcolor=color.white, style=label.style_label_down, size=size.small)
label.new(bar_index + 1, target2, text="2nd TG", color=#79c9ffbe,
textcolor=color.white, style=label.style_label_down, size=size.small)