Indicator · Pine Script v5 · On the chart

TP 8 Lines

by XingHan98

This TradingView indicator draws daily support and resistance lines for gold (XAU/USD) at 08:00 Singapore time on weekdays, based on the price action of the 5-minute candle closing at 08:00.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code243
Settings25inputs
LicenceNone stated
Last update2 months ago2 Aug 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

TP 8 Lines also plots three ATR-based take-profit levels per side, computed as the resistance for buys and support for sells. The script includes a manual mode for loading levels from Telegram signals and a predicted mode that automatically computes entries and TPs using H1 ATR. It monitors price retests of these lines within configurable windows, sending alerts for potential fade entries on each side. Lines are reset daily at a specified hour and can be drawn with adjustable colors and widths.

Details

Published by

XingHan98 on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Support & resistance, Volatility & bands, Sessions & time

Markets

Gold

Timeframes

M15-H1

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.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Manual TP levels (from today's Telegram signal)booltrueuseManual
Signal string from the bridge (buy|tp,tp,tp|sell|tp,tp,tp)stringsigStr
BUY TP1,TP2,TP3 (when string empty)string4146,4160,4178buyTPsStr
SELL TP1,TP2,TP3 (when string empty)string4105,4091,4077sellTPsStr
BUY entry line (0 = none; drawn only)float0manBuyEnt
SELL entry line (0 = none; drawn only)float0manSellEnt
Manual mode: daily reset hour (SGT)int8resetHour
Session 1 hour (SGT)int8amHour
Session 2 hour (SGT)int19pmHour
H1 ATR lengthint14atrLen
Buy entry offset (P +)float1buyOff
Sell entry offset (P +)float-6sellOff
Show all 25 settings
SettingTypeDefaultVariable
Buy TP1 x ATRfloat1.11rb1
Buy TP2 x ATRfloat2.03rb2
Buy TP3 x ATRfloat2.81rb3
Sell TP1 x ATRfloat0.89rs1
Sell TP2 x ATRfloat1.70rs2
Sell TP3 x ATRfloat2.44rs3
Breakout buffer, % of level (InpRetestBufferPct)float0.05bufferPct
Retest window, minutes (0 = no limit)int60windowMin
SL & TP distance, USD (InpSigFadeUSD)float10.0fadeUsd
BUY side linescolorcolor.purplebuyColor
SELL side linescolorcolor.orangesellColor
Line length (hours)int11segHours
Entry line widthint2lineWidth
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

56 stars

This indicator marks forex trading sessions and opening ranges on the price chart. It can draw Sydney, Tokyo, Frankfurt, London, and New York session boxes or five- and fifteen-minute opening ranges, plus an optional opening channel and a day-open range. Day r

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Day Trading Booster by DGT

AM TBR — NQ Stats

by TamaraKGreen
46 stars

The AM TBR indicator calculates statistical levels for NQ futures using standard deviation. It plots a sigma ladder showing touch levels at 0.5 to 2.0 standard deviations, marks touch points, displays Mean Absolute Error (MAE) zones after touches, and shows Me

Indicator v6 Volatility & bandsSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of AM TBR — NQ Stats

LoD Intraday Entry

by ChartsLector
41 stars

This overlay indicator marks the current day's low and a suggested entry zone a fraction of daily ATR below that low. It compares daily volume with a volume moving average, plots daily SMA and EMA distance, and draws an optional ATR-width price cloud. Labels c

Indicator v6 Support & resistanceVolatility & bands
Updated 2 days ago · None stated GitHub repository of LoD Intraday Entry

Zen Toolkit ETH

by Zen-Tim
29 stars

This indicator plots intraday reference levels, projection targets, and opening range boundaries tailored for continuous electronic trading session instruments such as gold. It calculates Average Bar Range targets in bullish and bearish multiples, previous day

Indicator v6 Support & resistanceSessions & time
Updated 2 weeks ago · MIT GitHub repository of Zen Toolkit ETH

This indicator combines six trading tools into a single chart overlay to optimize indicator limits. It calculates Bollinger Bands, projects weekend price boundaries, plots market structure elements like order blocks, breaker blocks, and MSB lines, marks New Yo

Indicator v6 Support & resistanceSMC / ICT / price action Repaints

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