Return value of the SAR parabolic indicator.
Syntax:
1 |
SAR[At,St,Lim] |
Calculation :
SAR points are calculated from both prices and time.
The parameters are the initial acceleration factor (typically 0.02), the addition factor (typ. 0.02) and the acceleration factor limit (typ. 0.2).
Interpretation :
‘Stop And Reverse’ points are useful to detect trends as they follow the price direction.
SAR direction is always the same during a trend. The trend continues while the points stay above or below the prices. When prices penetrate a ‘stop and reverse’ point, a signal is given for you to liquidate your current position and maybe take the opposite position.
Example:
1 2 3 4 5 6 7 8 9 |
i1 = SAR[0.02,0.02,0.2] if(close[1]<i1[1] AND close>i1) THEN signal = 1 ELSE signal = 0 ENDIF RETURN signal |
Hello, please can you tell me how you would code the stop and reverse point you mention into ProRealTime?
Some discussion about the SAR formula and code here: https://www.prorealcode.com/topic/parabolic-sar-code/