From 45f2ebbf504b728b466789ec286ce3cc377a9c6e Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Mon, 27 Jul 2026 18:39:20 -0400 Subject: [PATCH 1/2] style: Apply ruff format to docs code blocks Ruff 0.16 formats Python code blocks inside Markdown, so the docs examples began failing 'ruff format --check' without any change to the repo. Reformats the 23 affected files; changes are confined to fenced python blocks. --- docs/_indicators/Beta.md | 2 +- docs/_indicators/Chandelier.md | 2 +- docs/_indicators/Doji.md | 2 +- docs/_indicators/Ema.md | 2 +- docs/_indicators/Kama.md | 2 +- docs/_indicators/Keltner.md | 2 +- docs/_indicators/MaEnvelopes.md | 4 ++-- docs/_indicators/Mama.md | 2 +- docs/_indicators/Marubozu.md | 2 +- docs/_indicators/PivotPoints.md | 4 ++-- docs/_indicators/Pivots.md | 4 ++-- docs/_indicators/Pmo.md | 2 +- docs/_indicators/Pvo.md | 2 +- docs/_indicators/Renko.md | 6 +++--- docs/_indicators/RollingPivots.md | 4 ++-- docs/_indicators/Sma.md | 2 +- docs/_indicators/StdDevChannels.md | 2 +- docs/_indicators/Vortex.md | 2 +- docs/_indicators/Vwap.md | 2 +- docs/_indicators/Wma.md | 2 +- docs/_indicators/ZigZag.md | 4 ++-- docs/pages/guide.md | 22 +++++++++++----------- docs/pages/utilities.md | 3 ++- 23 files changed, 41 insertions(+), 40 deletions(-) diff --git a/docs/_indicators/Beta.md b/docs/_indicators/Beta.md index 5d4e56d7..3add1bf2 100644 --- a/docs/_indicators/Beta.md +++ b/docs/_indicators/Beta.md @@ -74,7 +74,7 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import BetaType # Short path, version >= 0.8.1 +from stock_indicators import BetaType # Short path, version >= 0.8.1 # This method is NOT a part of the library. history_SPX = get_historical_quotes("SPX") diff --git a/docs/_indicators/Chandelier.md b/docs/_indicators/Chandelier.md index 2b724ac0..198d0e2b 100644 --- a/docs/_indicators/Chandelier.md +++ b/docs/_indicators/Chandelier.md @@ -67,7 +67,7 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import ChandelierType # Short path, version >= 0.8.1 +from stock_indicators import ChandelierType # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") diff --git a/docs/_indicators/Doji.md b/docs/_indicators/Doji.md index d232cf53..58702524 100644 --- a/docs/_indicators/Doji.md +++ b/docs/_indicators/Doji.md @@ -55,7 +55,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate -results = indicators.get_doji(quotes); +results = indicators.get_doji(quotes) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Ema.md b/docs/_indicators/Ema.md index be0e4f80..f1115a93 100644 --- a/docs/_indicators/Ema.md +++ b/docs/_indicators/Ema.md @@ -61,7 +61,7 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import CandlePart # Short path, version >= 0.8.1 +from stock_indicators import CandlePart # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") diff --git a/docs/_indicators/Kama.md b/docs/_indicators/Kama.md index 5a1679f1..20e0267b 100644 --- a/docs/_indicators/Kama.md +++ b/docs/_indicators/Kama.md @@ -66,7 +66,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate KAMA(10,2,30) -results = indicators.get_kama(quotes, 10,2,30) +results = indicators.get_kama(quotes, 10, 2, 30) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Keltner.md b/docs/_indicators/Keltner.md index 520cda4a..aa61c477 100644 --- a/docs/_indicators/Keltner.md +++ b/docs/_indicators/Keltner.md @@ -66,7 +66,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate Keltner(20) -results = indicators.get_keltner(quotes, 20,2.0,10) +results = indicators.get_keltner(quotes, 20, 2.0, 10) ``` ## About {{ page.title }} diff --git a/docs/_indicators/MaEnvelopes.md b/docs/_indicators/MaEnvelopes.md index de3eb1bd..2538ec6f 100644 --- a/docs/_indicators/MaEnvelopes.md +++ b/docs/_indicators/MaEnvelopes.md @@ -81,13 +81,13 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import MAType # Short path, version >= 0.8.1 +from stock_indicators import MAType # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") # Calculate 20-period SMA envelopes with 2.5% offset -results = indicators.get_ma_envelopes(quotes, 20, 2.5, MAType.SMA); +results = indicators.get_ma_envelopes(quotes, 20, 2.5, MAType.SMA) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Mama.md b/docs/_indicators/Mama.md index 7ff77972..ed60cada 100644 --- a/docs/_indicators/Mama.md +++ b/docs/_indicators/Mama.md @@ -63,7 +63,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate Mama(0.5,0.05) -results = indicators.get_mama(quotes, 0.5,0.05) +results = indicators.get_mama(quotes, 0.5, 0.05) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Marubozu.md b/docs/_indicators/Marubozu.md index 86b484fa..750a7848 100644 --- a/docs/_indicators/Marubozu.md +++ b/docs/_indicators/Marubozu.md @@ -55,7 +55,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate -results = indicators.get_marubozu(quotes); +results = indicators.get_marubozu(quotes) ``` ## About {{ page.title }} diff --git a/docs/_indicators/PivotPoints.md b/docs/_indicators/PivotPoints.md index be1da22f..e9152cb9 100644 --- a/docs/_indicators/PivotPoints.md +++ b/docs/_indicators/PivotPoints.md @@ -91,13 +91,13 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import PeriodSize, PivotPointType # Short path, version >= 0.8.1 +from stock_indicators import PeriodSize, PivotPointType # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") # Calculate Woodie-style month-based Pivot Points -results = indicators.get_pivot_points(quotes, PeriodSize.MONTH, PivotPointType.WOODIE); +results = indicators.get_pivot_points(quotes, PeriodSize.MONTH, PivotPointType.WOODIE) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Pivots.md b/docs/_indicators/Pivots.md index 5aeb216b..9f1db4cb 100644 --- a/docs/_indicators/Pivots.md +++ b/docs/_indicators/Pivots.md @@ -89,13 +89,13 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import EndType # Short path, version >= 0.8.1 +from stock_indicators import EndType # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") # Calculate Pivots(2,2,20) using High/Low values -results = indicators.get_pivots(quotes, 2, 2, 20, EndType.HIGH_LOW); +results = indicators.get_pivots(quotes, 2, 2, 20, EndType.HIGH_LOW) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Pmo.md b/docs/_indicators/Pmo.md index 0a478001..8d212280 100644 --- a/docs/_indicators/Pmo.md +++ b/docs/_indicators/Pmo.md @@ -62,7 +62,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate 20-period PMO -results = indicators.get_pmo(quotes, 35,20,10) +results = indicators.get_pmo(quotes, 35, 20, 10) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Pvo.md b/docs/_indicators/Pvo.md index 33644e1f..3d7f7e62 100644 --- a/docs/_indicators/Pvo.md +++ b/docs/_indicators/Pvo.md @@ -65,7 +65,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate Pvo(12,26,9) -results = indicators.get_pvo(quotes, 12, 26, 9); +results = indicators.get_pvo(quotes, 12, 26, 9) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Renko.md b/docs/_indicators/Renko.md index f26f1b12..e0e4812a 100644 --- a/docs/_indicators/Renko.md +++ b/docs/_indicators/Renko.md @@ -73,13 +73,13 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import EndType # Short path, version >= 0.8.1 +from stock_indicators import EndType # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") # Calculate -results = indicators.get_renko(quotes, 2.5, EndType.CLOSE); +results = indicators.get_renko(quotes, 2.5, EndType.CLOSE) ``` ## ATR Variant @@ -122,7 +122,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate -results = indicators.get_renko_atr(quotes, atr_periods); +results = indicators.get_renko_atr(quotes, atr_periods) ``` ## About {{ page.title }} diff --git a/docs/_indicators/RollingPivots.md b/docs/_indicators/RollingPivots.md index ac7a0b70..41a277a5 100644 --- a/docs/_indicators/RollingPivots.md +++ b/docs/_indicators/RollingPivots.md @@ -77,13 +77,13 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import PivotPointType # Short path, version >= 0.8.1 +from stock_indicators import PivotPointType # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") # Calculate Woodie-style 14 period Rolling Pivot Points -results = indicators.get_rolling_pivots(quotes, 14, 0, PivotPointType.Woodie); +results = indicators.get_rolling_pivots(quotes, 14, 0, PivotPointType.Woodie) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Sma.md b/docs/_indicators/Sma.md index 64fc7a24..315dcd55 100644 --- a/docs/_indicators/Sma.md +++ b/docs/_indicators/Sma.md @@ -59,7 +59,7 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import CandlePart # Short path, version >= 0.8.1 +from stock_indicators import CandlePart # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") diff --git a/docs/_indicators/StdDevChannels.md b/docs/_indicators/StdDevChannels.md index 36e27a17..131bcbf4 100644 --- a/docs/_indicators/StdDevChannels.md +++ b/docs/_indicators/StdDevChannels.md @@ -65,7 +65,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # calculate StdDevChannels(20,2) -results = indicators.get_stdev_channels(quotes, 20,2) +results = indicators.get_stdev_channels(quotes, 20, 2) ``` ## Alternative depiction for full quotes variant diff --git a/docs/_indicators/Vortex.md b/docs/_indicators/Vortex.md index 51660391..bde4efa5 100644 --- a/docs/_indicators/Vortex.md +++ b/docs/_indicators/Vortex.md @@ -60,7 +60,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate 14-period VI -results = indicators.get_vortex(quotes, 14); +results = indicators.get_vortex(quotes, 14) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Vwap.md b/docs/_indicators/Vwap.md index 4cf40dde..aa1d55af 100644 --- a/docs/_indicators/Vwap.md +++ b/docs/_indicators/Vwap.md @@ -63,7 +63,7 @@ from stock_indicators import indicators quotes = get_historical_quotes("SPY") # Calculate -results = indicators.get_vwap(quotes); +results = indicators.get_vwap(quotes) ``` ## About {{ page.title }} diff --git a/docs/_indicators/Wma.md b/docs/_indicators/Wma.md index dc6945b3..2379194a 100644 --- a/docs/_indicators/Wma.md +++ b/docs/_indicators/Wma.md @@ -59,7 +59,7 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import CandlePart # Short path, version >= 0.8.1 +from stock_indicators import CandlePart # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") diff --git a/docs/_indicators/ZigZag.md b/docs/_indicators/ZigZag.md index 82000c9b..8d4aa7f4 100644 --- a/docs/_indicators/ZigZag.md +++ b/docs/_indicators/ZigZag.md @@ -74,13 +74,13 @@ See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-r ```python from stock_indicators import indicators -from stock_indicators import EndType # Short path, version >= 0.8.1 +from stock_indicators import EndType # Short path, version >= 0.8.1 # This method is NOT a part of the library. quotes = get_historical_quotes("SPY") # Calculate 3% change ZIGZAG -results = indicators.get_zig_zag(quotes, EndType.CLOSE, 3); +results = indicators.get_zig_zag(quotes, EndType.CLOSE, 3) ``` ## About {{ page.title }} diff --git a/docs/pages/guide.md b/docs/pages/guide.md index dc9c6575..4ab1c077 100644 --- a/docs/pages/guide.md +++ b/docs/pages/guide.md @@ -92,7 +92,6 @@ results = indicators.get_sma(quotes, 20) # use results as needed for your use case (example only) for r in results: print(f"SMA on {r.date.date()} was ${r.sma or 0:.4f}") - ``` ```console @@ -167,9 +166,10 @@ If you are using `pandas.DataFrame` to hold quote data, you have to convert it i from stock_indicators import Quote quotes_list = [ - Quote(d,o,h,l,c,v) - for d,o,h,l,c,v - in zip(df['date'], df['open'], df['high'], df['low'], df['close'], df['volume']) + Quote(d, o, h, l, c, v) + for d, o, h, l, c, v in zip( + df["date"], df["open"], df["high"], df["low"], df["close"], df["volume"] + ) ] ``` @@ -193,10 +193,9 @@ class MyCustomQuote(Quote): from stock_indicators import indicators # fetch historical quotes from your favorite feed -quotes: Iterable[MyCustomQuote] = get_historical_quotes("MSFT"); - +quotes: Iterable[MyCustomQuote] = get_historical_quotes("MSFT") # example: get 20-period simple moving average -results = indicators.get_sma(quotes, 20); +results = indicators.get_sma(quotes, 20) ``` #### Using custom quote property names @@ -208,9 +207,9 @@ Suppose your class has a property called `close_date` instead of `date`, it coul ```python from stock_indicators.indicators.common.quote import Quote + class MyCustomQuote(Quote): close_date = Quote.date - ``` Note that the property `date` now can be accessed by both `close_date` and `date`. @@ -225,16 +224,18 @@ Here's an example of how you'd set that up: from stock_indicators import indicators from stock_indicators.indicators.ema import EMAResult + class ExtendedEMA(EMAResult): def __str__(self): return f"EMA on {self.date.date()} was ${self.ema or 0:.4f}" + # compute indicator quotes = get_historical_quotes("MSFT") results = indicators.get_ema(quotes, 20) # 1. list[ExtendedEMA] -extended_results = [ ExtendedEMA(r._csdata) for r in results ] +extended_results = [ExtendedEMA(r._csdata) for r in results] for r in extended_results: print(r) ``` @@ -265,11 +266,10 @@ quotes = get_historical_quotes("MSFT") results = indicators.get_ema(quotes, 20) # convert to synthetic quotes -quotes_from_ema = [ Quote(date=r.date, close=r.ema) for r in results ] +quotes_from_ema = [Quote(date=r.date, close=r.ema) for r in results] # calculate SMA of EMA sma_of_ema = indicators.get_sma(quotes_from_ema, 20) - ``` ## Candlestick patterns diff --git a/docs/pages/utilities.md b/docs/pages/utilities.md index 49303931..fad1ec81 100644 --- a/docs/pages/utilities.md +++ b/docs/pages/utilities.md @@ -16,7 +16,7 @@ layout: page ```python # Example: only show Marubozu signals -results = quotes.get_marubozu(quotes).condense(); +results = quotes.get_marubozu(quotes).condense() ``` >🚩 **Warning**: In all cases, `.condense()` will remove non-essential results and will produce fewer records than are in `quotes`. @@ -51,6 +51,7 @@ results = indicators.get_ema(quotes, 20) # find result on a specific date from datetime import datetime + lookup_date = datetime(2018, 10, 12) result = results.find(lookup_date) ``` From 278978978f5f3f7cc19bf3c10392b8947591d1a7 Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Mon, 27 Jul 2026 18:45:42 -0400 Subject: [PATCH 2/2] fix: Repoint .NET doc image URLs after repo rename The Stock.Indicators repo moved to facioquo/stock-indicators-dotnet and v3.0.0 migrated its docs to VitePress, deleting docs/assets/charts. raw.githubusercontent does not follow repo renames, so all 82 chart images plus examples.webp returned 404 and HTML-Proofer failed. Pin to d0b99458, the last commit carrying the full PascalCase set. --- docs/_config.yml | 13 ++++++++++--- docs/pages/home.md | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index 812f94fa..2fa5aa3b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -18,9 +18,16 @@ logo: /assets/icons/android-chrome-192x192.png # .NET site URL refs dotnet: - repo: "https://github.com/DaveSkender/Stock.Indicators" - src: "https://github.com/DaveSkender/Stock.Indicators/blob/main/src" - charts: "https://raw.githubusercontent.com/DaveSkender/Stock.Indicators/main/docs/assets/charts" + repo: "https://github.com/facioquo/stock-indicators-dotnet" + src: "https://github.com/facioquo/stock-indicators-dotnet/blob/main/src" + # The .NET docs moved to VitePress in v3.0.0 (896ae089), which deleted + # docs/assets/charts and renamed the surviving images to kebab-case. + # raw.githubusercontent does not follow repo renames, so the old + # DaveSkender/Stock.Indicators URLs 404. Pinned to the last commit that + # still carries the full PascalCase set — four of the images referenced + # here (AdIndex, Correlation, HeikinAshi, StdDevChannelsFull) have no + # equivalent in the current tree. + charts: "https://raw.githubusercontent.com/facioquo/stock-indicators-dotnet/d0b99458e17505c32b966109b5e38979cd25c047/docs/assets/charts" # this site URL refs python: diff --git a/docs/pages/home.md b/docs/pages/home.md index 7655d01e..f736e185 100644 --- a/docs/pages/home.md +++ b/docs/pages/home.md @@ -35,7 +35,7 @@ Explore more information: ## Samples -![image](https://raw.githubusercontent.com/DaveSkender/Stock.Indicators/main/docs/examples.webp) +![image](https://raw.githubusercontent.com/facioquo/stock-indicators-dotnet/d0b99458e17505c32b966109b5e38979cd25c047/docs/examples.webp) ### Example usage