OPEN-SOURCE SCRIPT
Advanced PSAR v1 [wm]

A port off Dennis Meyers Advance PSAR outlined in Stocks and Commodities V13:4
The shape, slope and speed of the SAR is controlled by three parameters: the starting acceleration factor (AF), the increment that the AF can change when a new price high or low is made, and the maximum AF. Because of the way the SAR is calculated, the shape of the SAR curve resembles a parabola - hence its name.
Most software packages only allow the user to vary the AF increment and the AF maximum, fixing the starting AF at 0.02. This restriction hampers the trend-following abilities of the parabolic.
Frequently as the SAR hugs the price curve, it is penetrated by a price bar by a minuscule amount, causing the SAR to generate an opposite signal. The price then immediately turns around and resumes going in the direction it was going before this penetration occurred, causing a costly whipsaw loss.
Many of the whipsaw losses are caused by noise or randomness in the price series. Thus, if the SAR is to represent the trend of a real price series, it must have the capability to ignore penetrations of noise level amounts. To this end, I have modified the parabolic SAR formula to include a variable that allows the SAR not to reverse unless penetrated by a defined amount. This new parameter is defined as ‘XO Increment’ for crossover increment
This version is configured for pips. If using on other assets with much larger values should be used. Also note the starting values have not been optimised. Should users of this script find good values please comment and share with the community if you could
The shape, slope and speed of the SAR is controlled by three parameters: the starting acceleration factor (AF), the increment that the AF can change when a new price high or low is made, and the maximum AF. Because of the way the SAR is calculated, the shape of the SAR curve resembles a parabola - hence its name.
Most software packages only allow the user to vary the AF increment and the AF maximum, fixing the starting AF at 0.02. This restriction hampers the trend-following abilities of the parabolic.
Frequently as the SAR hugs the price curve, it is penetrated by a price bar by a minuscule amount, causing the SAR to generate an opposite signal. The price then immediately turns around and resumes going in the direction it was going before this penetration occurred, causing a costly whipsaw loss.
Many of the whipsaw losses are caused by noise or randomness in the price series. Thus, if the SAR is to represent the trend of a real price series, it must have the capability to ignore penetrations of noise level amounts. To this end, I have modified the parabolic SAR formula to include a variable that allows the SAR not to reverse unless penetrated by a defined amount. This new parameter is defined as ‘XO Increment’ for crossover increment
This version is configured for pips. If using on other assets with much larger values should be used. Also note the starting values have not been optimised. Should users of this script find good values please comment and share with the community if you could
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.