Penny

Wait 5 sec.

PennyCohu, Inc.BATS:COHUmahmudovxojaka050//@version=5 indicator("Penny Stock Sniper V9 ", overlay=true, shorttitle="PS Sniper V9", max_lines_count=500, max_labels_count=500, max_bars_back=5000) // --- 1. SOZLAMALAR --- group_sess = "Sessiya Tanlovi" session_mode = input.string("Regular (09:30)", "Qaysi bozorda savdo qilasiz?", options=, group=group_sess) group_main = "Signal va Risk" rvol_thresh = input.float(2.0, "Minimal RVol (Breakout)", minval=1.0, group=group_main) reentry_rvol = input.float(1.5, "Minimal RVol (Re-entry)", minval=1.0, group=group_main) swing_len = input.int(5, "Stop Loss Swing", group=group_main) group_pro = "KUCHLI TEXNIK TAHLIL (Vizual)" use_adx = input.bool(true, "ADX Filtri (Trend Kuchi)", group=group_pro) adx_len = input.int(14, "ADX Uzunligi", group=group_pro) adx_limit = input.int(20, "Min ADX (Kuch)", group=group_pro) use_bb = input.bool(true, "Bollinger Bands (Ko'rsatish)", group=group_pro) group_tp = "Take Profit Sozlamalari" tp1_percent = input.float(10.0, "Target 1 (%)", group=group_tp) tp2_percent = input.float(20.0, "Target 2 (%)", group=group_tp) tp3_percent = input.float(30.0, "Target 3 (%)", group=group_tp) group_vis = "Vizual Qo'shimchalar" show_ema = input.bool(true, "EMA 19 Trend", group=group_vis) show_vwap_line = input.bool(true, "VWAP (Yashil)", group=group_vis) group_dash = "Dashboard (Jadval)" show_table = input.bool(true, "Jadvalni ko'rsatish", group=group_dash) table_pos = input.string(position.top_right, "Jadval joylashuvi", options=, group=group_dash) // --- 2. INDIKATORLAR VA FON --- ema19 = ta.ema(close, 19) ema_col = close > ema19 ? color.blue : color.red p_ema = plot(show_ema ? ema19 : na, "EMA 19", color=ema_col, linewidth=2) p_close = plot(show_ema ? close : na, "Price Data", display=display.none) fill(p_ema, p_close, color = close > ema19 ? color.new(color.blue, 85) : color.new(color.red, 85), title="EMA Trend Background") vwapVal = ta.vwap(hlc3) plot(show_vwap_line ? vwapVal : na, "VWAP Line", color=color.green, linewidth=1) // --- 3. TEXNIK TAHLIL --- // A) ADX Logic = ta.dmi(adx_len, adx_len) adx_condition = use_adx ? (adxVal >= adx_limit) : true // B) Bollinger Bands = ta.bb(close, 20, 2.0) bb_squeeze = (bb_upper - bb_lower) < ta.sma(bb_upper - bb_lower, 20) bb_condition = use_bb ? (close > bb_middle) : true p_bb_upper = plot(use_bb ? bb_upper : na, "BB Upper", color=color.new(color.teal, 60)) p_bb_lower = plot(use_bb ? bb_lower : na, "BB Lower", color=color.new(color.teal, 60)) fill(p_bb_upper, p_bb_lower, color=use_bb ? color.new(color.teal, 95) : na, title="Bollinger Background") // --- 4. SESSIYA --- var string sess_orb = "0930-0945" var string sess_trade = "0930-1100" if session_mode == "Pre-Market (04:00)" sess_orb := "0400-0415" sess_trade := "0400-0530" else if session_mode == "Regular (09:30)" sess_orb := "0930-0945" sess_trade := "0930-1100" else if session_mode == "After-Hours (16:00)" sess_orb := "1600-1615" sess_trade := "1600-1730" is_orb_time = time(timeframe.period, sess_orb + ":1234567") is_trade_window = not na(time(timeframe.period, sess_trade + ":1234567")) var float orb_high = na var float orb_low = na if is_orb_time and not is_orb_time orb_high := high orb_low := low else if is_orb_time orb_high := math.max(orb_high, high) orb_low := math.min(orb_low, low) // --- RANGE ZONASI --- p_high = plot(is_trade_window and not is_orb_time ? orb_high : na, "Session High", color.green, 2, plot.style_linebr) p_low = plot(is_trade_window and not is_orb_time ? orb_low : na, "Session Low", color.red, 2, plot.style_linebr) fill(p_high, p_low, color=color.new(color.gray, 90), title="Range Zone Fill") // --- 5. SIGNAL MANTIQI --- avg_vol = ta.sma(volume, 20) rvol = volume / avg_vol breakout_basic = not is_orb_time and is_trade_window and ta.crossover(close, orb_high) and close > vwapVal and rvol >= rvol_thresh breakout_cond = breakout_basic and adx_condition and bb_condition // --- 6. RE-ENTRY --- var bool breakout_happened = false if is_orb_time and not is_orb_time breakout_happened := false if breakout_cond breakout_happened := true ema_touch = ta.barssince(low open) and (body > range_can * 0.6) vol_confirm = rvol >= reentry_rvol var int last_signal_bar = 0 cooldown_ok = (bar_index - last_signal_bar) > 5 reentry_basic = breakout_happened and is_trade_window and ema_touch and structure_break and strong_candle and vol_confirm and cooldown_ok and close > vwapVal reentry_cond = reentry_basic and adx_condition if breakout_cond or reentry_cond last_signal_bar := bar_index final_signal = breakout_cond or reentry_cond // --- 7. VIZUALIZATSIYA VA YANGI POSITION FX --- plotshape(breakout_cond, "BREAKOUT", shape.labelup, location.belowbar, color.green, 0, "SNIPER\nENTRY", color.white) plotshape(reentry_cond, "RE-ENTRY", shape.triangleup, location.belowbar, color.orange, 0, "RE-ADD", color.white, size=size.small) if final_signal entry = close swing_low = ta.lowest(low, swing_len) calc_sl = swing_low < entry ? swing_low : entry * 0.97 max_sl_price = entry * 0.95 sl = math.max(calc_sl, max_sl_price) tp1 = entry * (1 + tp1_percent / 100) tp2 = entry * (1 + tp2_percent / 100) tp3 = entry * (1 + tp3_percent / 100) // --- YANGI QO'SHILGAN POSITION FX (Quticha) --- // Foyda Zonasi (Yashil Box - Entry dan TP3 gacha) box.new(left=bar_index, top=tp3, right=bar_index + 25, bottom=entry, bgcolor=color.new(color.green, 85), border_color=color.new(color.green, 60), border_width=1) // Zarar Zonasi (Qizil Box - Entry dan SL gacha) box.new(left=bar_index, top=entry, right=bar_index + 25, bottom=sl, bgcolor=color.new(color.red, 85), border_color=color.new(color.red, 60), border_width=1) // ---------------------------------------------- // Chiziqlar va Yozuvlar (Eski dizayn saqlandi) line.new(bar_index, sl, bar_index + 25, sl, color=color.red, width=2) label.new(bar_index + 25, sl, "STOP\n" + str.tostring(sl, "#.##"), color=color.red, textcolor=color.white, style=label.style_label_left) line.new(bar_index, tp1, bar_index + 25, tp1, color=color.green, width=1, style=line.style_dashed) label.new(bar_index + 25, tp1, "TP1", color=color.green, textcolor=color.white, style=label.style_label_left, size=size.small) line.new(bar_index, tp3, bar_index + 25, tp3, color=color.green, width=2) label.new(bar_index + 25, tp3, "TARGET\n" + str.tostring(tp3, "#.##"), color=color.green, textcolor=color.white, style=label.style_label_left) alert("SNIPER PRO SIGNAL: " + syminfo.ticker + " | Price: " + str.tostring(entry), alert.freq_once_per_bar) // --- 8. DASHBOARD --- rsiVal = ta.rsi(close, 14) = ta.macd(close, 12, 26, 9) macd_bull = macdLine > signalLine total_shares = request.financial(syminfo.tickerid, "TOTAL_SHARES_OUTSTANDING", "FQ") float shares_m = na(total_shares) ? 0 : total_shares / 1000000 var table d_table = table.new(table_pos, 2, 10, border_width=1) if show_table and barstate.islast table.cell(d_table, 0, 0, " 🚀 " + syminfo.ticker, bgcolor=color.new(color.blue, 20), text_color=color.white, text_size=size.small, width=12) table.cell(d_table, 1, 0, "PRO DATA", bgcolor=color.new(color.blue, 20), text_color=color.white, text_size=size.small, width=12) table.cell(d_table, 0, 1, "Trend (ADX)", bgcolor=color.black, text_color=color.white, text_size=size.small) table.cell(d_table, 1, 1, str.tostring(adxVal, "#.##"), bgcolor=adxVal > 20 ? color.green : color.red, text_color=color.white, text_size=size.small) table.cell(d_table, 0, 2, "RSI (14)", bgcolor=color.black, text_color=color.white, text_size=size.small) color rsi_col = rsiVal > 70 ? color.red : (rsiVal < 30 ? color.green : color.gray) table.cell(d_table, 1, 2, str.tostring(rsiVal, "#.##"), bgcolor=rsi_col, text_color=color.white, text_size=size.small) table.cell(d_table, 0, 3, "MACD", bgcolor=color.black, text_color=color.white, text_size=size.small) table.cell(d_table, 1, 3, macd_bull ? "BULL" : "BEAR", bgcolor=macd_bull ? color.green : color.red, text_color=color.white, text_size=size.small) table.cell(d_table, 0, 4, "RVol", bgcolor=color.black, text_color=color.white, text_size=size.small) table.cell(d_table, 1, 4, str.tostring(rvol, "#.##") + "x", bgcolor=rvol >= 2.0 ? color.green : color.gray, text_color=color.white, text_size=size.small) table.cell(d_table, 0, 5, "Shares (M)", bgcolor=color.black, text_color=color.white, text_size=size.small) table.cell(d_table, 1, 5, str.tostring(shares_m, "#.##"), bgcolor=color.gray, text_color=color.white, text_size=size.small) table.cell(d_table, 0, 6, "VWAP", bgcolor=color.black, text_color=color.white, text_size=size.small) table.cell(d_table, 1, 6, close > vwapVal ? "BUY ZONE" : "SELL ZONE", bgcolor=close > vwapVal ? color.green : color.red, text_color=color.white, text_size=size.small) table.cell(d_table, 0, 7, "Sessiya", bgcolor=color.black, text_color=color.white, text_size=size.small) table.cell(d_table, 1, 7, session_mode, bgcolor=color.gray, text_color=color.white, text_size=size.small)