TradingView
HoanGhetti
21 de Mar. de 2023 14:03

Pivot Trendlines with Breaks [HG] 

U.S. Dollar/Japanese YenFXCM

Descripción

🧾 Pivot Trendlines and Breaks
A script meant to debut and provide an example usage of the Simple Trendlines library using Pine Script's built-in pivot system.
tradingview.com/script/85fU3JnE-Simple-Trendlines/
In under 50 lines of code, with inputs, plots, styling, and alerts included we're able to create trendlines with a breakout system.

▶️ How it works
Calculating pivot points helps traders identify moments at which the market's attitude can shift from bullish to bearish. In the background, the script tracks pivot events for trendlines and uses a system that prevents any leakage between the trendlines before they are drawn.

⚫️ Settings
  • Pivot Length
  • Color Adjustments


⚫️ Alerts

Notas de prensa

Refactor
  • Runtime performance increase.

Notas de prensa

Added
  • Repaint options
  • More style options

Notas de prensa

Update
  • Maximum line display count is now set as default.
  • The indicator now features newly displayed target levels.

Notas de prensa

Add
  • More Input Options
  • Ability to choose an external source, giving the script a more "universal" feel. Users now have the freedom to choose the way they want their breakouts to be, with the "Use Source for Cross Detection" input.
  • Introducing an optional faster pivot system, the same one used in RSI Trendlines with Breakouts

Here's an example image of the script calculating trendlines with breaks on the TEMA. Now possible with this update.

While the code is no longer around 50 lines as stated in the main description, the indicator is structured and extended to provide developers with examples of how the Simple Trendlines library can be used.

Notas de prensa

Refactor
  • Removed old pivot system in favor of Pine Script's built-in pivot system. Leading to run-time performance increase and more accurate results.
Comentarios
Liemshuo
Hai.. can u make one more alert for both condition ? Buy and sell
semihinvestment
Hi, can you also add the trendline touch (not breakout) alerts for fast entry to the position ?
temel_reis
Hello. Thank you for this indicator. I wonder whether you may consider adding an option for number of historical trends to be displayed.
Hamster-Coder
Hello. Very useful indicator.
Please add following line in future versions to decrease amount of alerts.
Thank you :)
alertcondition((ta.change(cu) and cu) or (ta.change(co) and co), 'Breakout')
akrem_crypto
I use it as liquidity trend line its very useful
HoanGhetti
@akrem_crypto, glad it helps!
Zruz
gret work
HoanGhetti
@Zruz, appreciate it 👍
christianmlo
Have you had any success with a particular Pivot length number? any recommendations?
HoanGhetti
@christianmlo, I would personally stick to anything above or equal to 20. Can't recommend a specific number since all symbols are different, but there's less noise with a higher lookback range.
Más