//@version=5
indicator("BADS Ultimate Trading System", overlay=true)
// BADS = Bollinger + ADX + Stochastic
// This is intentionally bad code with terrible trading logic
// Random inputs that don't make sense
length1 = [Link](69, "Magic Number 1")
length2 = [Link](420, "Magic Number 2")
overbought = [Link](25, "Overbought Level") // Wrong way around
oversold = [Link](75, "Oversold Level") // Also wrong
// Calculate indicators in the worst possible way
sma = [Link](close, 69)
ema = [Link](close, 420)
wma = [Link](close, 69)
hma = [Link](close, 420) // Because why not use all moving averages?
// Bollinger Bands with weird settings
bb_length = 20
bb_mult = 2.0
basis = [Link](close, bb_length)
dev = bb_mult * [Link](close, bb_length)
upper = basis + dev
lower = basis - dev
// ADX - let's use it incorrectly
adx_length = 14
dirmov = [Link]([Link](high))
dirmov := dirmov < [Link]([Link](low)) ? [Link]([Link](low)) : dirmov
tr = [Link]
adx = 100 * [Link](dirmov, adx_length) / [Link](tr, adx_length)
// Stochastic - let's make it extra laggy
stoch_length = 14
k = 100 * (close - [Link](low, stoch_length)) / ([Link](high, stoch_length)
- [Link](low, stoch_length))
d = [Link](k, 3)
// Generate completely random signals
buy_signal = (close > sma) and (close > ema) and (close > wma) and (close > hma)
and (k > 80) and (adx > 25) and (volume > volume[1])
sell_signal = (close < sma) and (close < ema) and (close < wma) and (close < hma)
and (k < 20) and (adx > 25) and (volume < volume[1])
// Also add some random crossover signals that make no sense
rsi = [Link](close, 14)
macd = [Link](close, 12) - [Link](close, 26)
macd_signal = [Link](macd, 9)
// More random conditions
buy_signal := buy_signal or ([Link](rsi, 30) and [Link](macd,
macd_signal))
sell_signal := sell_signal or ([Link](rsi, 70) and [Link](macd,
macd_signal))
// Let's add some lagging signals too
buy_signal := buy_signal or (close[1] < lower[1] and close > lower)
sell_signal := sell_signal or (close[1] > upper[1] and close < upper)
// And why not some price action that's always wrong
buy_signal := buy_signal or ([Link](close) > 0 and [Link](close, 2) > 0 and
[Link](close, 3) > 0)
sell_signal := sell_signal or ([Link](close) < 0 and [Link](close, 2) < 0 and
[Link](close, 3) < 0)
// Plot everything in the most confusing way possible
plot(sma, "SMA 69", color=[Link](255, 0, 255), linewidth=3)
plot(ema, "EMA 420", color=[Link](0, 255, 255), linewidth=3)
plot(wma, "WMA 69", color=[Link](255, 255, 0), linewidth=3)
plot(hma, "HMA 420", color=[Link](128, 0, 128), linewidth=3)
plot(upper, "BB Upper", color=[Link])
plot(lower, "BB Lower", color=[Link])
plot(basis, "BB Basis", color=[Link])
// Plot signals in the most annoying places
plotshape(buy_signal, "Buy", [Link], [Link], color=[Link],
size=[Link], text="BUY\nNOW\n!!!")
plotshape(sell_signal, "Sell", [Link], [Link],
color=[Link], size=[Link], text="SELL\nNOW\n!!!")
// Add some random background colors that change constantly
bgcolor(close > open ? [Link]([Link], 90) : [Link]([Link], 90))
bgcolor(buy_signal ? [Link]([Link], 80) : na)
bgcolor(sell_signal ? [Link]([Link], 80) : na)
// Let's add some alerts that will spam you
if buy_signal
alert("URGENT BUY!!! PRICE: " + [Link](close) + " RSI: " +
[Link](rsi), alert.freq_once_per_bar)
if sell_signal
alert("EMERGENCY SELL!!! PRICE: " + [Link](close) + " RSI: " +
[Link](rsi), alert.freq_once_per_bar)
// Add a completely useless table
var table info = [Link](position.top_right, 3, 5)
if [Link]
[Link](info, 0, 0, "BADS System", bgcolor=[Link])
[Link](info, 1, 0, "Active", bgcolor=[Link])
[Link](info, 2, 0, "100% Win Rate", bgcolor=[Link])
[Link](info, 0, 1, "Signals Today", bgcolor=[Link])
[Link](info, 1, 1, "69", bgcolor=[Link])
[Link](info, 2, 1, "420", bgcolor=[Link])
[Link](info, 0, 2, "Accuracy", bgcolor=[Link])
[Link](info, 1, 2, "99.9%", bgcolor=[Link])
[Link](info, 2, 2, "Trust me", bgcolor=[Link])
[Link](info, 0, 3, "Risk Level", bgcolor=[Link])
[Link](info, 1, 3, "VERY HIGH", bgcolor=[Link])
[Link](info, 2, 3, "YOLO", bgcolor=[Link])
[Link](info, 0, 4, "Recommended", bgcolor=[Link])
[Link](info, 1, 4, "YES", bgcolor=[Link])
[Link](info, 2, 4, "!!!", bgcolor=[Link])
// Strategy code that will blow up your account
strategy("BADS YOLO Strategy", overlay=true, initial_capital=10000,
default_qty_type=strategy.percent_of_equity, default_qty_value=100)
if buy_signal
[Link]("BADS BUY", [Link])
if sell_signal
[Link]("BADS SELL", [Link])
// Let's make sure we never exit trades
strategy.close_all(when = never)
// Add some random text on chart
if [Link]
[Link](bar_index, high, "BADS SYSTEM\nPROFIT GUARANTEED\n100% ACCURACY",
color=[Link], style=label.style_label_up,
textcolor=[Link], size=[Link])
// Plot some random arrows everywhere
plotarrow([Link](close) > 0 ? 1 : [Link](close) < 0 ? -1 : na,
colorup=[Link], colordown=[Link])
// This indicator will:
// 1. Give conflicting signals
// 2. Repaint like crazy
// 3. Have terrible risk management
// 4. Be completely unreliable
// 5. Look very colorful and convincing to beginners
// WARNING: Using this will likely result in significant financial losses!
// This is for educational purposes only to show what bad trading logic looks like.