TradingView
a_maxwell
13 Th02 2020 00:19

Legacy PSAR 

TESLA INCBMV

Mô tả

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.

Phát hành các Ghi chú

Alert conditions added for reversals.

Phát hành các Ghi chú

Fixed alert trigger conditions.

Phát hành các Ghi chú

Final testing of alert conditions.

Phát hành các Ghi chú

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

Phát hành các Ghi chú

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.

Phát hành các Ghi chú

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
Bình luận
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)
Thêm nữa