TradingView
tantisch
21 de Mai de 2023 06:19

Trend lines 

AVAX / TetherUS PERPETUAL CONTRACTBinance

Descrição

This script aims to identify and plot trend lines and pivot points on a price chart, with the aim of facilitating technical analysis for trading.

The script allows users to configure a number of parameters including the period for Pivot Points, the maximum number of pivots, and the maximum number of trend lines.

Pivot points (local highs and lows in the price data) are identified using TradingView's built-in pivot high and pivot low functions. The identified pivot points are then stored in arrays. The script also optionally plots these points on the chart.

The main goal of the script is to find and plot trend lines based on the pivot points. For each pair of pivot points, it computes the slope of the line connecting them. If all the other pivot points are below this line (for downward trends) or above this line (for upward trends), the line is considered a valid trend line.

The script also includes a feature that suggests potential "buy" or "sell" points along the trend lines. When the price touches the trend line, a label indicating a potential trading action (buy or sell) is created on the chart.

Notas de Lançamento

fixed a problem where the line crosses the price and doesnt dissapear.

Notas de Lançamento

changed reference image

Notas de Lançamento

changes to make it a little bit faster

Notas de Lançamento

- removed signals because this indicator does not need them
- updated logic
- added different colors for lines
Comentários
tradeleblebi
Good work. Please add feature that min. number of touch
Soydiego
It looks great on you brother, don't change it anymore, it's perfect, excellent work, I'm comfortable with yours compared to others, thank you very much always
tantisch
@Soydiego, Thank you !
Almendro
I like it so far great work m8! :)
tantisch
@Almendro, thanks. just note that labels are not actual signals. but if you want to look at them, wait for the candle close to confirm the label (also if the line dissapears, signals connected to this line also dissapear. I might make this code better so that it keeps all signals but it will be later)
Almendro
@tantisch, Thanks for letting me know I use it together with Order Blocks it's great thanks again.
CryptoBullBear
Does it work at any level
maddurilaxmi7
rsi period-14
overbought=60,oversold=40
buy signal should be below bar and sell should above bar
*rsi should be overbought when price is taking support at trendline
*rsi should be oversold when price is taking Resisrance at trendline
Generate potential signals
add this conditions to the code and modify
could you please add this conditions in the code i tried i was unable to do it
tantisch
@maddurilaxmi7,
Hi. I currently don’t have a lot of time, but I am working on a separate indicator for signals. I hope it works out great and I will post in on TW.
(I also didn’t exactly understand what you mean. How rsi can be oversold if taking resistance at trendline, when rsi is oversold only if it it below threshold (usually 30). Maybe you mean another variable or something ?)
maddurilaxmi7
hi will that buy and sell signals show when price touches and reject trendline or else it will show potential entry point
Mais