Strategy · Pine Script v4 · On the chart

Alex Days HiLo Rajib

by hasnocool· code credited to 14rajib

Alex Days HiLo Rajib tracks the highest high and lowest low over a customizable lookback period and overlays them directly on the price chart.

View on GitHub

GitHub stars106on the repository
Pine versionv4older, still runs
Lines of code16
Settings1inputs
LicenceGPL-3.0
Last update2 years ago18 Sep 2024

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 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

16 lines of Pine Script v4 from Alex Days HiLo Rajib.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.

Alex Days HiLo Rajib.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © 14rajib
//@version=4
strategy(title="Alex Days HiLo Rajib", overlay = true)
length = input(20)
hh = highest(high, length)
ll = lowest(low, length)
plot(hh[1], color=color.green, title="HH")
plot(ll[1], color=color.red, title="LL")
//bgColour = (high > hh) ? color.blue :
    // (low < ll) ? color.yellow :
    // na
//bgcolor(color=bgColour, transp=90)
plotshape(high>hh[1] ? hh + 5:na, color=#FF0000,location=location.absolute, style=shape.arrowdown)
plotshape(low< ll[1] ? ll-5: na, color=#00FF00, location=location.absolute, style=shape.arrowup)
Expand (21 lines)

Overview

When the current high exceeds the previous highest level, the script displays a signal arrow, and another arrow appears when price breaks below the previous lowest level. The lookback length is adjustable to suit different market speeds. The script is configured as a strategy without predefined stop-loss or take-profit rules.

Details

Published by

hasnocool on GitHub

Code credit

14rajib, as written in the script's header

Type

Strategy, Pine Script v4

Draws

On the price chart

Category

Breakout, Support & resistance

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • The strategy enters trades without a stop loss

Topics

analysisbtcusdtcryptocurrencydatapandaspythonsimulationtradingtradingview

Settings

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

SettingTypeDefaultVariable
lengthint20length
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

This trend-following strategy executes a classic Donchian channel breakout system designed to cross-validate backtest results against external framework benchmarks. It triggers a long entry when the closing price breaks above the highest high of the prior entr

Strategy v6 BreakoutTrend
Updated today · AGPL-3.0 GitHub repository of Forven S01509 - Simple Donchian 20/10 Breakout
257 stars

This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos

Strategy v6 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Best Chart 1m Strategy Candle Bar

STRG-HOLP

by harryguiacorn
219 stars

STRG-HOLP is a trading strategy that identifies High of Low Period (HOLP) and Low of High Period (LOHP) breakout setups. It tracks the lowest low or highest high over a user-defined lookback window. A long trade opens when the close breaks above the high of th

Strategy v5 BreakoutSupport & resistance
Updated 1 year ago · None stated GitHub repository of STRG-HOLP

This trend breakout strategy plots Donchian Channels consisting of upper, lower, and middle bands directly on the main price chart. Long positions enter when price touches the upper channel and pulls back to or below the middle band, placing a stop loss at the

Strategy v6 TrendBreakout
Updated 2 months ago · MPL-2.0 GitHub repository of Donchian Strategy - Dynamic TP, Fixed SL, 1% Risk, Daily Target
43 stars

This strategy trades SOL perpetual candles on the price chart. It tracks confirmed pivot highs and lows as support and resistance circles, then compares close with a smoothed filter and a three-period EMA to mark long and short conditions after the bar closes.

Strategy v5 Moving averagesSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of SOL 1m Strategy Candle Bar

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