Strategy · Pine Script v4 · On the chart

Time PriceZones Strat Testing

by codybbrown

This strategy calculates higher-timeframe price levels and multi-timeframe Bollinger Bands to identify price zone interactions directly on the main chart.

View on GitHub

Repaints

GitHub stars2on the repository
Pine versionv4older, still runs
Lines of code160
Settings26inputs
LicenceNone stated
Last update3 years ago11 Apr 2023

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 strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

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

Time PriceZones Strat Testing uses daily source prices and 240-minute Bollinger Bands, styling them with dynamic gradient coloring based on proximity. Trade management settings include fixed profit target levels and trailing stop distances in pips or points. Historical calculations use higher-timeframe data with lookahead enabled without bar offsets, causing historical signals to look ahead and repaint relative to real-time execution.

Details

Published by

codybbrown on GitHub

Type

Strategy, Pine Script v4

Draws

On the price chart

Category

Volatility & bands, Support & resistance

Markets

Any symbol

Timeframes

M15-H1

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)
  • Reads higher-timeframe data with lookahead on, so the history can show signals that were not there in real time

Topics

momentum-trading-strategypinescripttrading-strategiestradingviewvolatility-tradingtrading-indcators

Settings

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

SettingTypeDefaultVariable
Signal Sourcesourceclosesig
Source 1sourcehighsrc1
Source 2sourcelowsrc2
Timeframe 1timeframeDres1
Timeframe 2timeframeDres2
BB Timeframetimeframe240resBB
BB Deviation Multfloat2.0devBB
BB lengthint10lenBB
Percent Range 1float0.0004prc1
Percent Range 2float0.0004prc2
Show Source 1boolfalsevis_1
Show Source 2boolfalsevis_2
Show all 26 settings
SettingTypeDefaultVariable
Show BBbooltruevisBB
Start Yrint2021ts_Yr
Start Moint7ts_Mo
Start Dayint10ts_Day
Start Hrint0730ts_Hr
End Yrint2021te_Yr
End Moint7te_Mo
End Dayint21te_Day
End Hrint16te_Hr
Show 1booltruevis_sig0
Show 2booltruevis_sig1
Show 3booltruevis_sig2
Profit Target (Pips/Points)int4000profit_target
Trailing Stop Distance (Pips/Points)int1000trailing_stop_dist
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

257 stars

This overlay strategy is built for ES futures on the one-minute chart. It plots a volume-weighted moving average of price opens and standard-deviation bands at Fibonacci ratios, plus a second longer volume-weighted average from a higher-timeframe open. Call an

Strategy v5 Volatility & bandsMoving averages
Updated 6 weeks ago · None stated GitHub repository of ES Futures 1M No Repaint

Daily Bias + FVG Strategy

by TradersPost
218 stars

This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto

Strategy v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Daily Bias + FVG Strategy
106 stars

This overlay strategy plots a two-timeframe Ichimoku setup on the price chart, with Tenkan, Kijun, Chikou, and Kumo from a base higher timeframe and an optional highest-timeframe cloud. It allows two entries in the same direction and uses ATR-based trailing st

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of 2Tier Ichimoku Pyramiding [Takazudo]

KC15

by benso87
24 stars

KC15 is a price-chart strategy that configures two moving averages, a Bollinger Band Width Percentile filter, and PMARP entry and exit thresholds for long and short trades. Users can switch each average between SMA and EMA, set lengths and colors, and toggle l

Strategy v5 Moving averagesVolatility & bands
Updated 4 years ago · MPL-2.0 GitHub repository of KC15

This strategy implements a multi-stage trend following system inspired by John W. Seykota. It generates long and short entries when price breaks above or below Donchian channels of specified length. Each entry adds a unit sized to risk a fixed percentage of cu

Strategy v6 TrendVolatility & bands
Updated 11 months ago · None stated GitHub repository of Seykota Alt 29: Multi-Stage Scaling
11 stars

Calculates upper and lower Donchian Channel bands over a customizable lookback length and plots them on the main price chart. At a specified exchange hour, the strategy places a long buy stop order at the upper Donchian Channel level. Unfilled pending orders a

Strategy v6 BreakoutSupport & resistance
Updated 5 months ago · Apache-2.0 GitHub repository of Estrategia Donchian Breakout

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers