Dukascopy
 
 
Wiki JStore Search Login

Numerical instability in Parabolic SAR indicator
 Post subject: Numerical instability in Parabolic SAR indicator Post rating: 0   New post Posted: Mon 19 Aug, 2013, 06:53 

User rating: 1
Joined: Fri 02 Aug, 2013, 12:45
Posts: 6
Location: ItalyItaly
Dear Support,
After noticing some strange behaviors when I run my Parabolic SAR based strategy, I built a simple strategy that only draw SAR indicator on the chart at onStart and then draw a cyan dot where the IIndicator.sar() price sould be at every onBar (the code is attached on the bottom).

The results are reported below.

Image
Image

I suspect that this is a matter of numerical instability since the situation badly degrade with low parameters values (e.g 0.001 and 0.002).

Please let me know if this is an issue or if there is something that I missed.

Thanks in advance.


Attachments:
File comment: Strategy used for executing the tests
T_SAR.java [3.47 KiB]
Downloaded 451 times
File comment: Acceleration 0.01, Max 0.02: Some divergences
Acc0.01_Max0.02.png [85.8 KiB]
Downloaded 658 times
File comment: Acceleration 0.001, Max 0.002: Complete instability
Acc0.001_Max0.002.png [96.57 KiB]
Downloaded 576 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com