Skip to content

Implement McGinley Dynamic #305

@cinar

Description

@cinar

Description

A moving average that adapts to market volatility using a dynamic smoothing factor.

Implementation Logic

Implement a recursive function utilizing a dynamic smoothing factor: MD_t = MD_{t-1} + (k×N×(C_t / MD_{t-1})^4) × (C_t - MD_{t-1}). Because it uses an exponent of 4, the generic type interface must be cast to float64 to utilize math.Pow(), computed, and safely cast back before emitting to the channel.

Suggested Package

trend

Labels

  • enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions