volume category touchup

This commit is contained in:
Miha Kralj
2026-01-31 11:21:09 -08:00
parent 7b3a6520d2
commit 51e885a4a6
52 changed files with 5890 additions and 536 deletions
+6 -15
View File
@@ -7,23 +7,14 @@ namespace QuanTAlib;
/// CMF: Chaikin Money Flow
/// </summary>
/// <remarks>
/// Chaikin Money Flow measures buying and selling pressure over a specified period.
/// It uses the Money Flow Multiplier and Volume to determine if a security is being
/// accumulated (bought) or distributed (sold).
/// Measures buying/selling pressure via close position within range and volume.
/// Oscillates between -1 and +1; positive indicates accumulation, negative indicates distribution.
///
/// Calculation:
/// 1. Money Flow Multiplier = [(Close - Low) - (High - Close)] / (High - Low)
/// 2. Money Flow Volume = Money Flow Multiplier × Volume
/// 3. CMF = Sum(Money Flow Volume, period) / Sum(Volume, period)
///
/// CMF oscillates between -1 and +1:
/// - Positive values indicate buying pressure (accumulation)
/// - Negative values indicate selling pressure (distribution)
///
/// Sources:
/// https://www.investopedia.com/terms/c/chaikinoscillator.asp
/// https://school.stockcharts.com/doku.php?id=technical_indicators:chaikin_money_flow_cmf
/// Calculation: <c>MFM = [(Close - Low) - (High - Close)] / (High - Low)</c>,
/// <c>MFV = MFM × Volume</c>, <c>CMF = Sum(MFV, period) / Sum(Volume, period)</c>.
/// </remarks>
/// <seealso href="Cmf.md">Detailed documentation</seealso>
/// <seealso href="cmf.pine">Reference Pine Script implementation</seealso>
[SkipLocalsInit]
public sealed class Cmf : ITValuePublisher
{