Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

VolumeProfile and TimeProfile hang when the value area volume percentage is 1

クローズ 初心者向け
#9,957 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
backend

調査の方向性

Indicators/MarketProfile.cs の MarketProfile.CalculateValueArea から始める。ここでは、value area のボリュームがターゲット以下である間、ループが low/high インデックスを広げる。パーセンテージが 1 の場合、ターゲットは総ボリュームに等しいため、両方のインデックスが端でクランプし、ループは決して終了しない。low インデックスも high インデックスも移動できないときに終了を追加する。これは基底クラスを共有しているため TimeProfile も修正する。完了とは、new VolumeProfile(2, 1m) を構築して Update を一度呼び出す回帰テストが戻り、value area がすべての価格レベルにまたがっていることである。

索引モデルが issue の本文から書いたものです。

説明

Expected Behavior

new VolumeProfile(2, 1m) (a value area that holds 100% of the volume) updates normally and reports a value area that spans the whole profile.

Actual Behavior

The first Update call never returns. MarketProfile.CalculateValueArea keeps expanding the value area while its volume is less than or equal to the target. With a percentage of 1, the target equals the total volume, so the condition stays true after the area covers every price level. Both neighbor indexes are clamped to the edges and the loop runs forever. TimeProfile has the same problem because it shares the base class.

Potential Solution

In Indicators/MarketProfile.cs, CalculateValueArea, exit the loop when neither the low nor the high index can move.

Reproducing the Problem
var vp = new VolumeProfile(2, 1m);
vp.Update(new TradeBar { Symbol = Symbols.AAPL, Close = 10, Volume = 100, Time = new DateTime(2000, 1, 2) });
// never returns
System Information

Ubuntu x86_64, .NET SDK 10.0.403, master at 22404ea28b8d3f3c9eb74d6ed9f0444426f8e417.

Checklist
  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
主要言語
C#
スター
22.3k
フォーク
5.4k
平均マージ
1日 5時間
マージ済み PR(30日)
56

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantConnect/Lean のほかの issue

QuantConnect/Lean の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。