OPEN-SOURCE SCRIPT

Higher Timeframe High & Low [ChartPrime]

his is a Pine Script code for TradingView, specifically designed to display higher timeframe highs and lows on a chart. Here's a breakdown:


Features:

1. Displays higher timeframe highs and lows.
2. Optional trend line.
3. Breakout labels.
4. Extension lines for highs and lows.
5. Color-coded bars for trend direction.
6. Fill option for overbought/oversold zones.


Inputs:

1. extension: Number of bars to extend highs and lows.
2. timeframe: Higher timeframe to use.
3. separator: Show period separator.
4. show_trend: Display trend line.
5. show_break: Show breakout labels.


Variables:

1. pricehigh, pricelow, price_avg: Higher timeframe high, low, and average.
2. high_break, low_break: Breakout conditions.
3. check: Flag for breakout direction.
4. color, color1, colorDn, colorUp: Color variables.


Calculations:

1. Retrieves higher timeframe high and low using request.security.
2. Calculates average price.
3. Checks for breakouts.
4. Updates colors based on breakout direction.


Visuals:

1. Plots highs, lows, and average price.
2. Displays breakout labels.
3. Draws extension lines.
4. Colors bars based on trend direction.
5. Fills overbought/oversold zones.


To use this script:


1. Open TradingView.
2. Create a new indicator.
3. Paste the code.
4. Adjust inputs to suit your needs.
5. Add to chart.


Would you like me to explain any specific part of the code?
Bands and ChannelsBreadth Indicators

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité