Indicators

Get Price action indicator Code That Actually Works

Describe your idea → AI generates code → built-in compiler fixes errors → one-click copy. Working price action indicator in under 30 seconds.

4.9/5 Rating
10,000+ Traders
Free Forever Plan

The Problem

You've spotted killer price action setups like pin bars at support or engulfing candles on your charts, but coding them into a Pine Script indicator ends in frustration with endless syntax errors and repainting issues. Hours lost tweaking code that never works live, or worse, buying generic scripts that miss your exact strategy nuances. Sound familiar? You're not alone – most traders give up here.

The Solution

HorizonAI's chat-based AI lets you describe your price action indicator in plain English, like 'Detect bullish pin bars with 70% lower wick and send alerts.' In 30 seconds, it generates flawless Pine Script, auto-fixed by the built-in compiler. One-click copy-paste into TradingView – trade your custom signals instantly, no errors.

Why Traders Choose HorizonAI for Price action indicator

Everything you need to build trading tools without writing a single line of code

Code Always Works

Built-in compiler auto-checks and fixes every error before delivery. Get reliable price action indicators that run perfectly – backed by 20,000+ scripts for 5,000+ traders.

Ready in 30 Seconds

Type your idea, hit send – no waiting days for freelancers or weeks learning code. Instant working price action signals on your charts.

Iterate Effortlessly

Chat to refine: 'Make pin bars only at swing lows' or 'Add volume filter.' Keep tweaking in conversation until your indicator matches your strategy perfectly.

Nail Price Action Setups

Plots pin bars, engulfings with alerts – spot reversals early, get phone notifications, and trade high-probability moves without constant chart watching.

How It Works

From idea to working code in three simple steps

1

Describe It

Tell the AI exactly what you want your price action indicator to do. Plain English, no code knowledge needed.

2

Generate & Fix

AI writes the code and auto-compiles it. Any errors are fixed automatically before you see it.

3

Copy & Trade

One-click copy. Paste into TradingView or MT5. Your price action indicator is live in under a minute.

Try It Now — It's Free

See What You'll Get

Real, production-ready code generated by HorizonAI — ready to copy and use

Price action indicator — Pine Script

This indicator identifies pin bar and engulfing patterns with customizable thresholds, plotting clear signals on charts and triggering alerts to help you catch reversals early for higher-probability trades.

Pine Script
//@version=5
indicator("Price Action Indicator", shorttitle="PA Signals", overlay=true)

// Input parameters for customization
body_threshold = input.float(0.3, "Body Size Threshold %", minval=0.05, maxval=0.5, step=0.05, tooltip="Smaller body % for pin bars")
wick_threshold = input.float(0.6, "Wick Threshold %", minval=0.5, maxval=0.9, step=0.05, tooltip="Minimum wick size relative to candle range")
show_pinbars = input.bool(true, "Show Pin Bars", group="Price Action Signals")
show_engulfing = input.bool(true, "Show Engulfing Patterns", group="Price Action Signals")
use_alerts = input.bool(true, "Enable Alerts", group="Alerts")

// Candle calculations
candle_range = high - low
body_size = math.abs(close - open)
body_pct = candle_range > 0 ? body_size / candle_range : 0
upper_wick = high - math.max(open, close)
lower_wick = math.min(open, close) - low
upper_wick_pct = candle_range > 0 ? upper_wick / candle_range : 0
lower_wick_pct = candle_range > 0 ? lower_wick / candle_range : 0

// Bullish Pin Bar: small body, long lower wick, small upper wick
bull_pinbar = body_pct < body_threshold and lower_wick_pct > wick_threshold and upper_wick_pct < 0.1

// Bearish Pin Bar: small body, long upper wick, small lower wick
bear_pinbar = body_pct < body_threshold and upper_wick_pct > wick_threshold and lower_wick_pct < 0.1

// Bullish Engulfing: current bullish candle engulfs prior bearish body
bull_engulf = close > open and open[1] > close[1] and open < close[1] and close > open[1] and body_size > body_size[1]

// Bearish Engulfing: current bearish candle engulfs prior bullish body
bear_engulf = close < open and open[1] < close[1] and open > close[1] and close < open[1] and body_size > body_size[1]

// Visual plots
plotshape(show_pinbars and bull_pinbar, title="Bull Pin Bar", style=shape.triangleup, location=location.belowbar, color=color.new(color.green, 0), size=size.small, text="Pin↑")
plotshape(show_pinbars and bear_pinbar, title="Bear Pin Bar", style=shape.triangledown, location=location.abovebar, color=color.new(color.red, 0), size=size.small, text="Pin↓")
plotshape(show_engulfing and bull_engulf, title="Bull Engulf", style=shape.circle, location=location.belowbar, color=color.new(color.lime, 0), size=size.tiny, text="Eng↑")
plotshape(show_engulfing and bear_engulf, title="Bear Engulf", style=shape.circle, location=location.abovebar, color=color.new(color.orange, 0), size=size.tiny, text="Eng↓")

// Background highlight for stronger signals
bgcolor(bull_pinbar ? color.new(color.green, 90) : na, title="Bull Pin BG")
bgcolor(bear_pinbar ? color.new(color.red, 90) : na, title="Bear Pin BG")

// Alert conditions
if use_alerts
    if bull_pinbar
        alert("Bullish Pin Bar detected at " + str.tostring(close), alert.freq_once_per_bar)
    if bear_pinbar
        alert("Bearish Pin Bar detected at " + str.tostring(close), alert.freq_once_per_bar)
    if bull_engulf
        alert("Bullish Engulfing pattern at " + str.tostring(close), alert.freq_once_per_bar)
    if bear_engulf
        alert("Bearish Engulfing pattern at " + str.tostring(close), alert.freq_once_per_bar)

alertcondition(bull_pinbar, "Bull Pin Bar Alert", "Price Action: Bullish Pin Bar formed!")
alertcondition(bear_pinbar, "Bear Pin Bar Alert", "Price Action: Bearish Pin Bar formed!")
alertcondition(bull_engulf, "Bull Engulf Alert", "Price Action: Bullish Engulfing!")
alertcondition(bear_engulf, "Bear Engulf Alert", "Price Action: Bearish Engulfing!")

This is just one example. Generate any indicator or strategy you can imagine.

Generate Your Own Code
"I was sick of YouTube strategies showing pin bars but their code always errored out or repainted. HorizonAI gave me a custom price action indicator in 25 seconds – now alerts hit my phone on bull pins at key levels, and I've caught 3 solid reversals this week alone. Game-changer for busy trading."
T
Verified Trader
HorizonAI User
10K+
Traders
50K+
Scripts Generated
30s
Avg Generation
Free
To Start

Frequently Asked Questions

Everything you need to know to get started

Will the price action indicator code actually work?

Absolutely – HorizonAI's built-in compiler auto-checks and fixes all errors before you get the code, ensuring it runs flawlessly in TradingView. Over 20,000 scripts generated for 5,000+ traders, zero broken deliveries. Your price action signals go live without a hitch.

How is this different from asking ChatGPT?

HorizonAI is trained specifically on Pine Script docs and trading strategies, plus it has an auto-compiler that catches and fixes errors ChatGPT misses. Generic AIs spit out broken code full of syntax issues; HorizonAI delivers working price action indicators instantly. Traders trust it for reliability.

Can I customize the price action indicator after generating it?

Yes, it's a full chat interface – just reply 'Add divergence filter' or 'Only show pins near EMAs' and it iterates instantly. Refine thresholds, add alerts, or combine with SuperTrend in conversation. Perfect for your unique price action strategy.

How long does it take to get my price action indicator code?

Under 30 seconds from description to copy-ready code. Type your idea, AI generates and auto-fixes, one-click paste into TradingView – done. Beats learning Pine Script (weeks) or hiring freelancers (days) every time.

Is HorizonAI free?

Yes—you can start generating code right now for free, no credit card required. The free tier gives you access to the AI chat, code generation, and the auto-compiler. Over 5,000 traders are already using it.

Ready to Build Your Trading Tools?

Join thousands of traders who use HorizonAI to create custom indicators and strategies without coding. Start free today.

Start Building — It's Free

No credit card required. Free forever plan available.

Related Guides