TradingView
a_maxwell
13 de Fev de 2020 00:19

Legacy PSAR 

TESLA INCBMV

Descrição

This indicator is a porting to the new Pine scripting language from TradingView, leveraging the old official TradingView's Java-based SAR indicator. The accuracy of their new and current official algorithm is being disputed, behavior changed in february 2020 and there's a fundamental flaw in implementation.

Notas de Lançamento

Alert conditions added for reversals.

Notas de Lançamento

Fixed alert trigger conditions.

Notas de Lançamento

Final testing of alert conditions.

Notas de Lançamento

Low limit for "Max Value" decreased from 0.1 to 0.05.

Notas de Lançamento

Reversals cannot happen on previous SAR == current SAR, this is a high chance of double-top or double-bottom and create a false positive signal. Now reversals can only happen on current SAR greater-than or less-than previous SAR.

Notas de Lançamento

Usability and presentation improvements:
  • All parameters can move in increments of 0.01 through the increase/decrease buttons
  • maxValue parameter range now goes from 0.01 to 1.0
  • Default thickness of the plot is now 1
Comentários
Gouws199
Hey a_maxwell! Any chance you could point me towards the formula you are using for this legacy version of the psar? Would really appreciate it. Thank you 👌
a_maxwell
Hi @Gouws199, there are several variables and if blocks, but some of the main calculated values go like this:

if(closePrev >= closeCurr)
maxMin = max(highLast, highPrev)
else
maxMin = min(lowLast, lowPrev)

acceleration = min(acceleration + increment, maxValue)
currentSar = previousSar + acceleration * (maxMin - previousSar)
Mais