NexusFi: Find Your Edge


Home Menu

 





Bugs in NT Parabolic code


Discussion in NinjaTrader

Updated
    1. trending_up 11,111 views
    2. thumb_up 23 thanks given
    3. group 3 followers
    1. forum 23 posts
    2. attach_file 15 attachments




 
Search this Thread

Bugs in NT Parabolic code

  #21 (permalink)
cprtrader
Adelaide Australia
 
Posts: 18 since Jun 2012
Thanks Given: 7
Thanks Received: 3

You're are hard man to please

I have attached two charts, one showing your PSAR the other showing mine (black background). Starting from the bar 1# (marked on LH chart) the PSAR values are as follows (HSAR is yours )

HSAR: 89.75, 89.77, 89.80, 89.82, 89.85, 89.87, 89.87, 89.92, 90.00
CSAR: 89.75, 89.77, 89.79, 89.81, 89.83, 89.85, 89.87, 89.92, 90.00

Does the attached image provide the visual comparison you wanted?

Attached Thumbnails
Click image for larger version

Name:	Fat Tails SAR 003.jpg
Views:	198
Size:	245.7 KB
ID:	147713  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Exit Strategy
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #22 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


cprtrader View Post
You're are hard man to please

I have attached two charts, one showing your PSAR the other showing mine (black background). Starting from the bar 1# (marked on LH chart) the PSAR values are as follows (HSAR is yours )

HSAR: 89.75, 89.77, 89.80, 89.82, 89.85, 89.87, 89.87, 89.92, 90.00
CSAR: 89.75, 89.77, 89.79, 89.81, 89.83, 89.85, 89.87, 89.92, 90.00

Does the attached image provide the visual comparison you wanted?


Did you need to go back to 2006 to find a difference?


Actually my PSAR shows the following values:

HSAR: 89.750, 89.775, 89.799, 89.823, 89.846, 89.869, 89.870, 89.918, 90.000


Explanations:

(1) I have not rounded the PSAR to the full tick.

(2) Settings under "Tools -> Options -> Data -> Quote currencies (FX) in" are "HalfPip", as required by my FOREX broker.

If I round the values for the PSAR to the full tick and change that setting under Options -> Data to (the full) "Pip", then I get exactly your values (CSAR data).

For intraday data, I prefer not to round the PSAR, as this may lead to a significant distortion of the original idea on smaller timeframe charts. What I can do, is to add an option to round the value to the full tick. This option could be switched on and off. However, it would be ridiculous to introduce a multiplier for the TickSize to compensate for the half pip settings of some brokers.

The difference between the dataseries can be explained and is only caused by rounding issues.

Reply With Quote
  #23 (permalink)
cprtrader
Adelaide Australia
 
Posts: 18 since Jun 2012
Thanks Given: 7
Thanks Received: 3


I noticed the 2006 discrepancy by accident, but I'll bet my left one that there many more. Discrepancies of only 2 pips are very difficult to spot visually. Hence my suggestion that we use Excel to find them, which will take me about 5 minutes if you can get me your plot values in a text file. For all we know, there could be discrepancies of a lot more than 2 pips.

I tend to agree that there is little point to adding a rounding parameter, however I would only take this position if I fully understood the impact this would have on actual trading results, ie. does it degrade the effectiveness of the indicator? Unlikely but possible.

I rounded the numbers only to ensure that my PSAR followed all Wilder's rules, not because I believe rounding is better. My next step is to conduct testing to see whether the PSAR can be improved. Wilder did not have the benefit of the computing power that we have, so there could be room for significant improvement.

Reply With Quote
  #24 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


cprtrader View Post
I noticed the 2006 discrepancy by accident, but I'll bet my left one that there many more. Discrepancies of only 2 pips are very difficult to spot visually. Hence my suggestion that we use Excel to find them, which will take me about 5 minutes if you can get me your plot values in a text file. For all we know, there could be discrepancies of a lot more than 2 pips.

I tend to agree that there is little point to adding a rounding parameter, however I would only take this position if I fully understood the impact this would have on actual trading results, ie. does it degrade the effectiveness of the indicator? Unlikely but possible.

I rounded the numbers only to ensure that my PSAR followed all Wilder's rules, not because I believe rounding is better. My next step is to conduct testing to see whether the PSAR can be improved. Wilder did not have the benefit of the computing power that we have, so there could be room for significant improvement.


If I look at Wilder's book, he has computed everything manually. Obviously, he did it in a way that was easy for him. Rounding the results was quite natural to avoid some work. Rounding did not affect the result a lot, as it was applied to daily data only.

Also I believe that he used the exponential moving average for the average ture range, because it is easier to calculate via a recursive formula than a simple moving average. I believe he did not care about the moving average type. Using a Butterworth filter or a Hull moving average was out of question.

If course the idea can be modulated. The basic idea behind the PSAR is to

-> increase the acceleration when price moves into the direction of the trade (new extreme point)
-> maintain the acceleration when price consolidates

This idea can be enhanced. For example I do not see any reason to maintain a high acceleration factor during a longer consolidation. I would rather decrease the acceleration factor to avoid that the stopline hits the consolidation. Decreasing the acceleration factor should be done carefully and at a much slower pace than increasing it. In the end this should only have an impact on longer consolidations.

It is also possible to bring volatility into the equation, that is adjust acceleration and deceleration factor according to the "gain = difference between two consecutive extreme points" or the average bar size.

Reply With Quote




Last Updated on May 27, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts