Indicator · Pine Script v6 · On the chart

PA Trade Overlay

by Enesp4rl4k

This script plots horizontal trade plan levels generated by an external trade assistant directly onto the price chart.

View on GitHub

GitHub stars7on the repository
Pine versionv6current
Lines of code79
Settings0inputs
LicenceMIT
Last update5 days ago23 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

79 lines of Pine Script v6 from scripts/_pa_overlay.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

_pa_overlay.pine
//@version=6
// =============================================================================
// PA Trade Overlay — entry / stop / take-profit levels from MCP trade plan.
//
// Placeholders filled by render_pine_recipe:
//   BINANCE:BTCUSDT           — e.g. "XAUUSD" (display only)
//   long        — "long" or "short"
//   67225.38            — entry price
//   66618.02039871             — stop loss price
//   74101.166              — first target (0 if unused)
//   73706.215              — second target (0 if unused)
//   1.0         — risk per trade % of equity
//   0.2975            — position size (display)
//   11.32      — best R:R (display)
//   2026-06-03       — YYYY-MM-DD snapshot
// =============================================================================
indicator("PA Trade — BINANCE:BTCUSDT long (2026-06-03)", overlay = true,
          max_lines_count = 10, max_labels_count = 10)

entryPx  = 67225.38
stopPx   = 66618.02039871
tp1Px    = 74101.166
tp2Px    = 73706.215
riskPct  = 1.0
units    = 0.2975
bestRR   = 11.32
isLong   = "long" == "long"

var line entryLine = na
var line stopLine  = na
var line tp1Line   = na
var line tp2Line   = na

if barstate.isfirst
    entryLine := line.new(bar_index, entryPx, bar_index + 1, entryPx,
         xloc = xloc.bar_index, extend = extend.right,
         color = color.new(color.blue, 0), width = 2, style = line.style_solid)
    stopLine := line.new(bar_index, stopPx, bar_index + 1, stopPx,
         xloc = xloc.bar_index, extend = extend.right,
         color = color.new(color.red, 0), width = 2, style = line.style_dashed)
    if tp1Px > 0
        tp1Line := line.new(bar_index, tp1Px, bar_index + 1, tp1Px,
             xloc = xloc.bar_index, extend = extend.right,
             color = color.new(color.green, 0), width = 2, style = line.style_dotted)
    if tp2Px > 0
        tp2Line := line.new(bar_index, tp2Px, bar_index + 1, tp2Px,
             xloc = xloc.bar_index, extend = extend.right,
             color = color.new(color.teal, 0), width = 1, style = line.style_dotted)

    label.new(bar_index, entryPx, "ENTRY " + str.tostring(entryPx, format.mintick),
         style = isLong ? label.style_label_up : label.style_label_down,
         color = color.new(color.blue, 20), textcolor = color.white, size = size.small)
    label.new(bar_index, stopPx, "STOP " + str.tostring(stopPx, format.mintick),
         style = isLong ? label.style_label_down : label.style_label_up,
         color = color.new(color.red, 20), textcolor = color.white, size = size.small)
    if tp1Px > 0
        label.new(bar_index, tp1Px, "TP1 " + str.tostring(tp1Px, format.mintick),
             style = label.style_label_left, color = color.new(color.green, 30),
             textcolor = color.white, size = size.small)
    if tp2Px > 0
        label.new(bar_index, tp2Px, "TP2 " + str.tostring(tp2Px, format.mintick),
             style = label.style_label_left, color = color.new(color.teal, 30),
             textcolor = color.white, size = size.small)

var table info = table.new(position.top_right, 2, 5, bgcolor = color.new(color.black, 80))
if barstate.islast
    table.cell(info, 0, 0, "Risk", text_color = color.gray, text_size = size.small)
    table.cell(info, 1, 0, str.tostring(riskPct) + "%", text_color = color.white, text_size = size.small)
    table.cell(info, 0, 1, "Units", text_color = color.gray, text_size = size.small)
    table.cell(info, 1, 1, str.tostring(units, "#.####"), text_color = color.white, text_size = size.small)
    table.cell(info, 0, 2, "Best R:R", text_color = color.gray, text_size = size.small)
    table.cell(info, 1, 2, str.tostring(bestRR, "#.##"), text_color = color.white, text_size = size.small)
    table.cell(info, 0, 3, "Bias", text_color = color.gray, text_size = size.small)
    table.cell(info, 1, 3, "long", text_color = isLong ? color.lime : color.orange, text_size = size.small)
    table.cell(info, 0, 4, "As of", text_color = color.gray, text_size = size.small)
    table.cell(info, 1, 4, "2026-06-03", text_color = color.white, text_size = size.small)

alertcondition(ta.cross(close, entryPx), title = "PA Entry touch", message = "Price touched entry level")
alertcondition(ta.cross(close, stopPx), title = "PA Stop touch", message = "Price touched stop level")

Overview

PA Trade Overlay draws visual lines and text labels for entry, stop-loss, and up to two take-profit targets based on template parameters. Additionally, it displays a top-right info table showing trade risk percentage, position units, and target risk-reward ratios. The indicator acts as a visual trade plan viewer and does not calculate technical levels dynamically from price data.

Details

Published by

Enesp4rl4k on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Support & resistance, Screeners & dashboards

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

bistborsa-istanbulclaudeevdsfinancellmmcpmodel-context-protocolpine-scriptpython

Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

575 stars

This overlay indicator scans a pasted list of symbols for ICT liquidity sweep patterns using prior swing sweeps. The screening method looks back one, two, or three swings and can list long and short signals in a results table with adjustable rows, position, an

Indicator v5 SMC / ICT / price actionScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Liquidity Sweep Pattern Scanner
330 stars

This indicator monitors multiple cryptocurrency symbols for trading signals. It calculates and plots entry prices, take profit, and stop loss levels for each symbol including BTCUSDT, ETHUSDT, BNBUSDT and others. Price crossovers trigger buy, sell or close ale

Indicator v5 Support & resistanceScreeners & dashboards
Updated 2 months ago · None stated GitHub repository of Multi Alert Long/Short [Alorse]

BZ-tracker

by Allen1212
303 stars

The BZ-tracker indicator marks ARK Invest buy and sell transactions on stock charts with labels. It plots green labels for purchases and red labels for sales, each annotated with a multiplier such as X1 or X2 to show the number of ARK ETFs trading the stock on

Indicator v4 Support & resistanceScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of BZ-tracker
257 stars

This indicator overlays an intraday SPX and ES chart with a midnight session range, regular-trading-hours opening levels, and a VWAP projection box. It draws the midnight high, mid, and low, flags edge rejections within an absolute tolerance, and plots optiona

Indicator v6 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of SPX Midnight Box + Snag Logic

Golden Bullet Strategy

by TradersPost
218 stars

The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh

Indicator v6 SMC / ICT / price actionSessions & time
Updated 3 months ago · None stated GitHub repository of Golden Bullet Strategy

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers