// © BABYLONS CAPITAL - Internal Use Only // BabylonsRadar Pro V3 - BirbicatorPRO Functional Clone (Pine v6) // Author: Built for Nguyen Dinh Duc (BABYLONS) by Perplexity Computer // Description: Multi-layer trend & momentum framework combining: // 1. Baseline (lagged MA - core trend filter) // 2. Trailer (ATR-based trailing stop with Bull/Bear labels) // 3. Momentum Wave (modified stochastic + banded extremes) // 4. 10-Oscillator Divergence Counter (MACD/RSI/OBV/CCI/MFI/MOM/STOCH/AO/WT/BBP) // 5. Confluence Signal Engine (Bull/Bear dots when 3 layers align) // 6. Multi-Timeframe Bias Table // //@version=6 indicator("BabylonsRadar Pro V3", shorttitle="BR-Pro", overlay=true, max_labels_count=500, max_lines_count=500, max_bars_back=1000) // ===================================================================================== // SECTION 1 — INPUTS // ===================================================================================== grp_base = "1. Baseline (Core Trend)" grp_trail = "2. Trailer (Trend Follower)" grp_wave = "3. Momentum Wave" grp_div = "4. Divergence Engine" grp_sig = "5. Signal Engine" grp_mtf = "6. Multi-Timeframe" grp_proj = "7. Projection Bands" grp_vis = "8. Visuals" // --- Baseline --- bl_length = input.int(100, "Baseline Length", minval=10, group=grp_base, tooltip="20=Near, 50=Medium, 100=Default, 200=Long") bl_type = input.string("HMA", "Baseline Type", options=["SMA","EMA","WMA","HMA","RMA"], group=grp_base) bl_lag = input.int(3, "Baseline Lag (bars)", minval=0, maxval=20, group=grp_base, tooltip="Intentional lag to capture larger arc") // --- Trailer --- tr_atr_len = input.int(14, "Trailer ATR Length", group=grp_trail) tr_atr_mul = input.float(2.5, "Trailer ATR Multiplier", step=0.1, group=grp_trail) // --- Wave --- wv_length = input.int(21, "Momentum Wave Length", group=grp_wave) wv_smooth = input.int(5, "Wave Smoothing", group=grp_wave) wv_ob = input.float(80, "Overbought Band", group=grp_wave) wv_os = input.float(20, "Oversold Band", group=grp_wave) // --- Divergence --- div_pivot_left = input.int(5, "Divergence Pivot Left", group=grp_div) div_pivot_right = input.int(5, "Divergence Pivot Right", group=grp_div, tooltip="Larger = less repaint, more lag") div_lookback = input.int(60, "Divergence Lookback Bars", group=grp_div) div_min_count = input.int(5, "Min Oscillators in Confluence (X/10)", minval=1, maxval=10, group=grp_div) // --- Signal --- sig_require_baseline = input.bool(true, "Require Baseline Cross", group=grp_sig) sig_require_wave = input.bool(true, "Require Momentum Confirm", group=grp_sig) sig_require_trailer = input.bool(true, "Require Trailer Aligned", group=grp_sig) // --- MTF --- mtf_show = input.bool(true, "Show MTF Bias Table", group=grp_mtf) mtf_tf1 = input.timeframe("60", "TF 1", group=grp_mtf) mtf_tf2 = input.timeframe("240", "TF 2", group=grp_mtf) mtf_tf3 = input.timeframe("1D", "TF 3", group=grp_mtf) mtf_tf4 = input.timeframe("1W", "TF 4", group=grp_mtf) // --- Projection Bands --- proj_show = input.bool(true, "Show Projection Bands", group=grp_proj) proj_atr_len = input.int(100, "Projection ATR Length", minval=10, group=grp_proj) proj_mult1 = input.float(1.0, "Band 1 Multiplier", step=0.1, group=grp_proj) proj_mult2 = input.float(2.5, "Band 2 Multiplier", step=0.1, group=grp_proj) proj_mult3 = input.float(5.0, "Band 3 Multiplier", step=0.1, group=grp_proj) proj_mult4 = input.float(8.0, "Band 4 Multiplier", step=0.1, group=grp_proj) proj_extend = input.bool(true, "Extend Lines to Right", group=grp_proj) proj_show_pct = input.bool(true, "Show % Deviation in Label", group=grp_proj) // --- Visuals --- vs_bull = input.color(color.new(#00e5ff, 0), "Bull Color (Trailer/Labels)", group=grp_vis, tooltip="Cyan = nổi trên dark theme") vs_bear = input.color(color.new(#ff1744, 0), "Bear Color (Trailer/Labels)", group=grp_vis, tooltip="Red = nổi trên dark theme") vs_baseline_bull = input.color(color.new(#ffeb3b, 0), "Baseline Bull Color", group=grp_vis, tooltip="Vàng tươi - khi giá trên baseline") vs_baseline_bear = input.color(color.new(#e040fb, 0), "Baseline Bear Color", group=grp_vis, tooltip="Tím magenta - khi giá dưới baseline") vs_baseline_width = input.int(4, "Baseline Width", minval=1, maxval=8, group=grp_vis) vs_trailer_width = input.int(3, "Trailer Width", minval=1, maxval=6, group=grp_vis) vs_show_labels = input.bool(true, "Show Bull/Bear Labels", group=grp_vis) vs_show_dots = input.bool(true, "Show Confluence Dots", group=grp_vis) vs_show_div = input.bool(true, "Show Divergence Count Label", group=grp_vis) vs_bg_tint = input.bool(true, "Background Tint by Trend", group=grp_vis, tooltip="Tô nền nhạt theo trailer direction") // ===================================================================================== // SECTION 2 — BASELINE (Core) // ===================================================================================== ma_calc(src, len, t) => t == "SMA" ? ta.sma(src, len) : t == "EMA" ? ta.ema(src, len) : t == "WMA" ? ta.wma(src, len) : t == "HMA" ? ta.hma(src, len) : ta.rma(src, len) baseline_raw = ma_calc(close, bl_length, bl_type) baseline = bl_lag > 0 ? baseline_raw[bl_lag] : baseline_raw bl_color = close > baseline ? vs_baseline_bull : vs_baseline_bear plot(baseline, "Baseline", color=bl_color, linewidth=vs_baseline_width) // Glow effect: vẽ thêm 1 lớp mờ phía sau cho hiệu ứng "phát sáng" plot(baseline, "Baseline Glow", color=color.new(bl_color, 70), linewidth=vs_baseline_width + 4) baseline_bull = close > baseline baseline_bear = close < baseline baseline_cross_up = ta.crossover(close, baseline) baseline_cross_down = ta.crossunder(close, baseline) // ===================================================================================== // SECTION 3 — TRAILER (ATR Trailing Stop / SuperTrend style) // ===================================================================================== atr_val = ta.atr(tr_atr_len) src_mid = (high + low) / 2 up_band_init = src_mid - tr_atr_mul * atr_val dn_band_init = src_mid + tr_atr_mul * atr_val var float up_band = na var float dn_band = na var int trailer_dir = 1 up_prev = nz(up_band[1], up_band_init) dn_prev = nz(dn_band[1], dn_band_init) up_band := close[1] > up_prev ? math.max(up_band_init, up_prev) : up_band_init dn_band := close[1] < dn_prev ? math.min(dn_band_init, dn_prev) : dn_band_init trailer_dir := nz(trailer_dir[1], 1) if trailer_dir == -1 and close > dn_prev trailer_dir := 1 else if trailer_dir == 1 and close < up_prev trailer_dir := -1 trailer = trailer_dir == 1 ? up_band : dn_band tr_color = trailer_dir == 1 ? vs_bull : vs_bear plot(trailer, "Trailer", color=tr_color, linewidth=vs_trailer_width, style=plot.style_line) // Background tint theo trailer direction bgcolor(vs_bg_tint and trailer_dir == 1 ? color.new(vs_bull, 92) : na, title="Bull BG") bgcolor(vs_bg_tint and trailer_dir == -1 ? color.new(vs_bear, 92) : na, title="Bear BG") trailer_flip_bull = trailer_dir == 1 and trailer_dir[1] == -1 trailer_flip_bear = trailer_dir == -1 and trailer_dir[1] == 1 if vs_show_labels and trailer_flip_bull label.new(bar_index, low, "▲ BULL", style=label.style_label_up, color=vs_bull, textcolor=color.black, size=size.normal) if vs_show_labels and trailer_flip_bear label.new(bar_index, high, "▼ BEAR", style=label.style_label_down, color=vs_bear, textcolor=color.white, size=size.normal) // ===================================================================================== // SECTION 4 — MOMENTUM WAVE (Modified Stochastic) // ===================================================================================== hh = ta.highest(high, wv_length) ll = ta.lowest(low, wv_length) raw_wave = 100 * (close - ll) / (hh - ll) wave = ta.ema(raw_wave, wv_smooth) wave_signal = ta.sma(wave, 3) wave_bull = wave > wave_signal and wave > 50 wave_bear = wave < wave_signal and wave < 50 wave_ob = wave > wv_ob wave_os = wave < wv_os // ===================================================================================== // SECTION 5 — 10-OSCILLATOR DIVERGENCE ENGINE // ===================================================================================== // Oscillator 1: MACD [macd_line, _, _] = ta.macd(close, 12, 26, 9) // Oscillator 2: RSI rsi_val = ta.rsi(close, 14) // Oscillator 3: OBV obv_val = ta.cum(math.sign(ta.change(close)) * volume) // Oscillator 4: CCI cci_val = ta.cci(close, 20) // Oscillator 5: MFI mfi_val = ta.mfi(hlc3, 14) // Oscillator 6: Momentum (ROC) mom_val = ta.mom(close, 10) // Oscillator 7: Stochastic stoch_val = ta.stoch(close, high, low, 14) // Oscillator 8: Awesome Oscillator ao_val = ta.sma(hl2, 5) - ta.sma(hl2, 34) // Oscillator 9: WaveTrend (TCI) wt_esa = ta.ema(hlc3, 10) wt_d = ta.ema(math.abs(hlc3 - wt_esa), 10) wt_ci = (hlc3 - wt_esa) / (0.015 * wt_d) wt_val = ta.ema(wt_ci, 21) // Oscillator 10: Bull/Bear Power (Elder) bbp_val = high - ta.ema(close, 13) + low - ta.ema(close, 13) // --- Divergence detection helper --- // Regular bullish: price LL, oscillator HL // Regular bearish: price HH, oscillator LH f_div(osc) => ph = ta.pivothigh(high, div_pivot_left, div_pivot_right) pl = ta.pivotlow(low, div_pivot_left, div_pivot_right) osc_ph = ta.pivothigh(osc, div_pivot_left, div_pivot_right) osc_pl = ta.pivotlow(osc, div_pivot_left, div_pivot_right) var float last_ph_price = na var float last_pl_price = na var float last_ph_osc = na var float last_pl_osc = na var int last_ph_bar = na var int last_pl_bar = na bull = false bear = false if not na(pl) and not na(osc_pl) cur_pl_price = low[div_pivot_right] cur_pl_osc = osc[div_pivot_right] if not na(last_pl_price) and (bar_index - last_pl_bar) <= div_lookback if cur_pl_price < last_pl_price and cur_pl_osc > last_pl_osc bull := true last_pl_price := cur_pl_price last_pl_osc := cur_pl_osc last_pl_bar := bar_index if not na(ph) and not na(osc_ph) cur_ph_price = high[div_pivot_right] cur_ph_osc = osc[div_pivot_right] if not na(last_ph_price) and (bar_index - last_ph_bar) <= div_lookback if cur_ph_price > last_ph_price and cur_ph_osc < last_ph_osc bear := true last_ph_price := cur_ph_price last_ph_osc := cur_ph_osc last_ph_bar := bar_index [bull, bear] [b1, x1] = f_div(macd_line) [b2, x2] = f_div(rsi_val) [b3, x3] = f_div(obv_val) [b4, x4] = f_div(cci_val) [b5, x5] = f_div(mfi_val) [b6, x6] = f_div(mom_val) [b7, x7] = f_div(stoch_val) [b8, x8] = f_div(ao_val) [b9, x9] = f_div(wt_val) [b10, x10] = f_div(bbp_val) // Count "active" divergences in a window after detection var int bull_div_count = 0 var int bear_div_count = 0 var int bull_div_age = 0 var int bear_div_age = 0 cur_bull = (b1?1:0)+(b2?1:0)+(b3?1:0)+(b4?1:0)+(b5?1:0)+(b6?1:0)+(b7?1:0)+(b8?1:0)+(b9?1:0)+(b10?1:0) cur_bear = (x1?1:0)+(x2?1:0)+(x3?1:0)+(x4?1:0)+(x5?1:0)+(x6?1:0)+(x7?1:0)+(x8?1:0)+(x9?1:0)+(x10?1:0) if cur_bull > 0 bull_div_count := cur_bull bull_div_age := 0 else bull_div_age := bull_div_age + 1 if bull_div_age > div_lookback bull_div_count := 0 if cur_bear > 0 bear_div_count := cur_bear bear_div_age := 0 else bear_div_age := bear_div_age + 1 if bear_div_age > div_lookback bear_div_count := 0 div_bull_strong = bull_div_count >= div_min_count div_bear_strong = bear_div_count >= div_min_count // Plot divergence count labels if vs_show_div and cur_bull >= div_min_count label.new(bar_index[div_pivot_right], low[div_pivot_right], str.tostring(cur_bull) + "/10 BULL DIV", yloc=yloc.belowbar, style=label.style_label_up, color=color.new(color.green, 20), textcolor=color.white, size=size.normal) if vs_show_div and cur_bear >= div_min_count label.new(bar_index[div_pivot_right], high[div_pivot_right], str.tostring(cur_bear) + "/10 BEAR DIV", yloc=yloc.abovebar, style=label.style_label_down, color=color.new(color.red, 20), textcolor=color.white, size=size.normal) // ===================================================================================== // SECTION 6 — CONFLUENCE SIGNAL ENGINE // ===================================================================================== bull_conds = 0 bear_conds = 0 bull_conds := bull_conds + (sig_require_baseline ? (baseline_bull ? 1 : 0) : 1) bull_conds := bull_conds + (sig_require_wave ? (wave_bull ? 1 : 0) : 1) bull_conds := bull_conds + (sig_require_trailer ? (trailer_dir == 1 ? 1 : 0) : 1) bear_conds := bear_conds + (sig_require_baseline ? (baseline_bear ? 1 : 0) : 1) bear_conds := bear_conds + (sig_require_wave ? (wave_bear ? 1 : 0) : 1) bear_conds := bear_conds + (sig_require_trailer ? (trailer_dir == -1 ? 1 : 0) : 1) bull_signal = bull_conds == 3 and (baseline_cross_up or trailer_flip_bull) bear_signal = bear_conds == 3 and (baseline_cross_down or trailer_flip_bear) plotshape(vs_show_dots and bull_signal, "Bull Dot", shape.circle, location.belowbar, color=vs_bull, size=size.normal) plotshape(vs_show_dots and bear_signal, "Bear Dot", shape.circle, location.abovebar, color=vs_bear, size=size.normal) // Thêm shape lớn hơn cho confluence cực mạnh (có cả divergence ≥ min_count) plotshape(vs_show_dots and bull_signal and div_bull_strong, "STRONG BULL", shape.triangleup, location.belowbar, color=color.new(#ffeb3b, 0), size=size.large, text="★", textcolor=color.black) plotshape(vs_show_dots and bear_signal and div_bear_strong, "STRONG BEAR", shape.triangledown, location.abovebar, color=color.new(#e040fb, 0), size=size.large, text="★", textcolor=color.white) // ===================================================================================== // SECTION 7 — PROJECTION BANDS (Target/Extreme Levels - giống B-Pro gốc) // ===================================================================================== proj_atr = ta.atr(proj_atr_len) up_b1 = baseline + proj_mult1 * proj_atr up_b2 = baseline + proj_mult2 * proj_atr up_b3 = baseline + proj_mult3 * proj_atr up_b4 = baseline + proj_mult4 * proj_atr dn_b1 = baseline - proj_mult1 * proj_atr dn_b2 = baseline - proj_mult2 * proj_atr dn_b3 = baseline - proj_mult3 * proj_atr dn_b4 = baseline - proj_mult4 * proj_atr plot(proj_show ? up_b1 : na, "Resistance 1", color=color.new(#ffeb3b, 70), linewidth=1) plot(proj_show ? up_b2 : na, "Resistance 2", color=color.new(#ff9800, 60), linewidth=1) plot(proj_show ? up_b3 : na, "Resistance 3", color=color.new(#ff5722, 50), linewidth=1) plot(proj_show ? up_b4 : na, "Resistance 4", color=color.new(#f44336, 30), linewidth=2) plot(proj_show ? dn_b1 : na, "Support 1", color=color.new(#b2ff59, 70), linewidth=1) plot(proj_show ? dn_b2 : na, "Support 2", color=color.new(#00e676, 60), linewidth=1) plot(proj_show ? dn_b3 : na, "Support 3", color=color.new(#00bfa5, 50), linewidth=1) plot(proj_show ? dn_b4 : na, "Support 4", color=color.new(#00b0ff, 30), linewidth=2) // Label giá + % deviation ở cột bên phải (giống B-Pro gốc: "120072.02 (82.77%)") f_lbl(level) => pct = 100 * (level - close) / close pct_str = proj_show_pct ? " (" + str.tostring(pct, "#.##") + "%)" : "" str.tostring(level, "#.##") + pct_str var label lbl_up1 = na var label lbl_up2 = na var label lbl_up3 = na var label lbl_up4 = na var label lbl_dn1 = na var label lbl_dn2 = na var label lbl_dn3 = na var label lbl_dn4 = na var line ln_up1 = na var line ln_up2 = na var line ln_up3 = na var line ln_up4 = na var line ln_dn1 = na var line ln_dn2 = na var line ln_dn3 = na var line ln_dn4 = na if proj_show and barstate.islast label.delete(lbl_up1) label.delete(lbl_up2) label.delete(lbl_up3) label.delete(lbl_up4) label.delete(lbl_dn1) label.delete(lbl_dn2) label.delete(lbl_dn3) label.delete(lbl_dn4) line.delete(ln_up1) line.delete(ln_up2) line.delete(ln_up3) line.delete(ln_up4) line.delete(ln_dn1) line.delete(ln_dn2) line.delete(ln_dn3) line.delete(ln_dn4) right_bar = bar_index + 15 if proj_extend ln_up1 := line.new(bar_index - 100, up_b1, right_bar, up_b1, color=color.new(#ffeb3b, 60), style=line.style_dashed, width=1) ln_up2 := line.new(bar_index - 100, up_b2, right_bar, up_b2, color=color.new(#ff9800, 50), style=line.style_dashed, width=1) ln_up3 := line.new(bar_index - 100, up_b3, right_bar, up_b3, color=color.new(#ff5722, 40), style=line.style_dashed, width=1) ln_up4 := line.new(bar_index - 100, up_b4, right_bar, up_b4, color=color.new(#f44336, 20), style=line.style_dashed, width=2) ln_dn1 := line.new(bar_index - 100, dn_b1, right_bar, dn_b1, color=color.new(#b2ff59, 60), style=line.style_dashed, width=1) ln_dn2 := line.new(bar_index - 100, dn_b2, right_bar, dn_b2, color=color.new(#00e676, 50), style=line.style_dashed, width=1) ln_dn3 := line.new(bar_index - 100, dn_b3, right_bar, dn_b3, color=color.new(#00bfa5, 40), style=line.style_dashed, width=1) ln_dn4 := line.new(bar_index - 100, dn_b4, right_bar, dn_b4, color=color.new(#00b0ff, 20), style=line.style_dashed, width=2) lbl_up1 := label.new(right_bar, up_b1, f_lbl(up_b1), color=color.new(#ffeb3b, 20), textcolor=color.black, style=label.style_label_left, size=size.small) lbl_up2 := label.new(right_bar, up_b2, f_lbl(up_b2), color=color.new(#ff9800, 20), textcolor=color.black, style=label.style_label_left, size=size.small) lbl_up3 := label.new(right_bar, up_b3, f_lbl(up_b3), color=color.new(#ff5722, 10), textcolor=color.white, style=label.style_label_left, size=size.small) lbl_up4 := label.new(right_bar, up_b4, f_lbl(up_b4), color=color.new(#f44336, 0), textcolor=color.white, style=label.style_label_left, size=size.normal) lbl_dn1 := label.new(right_bar, dn_b1, f_lbl(dn_b1), color=color.new(#b2ff59, 20), textcolor=color.black, style=label.style_label_left, size=size.small) lbl_dn2 := label.new(right_bar, dn_b2, f_lbl(dn_b2), color=color.new(#00e676, 20), textcolor=color.black, style=label.style_label_left, size=size.small) lbl_dn3 := label.new(right_bar, dn_b3, f_lbl(dn_b3), color=color.new(#00bfa5, 10), textcolor=color.white, style=label.style_label_left, size=size.small) lbl_dn4 := label.new(right_bar, dn_b4, f_lbl(dn_b4), color=color.new(#00b0ff, 0), textcolor=color.white, style=label.style_label_left, size=size.normal) // ===================================================================================== // SECTION 8 — MULTI-TIMEFRAME BIAS TABLE // ===================================================================================== f_bias() => bl = ma_calc(close, bl_length, bl_type) close > bl ? 1 : -1 bias1 = request.security(syminfo.tickerid, mtf_tf1, f_bias(), lookahead=barmerge.lookahead_off) bias2 = request.security(syminfo.tickerid, mtf_tf2, f_bias(), lookahead=barmerge.lookahead_off) bias3 = request.security(syminfo.tickerid, mtf_tf3, f_bias(), lookahead=barmerge.lookahead_off) bias4 = request.security(syminfo.tickerid, mtf_tf4, f_bias(), lookahead=barmerge.lookahead_off) var table mtf_table = table.new(position.top_right, 2, 6, border_width=1) if mtf_show and barstate.islast table.clear(mtf_table, 0, 0, 1, 5) table.cell(mtf_table, 0, 0, "TF", bgcolor=color.gray, text_color=color.white, text_size=size.small) table.cell(mtf_table, 1, 0, "Bias", bgcolor=color.gray, text_color=color.white, text_size=size.small) table.cell(mtf_table, 0, 1, mtf_tf1, text_color=color.white, bgcolor=color.new(color.black, 30), text_size=size.small) table.cell(mtf_table, 1, 1, bias1 == 1 ? "BULL" : "BEAR", bgcolor=bias1 == 1 ? vs_bull : vs_bear, text_color=color.white, text_size=size.small) table.cell(mtf_table, 0, 2, mtf_tf2, text_color=color.white, bgcolor=color.new(color.black, 30), text_size=size.small) table.cell(mtf_table, 1, 2, bias2 == 1 ? "BULL" : "BEAR", bgcolor=bias2 == 1 ? vs_bull : vs_bear, text_color=color.white, text_size=size.small) table.cell(mtf_table, 0, 3, mtf_tf3, text_color=color.white, bgcolor=color.new(color.black, 30), text_size=size.small) table.cell(mtf_table, 1, 3, bias3 == 1 ? "BULL" : "BEAR", bgcolor=bias3 == 1 ? vs_bull : vs_bear, text_color=color.white, text_size=size.small) table.cell(mtf_table, 0, 4, mtf_tf4, text_color=color.white, bgcolor=color.new(color.black, 30), text_size=size.small) table.cell(mtf_table, 1, 4, bias4 == 1 ? "BULL" : "BEAR", bgcolor=bias4 == 1 ? vs_bull : vs_bear, text_color=color.white, text_size=size.small) // Current divergence count row div_text = bull_div_count > bear_div_count ? str.tostring(bull_div_count) + "/10 BULL" : bear_div_count > 0 ? str.tostring(bear_div_count) + "/10 BEAR" : "-" div_bg = bull_div_count > bear_div_count ? color.new(color.green, 30) : bear_div_count > 0 ? color.new(color.red, 30) : color.gray table.cell(mtf_table, 0, 5, "DIV", text_color=color.white, bgcolor=color.new(color.black, 30), text_size=size.small) table.cell(mtf_table, 1, 5, div_text, bgcolor=div_bg, text_color=color.white, text_size=size.small) // ===================================================================================== // SECTION 9 — ALERTS (ready for Telegram webhook later) // ===================================================================================== alertcondition(bull_signal, "BR-Pro Bull Signal", "BABYLONS RADAR: BULL signal on {{ticker}} @ {{close}}") alertcondition(bear_signal, "BR-Pro Bear Signal", "BABYLONS RADAR: BEAR signal on {{ticker}} @ {{close}}") alertcondition(div_bull_strong, "BR-Pro Strong Bull Divergence", "BABYLONS RADAR: {{plot_0}}/10 BULL divergence on {{ticker}}") alertcondition(div_bear_strong, "BR-Pro Strong Bear Divergence", "BABYLONS RADAR: {{plot_0}}/10 BEAR divergence on {{ticker}}") alertcondition(trailer_flip_bull, "BR-Pro Trailer Flip Bull", "BABYLONS RADAR: Trailer flipped BULL on {{ticker}}") alertcondition(trailer_flip_bear, "BR-Pro Trailer Flip Bear", "BABYLONS RADAR: Trailer flipped BEAR on {{ticker}}")