TradingView
LonesomeTheBlue
Apr 15, 2020 11:35 AM

Pivot Point Supertrend 

Bitcoin / U.S. DollarGemini

Description

Hello All,

There are many types of SuperTrend around. Recently I thought about a Supertrend based on Pivot Points then I wrote "Pivot Point SuperTrend" script. It looks it has better performance on keeping you in the trend more.

The idea is behind this script is finding pivot point, calculating average of them and like in supertrend creating higher/lower bands by ATR. As you can see in the algorithm the script gives weigth to past pivot points, this is done for smoothing it a bit.


As I wrote above it may keep you in the trend more, lets see an example:


As an option the script can show main center line and I realized that when you are in a position, this line can be used as early exit points. (maybe half of the position size)


While using Pivot Points, I added support resistance lines by using Pivot Point, as an option the script can show S/R lines:


And also it can show Pivot Points:


When you changed Pivot Point Period you can see its reaction, in following example PP period is 4 (default value is 2). Smaller PP periods more sensitive trendlines.


Alerts added for Buy/Sell entries and Trend Reversals. (when you set alerts use the option "Once Per Bar Close")



ENJOY!

Release Notes

Coding improved
Added explanation

Release Notes

updated
Comments
IN_credible
I'd just like to say that this tool is extremely clever and useful if used correctly. Excellent job! I'm not familiar with coding at all, but would it be possible to have a higher time frame super trend within a lower time frame? For example, a 15m super trend into a 5m chart.
tothemoon1613
@IN_credible, hey there, Can you give us some example or guides on how to use the script correctly?
IN_credible
@tothemoon1613, I have my own personal way of using this indicator which works well for me. Sorry I misspoke. What I meant is it's great to use within your own set of confluences.
sahall215
@IN_credible, I am going to try this indicator on a Ratio chart of TQQQ/SQQQ, along with MA, PSAR and MACD. Regression channel tool could also be helpful for finding reversals.
PineCoders
LonesomeTheBlue
@PineCoders, Thank you!
jrm-007
@LonesomeTheBlue,

Hi, great strategy and code. A simple question, can I plot these levels using a spreadsheet rather than relying on tradingview?
robertttme
@LonesomeTheBlue, Hey , how exacly does the Alerts works , lets say if ive AMC on the chart and add the indicator will give me a an alert when the supertrend apperars wiuthout me setting nothing ?
And the main question , if i change the stock from AMC to Tesla do i need to do something for the alerts again , or the alerts will sound?
Malebza_Da_Trading_Monk
@robertttme, following
similarSalami18373
Well Done! Going to port this logic over to a python script im working on.
More