Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculation of standard deviation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Calculation of standard deviation

    Form my point of view calculation of standard deviation should be changed to the more common way:
    SQRT ( 1/(N-1) SUM (POWER(X(i) - SMA(i))))

    Actual calculation in NinjaTrader is SQRT ( 1/N SUM (POWER(X(i) - SMA(i))))

    With this calculation there are small differences to other charting applications, Excel, Calculators. It would be easier and more comparable to transfer a system to NinjaTrader.

    See also: http://www.ninjatrader-support.com/v...ead.php?t=7447

    implementation is easy:

    in StdDev.cs

    Value.Set(Math.Sqrt(sum / Math.Min(CurrentBar + 1, Period)));

    has to be changed to

    Value.Set(Math.Sqrt(sum / Math.Min(CurrentBar + 1, Period-1)));

    (maybe an extra check vor div by zero)

    Any support for this suggestion?

    #2
    You can of course always just create your own version of the same indicator using the alternate calculation you proposed.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Haiasi, 04-25-2024, 06:53 PM
    5 responses
    76 views
    0 likes
    Last Post alancurry  
    Started by ZeroKuhl, Today, 04:31 PM
    0 responses
    16 views
    0 likes
    Last Post ZeroKuhl  
    Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
    54 responses
    5,337 views
    0 likes
    Last Post Gaterz
    by Gaterz
     
    Started by ETFVoyageur, 05-07-2024, 07:05 PM
    11 responses
    76 views
    0 likes
    Last Post -=Edge=-  
    Started by _Zero_, 04-10-2020, 03:21 PM
    145 responses
    7,902 views
    6 likes
    Last Post johng2
    by johng2
     
    Working...
    X