TradingView
JohnBaron
14 ago 2018 15:14

Best Parabolic SAR Study and Strategy 

WTI CRUDE OILTVC

Descrizione

Custom built Parabolic Stop and Reversal (SAR)
Produces more responsive results.
Also included is an ATR based SAR which better indicates trend.
Long and short stops are marked on the chart and can be found in the style tab.
PSAR source is variable and is shown on the chart.
Trading source is variable, this is what is used to determine a change in direction against the calculate PSAR and for stops/reversals.
Access is open for now so long as I am getting constructive feedback. Thanks for trying it out!

Note di rilascio

A few bug fixes and improved Settings interface.
ATR based SAR is a separate strategy than PSAR.
They are not combined buy/sell. It's one or the other but both are visible.

Note di rilascio

Few more fixes.
Allow to remove date limitation. A date limit was placed so as not to exceed order limit. This is going to cause a problem as the calendar moves forward, so added the option to remove it.
In a future version I will eliminate date restrictions entirely.

Note di rilascio

Updated
- eliminating time bound and replacing with max_bars_back
- enhanced the psar equation

I encourage you to compare this with the built in PSAR Strategy.
Trading % is hurt by low volume chop but overall profitable with the right settings.
I shared in the settings dialog where you should begin the tuning (the default is set to my liking and time frame).
My recommendations on how to tune. Set the Start to the lowest level. Set the Maximum to a reasonably high level (where it won't be reached).
Tune the increment, then loop back and tune the Maximum and then finally the Start. So the steps are.
1. Start to minimum
2. Maximum to 1.0 or some level not likely reached.
3. Tune increment.
4. Tune Maximum
5. Tune Start.
6. A final pass on increment.

-

Note di rilascio

With some feedback
- added visuals on the chart to help understand the various markers
- added buy/sell labels
If you set trading on you will get the TV trade execution. TV executes 1 candle after the trigger in history, going forward it will also wait for 1 bar after trigger unless "recalc on tick" in properties is turned on.

Note di rilascio

Significant update.
This is a self tuning PSAR .
The PSAR is best used in small time frame.
The Price Tracker is the line that is used to determine cross over, and if using visually, should be used for setting reversal stops.
A little bit about how it works.
It is set to use the ATR to determine the increments (increment being the traditional PSAR setting), and to determine the maximum increment.
The one adjustment left open is what tunes the maximum increment. The higher the value the sooner the maximum is reached.
In traditional PSAR once the maxium increment is reached it becomes constant, not so in this model. Once the maximum is reached it will continue to vary but on it's own and at the maximum possible.

If you used the one I am replacing here - sorry, it's not coming back. I published the original as a strategy. In order to replace it, this too is a strategy but it will not back test or simulate orders, there are simple markers on the chart for Buy and Sell.

I hope you find it profitable, my personal experience is that price action is king for day trading. Feedback is always welcome.

Note di rilascio

Made one update. I coded this to WTI, there was a scaling issue with other instruments.
+ With ES index use multiples of 10 (example shown is at 50)
+ With WTI, the default of 1 is used, use multiples of 1 to adjust sensitivity
+ With Currency use multiples of 0.01

I will look to make this easier, but this should address the problems reported.

Note di rilascio

Updated to automate the scaling problem with different instruments.
Sensitivity is simpler and can be set to suit your trading style.

For those looking for the older PSAR, I will refresh it and post it as well, later.
Commenti
JohnBaron
This is tuned for 2min only, I suggest tuning ATR then tuning PSAR settings for different time frames.
JohnBaron
@JohnBaron, i showed an overlay of standard SAR so the difference is visible
KMW
Good one, been looking at and using Sar lately, ATR version seems a lot easier to follow. I have it on five minute with your settings, still good
xuinkrbin
Is the source code of the script available for review?
JohnBaron
@xuinkrbin, i have not looked at it in a while - but not right now.
xuinkrbin
@JohnBaron, what needs to be done to change its availability?
kartheekchinta
Hi john.I found in day frame it was repainting.is there any setting for not to get repainted.or suggest me for settings change if required for not get repainted.
kartheekchinta
Hi bro How can I get psar signal in time?can you suggest me.
tuunbaq
Great work ! Thanks for sharing. Is it possible to backtest in Tradingview ? Backtest didn't work for me, I maybe doing something wrong. Any advices on that ?
tuunbaq
Hi ! Thanks for the great indicator/strategy and work put into it !
Have you been able to back test (deep) with TV, I couldn't do it. I wonder is it me or the script.
Regards and thanks again in advance.
Altro