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

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำจำกัดสิทธิ์ความรับผิดชอบ