OPEN-SOURCE SCRIPT

Harish Algo 2

The script "Harish Algo 2" is a Pine Script-based TradingView indicator that automatically identifies significant trendlines based on fractal points and tracks price interactions with those trendlines. Key features include:

Fractal Detection: The script identifies fractal highs and lows, using a configurable fractal period, to serve as pivot points for generating trendlines. Fractal highs are marked in blue, and fractal lows are marked in red.

Dynamic Trendlines: It draws trendlines between consecutive fractal points, with a limit on the maximum number of active trendlines. The trendlines can be extended either in both directions or to the right, as per user input. The line width can also be customized.

Support/Resistance Counting: Each trendline tracks how many times the price interacts with it. If the price approaches the line from above and touches or stays near it, the line is considered a support. If the price approaches from below, it is considered a resistance. These counts are used to modify the trendline's color and appearance.

Trendlines with 2 support interactions turn green.
Trendlines with 2 resistance interactions turn red.
Trendlines with 3 or more interactions turn black.
Trendline Styling: Trendlines that extend over a long period (more than 100 bars) change to a dotted style to highlight their persistence.

Break Detection: The script monitors if the price crosses a trendline, signaling a potential breakout or breakdown. Once a trendline is broken, it stops extending further.

Trendline Removal: The script ensures that only a limited number of trendlines are active at a time. If the maximum number of trendlines is reached, the oldest trendline is removed to make space for new ones.

This indicator is designed to help traders visualize important trendlines, spot potential support and resistance levels, and detect breakouts or breakdowns based on price movement.






Bands and Channels

Skript med en öppen källkod

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. Du kan ange den som favorit för att använda den i ett diagram.

Vill du använda det här skriptet i ett diagram?

Frånsägelse av ansvar