TradingView
QuantNomad
18 Ara 2019 13:09

Parabolic SAR Strategy (on close) [QuantNomad] 

Bitcoin / TetherUSBinance

Açıklama

Created a Parabolic SAR strategy where price has to close under/above the level before for it to reverse. This way it should be a bit more stable and protect you from false breakouts.
It was impossible to adjust the built-in "sar" function so I implemented PSAR from scratch. So if you're interested in how it's work inside you can check the code and probably adjust to your need if you have a custom modification of PSAR in your mind.

Sürüm Notları

Added "Entry on Nth trend bar" parameter. Now you can specify on which trends bar do you want to reverse position. That can help you to filter out noice and skip 1-2 bars trends.
Yorumlar
benben20
Hello @QuantNomad , there are some circles instead of crosses sometimes, what does that mean please ?
And these circles tend to move from one cross to the next one.

Thanks
trendpuppy
Hi @QuantNomad is it possible to add a stop loss and take profit % as an option to exit this strategy? If so, can you point me in the right direction for this?
ArgosyExponential
hmmm study based on this gives a repaint warning, any reason for that?
schillsm
Hi, Thanks for creating the on close option. I have used the InteractiveBrokers PSAR study that is also based on close for several years. As I transition to TradingView I noticed that eventhough the settings on both systems are the same (.02 and .2) the QuantNomad PSAR moves significantly more between each candle than the InteractiveBrokers PRAR. I compared the changes in the PSAR values on my Nasdaq futures chart, the first PSAR value after a trend reversal were identical at 15,416.75 but the next value on a 2 minute chart dropped 2.75 on my TradingView versus 1.20 on my IB chart and the second candle dropped 1.75 versus 1.15 on IB. This can cause the the change of direction to happen several candles earlier. Having witnesses the price battle that happens at the InteractiveBrokers PSAR triggering candles I would like to have the TradingView system work similar to the IB.

Any sugestions on how I can address this, I don't currently have access to the IB PSAR code.
Thanks
asparuh_nm
Hi @QuantNomad , Thanks for the strategy!
How should the script look if we want to use strategy.entry with strategy.exit?
JoelMeal
Does this repaint? When I go to add an alert is warns me this indicator will repaint
QuantNomad
@JoelMeal, I don't think so, let me know if you'll spot repaining
saisn
@QuantNomad, Hello, This indicator is repainting. Can you check and resolve this issue please
dev8125
@QuantNomad, this indicator seems to repaint due to the fact it plots an entry at the start of the backtesting period and can’t take into account past historical bars. Is there a possible fix for this?

PS thanks for sharing your work love this indicator other than this issue
PivitolAve
Is there anyway to make a ray line come out at that arrow point so that they are easier to see?
Daha Fazla