OPEN-SOURCE SCRIPT
Pullback Historical Data

Indicator Description: Dados-historico-Pullback
This indicator identifies pivot points (local support and resistance levels) on the chart based on a user-defined period. It calculates the difference between the last found resistance and support levels, displaying this current difference as well as its historical maximum and minimum values.
How to use:
Pivot Period:
Adjust the "Pivot Period" parameter to define how many bars before and after the indicator should look for a pivot point (high or low).
A higher value makes the pivot more conservative, finding stronger and more spaced pivots.
A lower value detects more frequent pivots, sensitive to quick market moves.
Label and Text Color:
You can customize the background color of the label and the text color for better visibility on the chart.
Label Size:
The indicator offers four label sizes:
XS (Extra Small): small label to save space.
S (Small): compact and readable size.
M (Medium): default size, a balance between readability and space.
L (Large): bigger label for more emphasis.
If you choose an invalid value, the default M (Medium) size will be used automatically.
Example to adjust the Pivot Period:
Setting the Pivot Period to 3 means the indicator will look for pivots within 3 bars before and after each point. This produces many pivots, including smaller ones and noise. It’s useful for fast trades or scalping.
Setting it to 10 means the indicator looks for pivots farther apart, producing fewer signals but more significant ones, suitable for more conservative analysis.
I recommend starting with a middle value like 5 and testing how the indicator behaves on your chart. Then adjust up or down depending on your trading style and timeframe.
This indicator identifies pivot points (local support and resistance levels) on the chart based on a user-defined period. It calculates the difference between the last found resistance and support levels, displaying this current difference as well as its historical maximum and minimum values.
How to use:
Pivot Period:
Adjust the "Pivot Period" parameter to define how many bars before and after the indicator should look for a pivot point (high or low).
A higher value makes the pivot more conservative, finding stronger and more spaced pivots.
A lower value detects more frequent pivots, sensitive to quick market moves.
Label and Text Color:
You can customize the background color of the label and the text color for better visibility on the chart.
Label Size:
The indicator offers four label sizes:
XS (Extra Small): small label to save space.
S (Small): compact and readable size.
M (Medium): default size, a balance between readability and space.
L (Large): bigger label for more emphasis.
If you choose an invalid value, the default M (Medium) size will be used automatically.
Example to adjust the Pivot Period:
Setting the Pivot Period to 3 means the indicator will look for pivots within 3 bars before and after each point. This produces many pivots, including smaller ones and noise. It’s useful for fast trades or scalping.
Setting it to 10 means the indicator looks for pivots farther apart, producing fewer signals but more significant ones, suitable for more conservative analysis.
I recommend starting with a middle value like 5 and testing how the indicator behaves on your chart. Then adjust up or down depending on your trading style and timeframe.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.