StratCraft

真實波幅 (True Range)

用於平滑範圍和波動率參考的 QuantNexus 指標頁面。

Route: /quantnexus/indicators/trange/

作用

TRANGE 使用可配置的平滑設置,從最高價、最低價和收盤價序列中衡量範圍擴張。

公式

該值追蹤選定回看週期和平滑輸入下的真實波幅表現。

參數

  • period1 - 預設 25
  • period2 - 預設 13
  • pchange - 預設 1
  • _movav - 預設 EMA

C++23 API

#include <nonabt/indicators/trange.hpp>
auto trange = std::make_unique<nonabt::TRANGE>(data().close(), 25, 13, 1, "EMA");

常見用法

  • 用作波動率參考或閾值輸入。
  • 與突破或市場環境(regime)過濾器配合使用。
  • 當你需要平滑的範圍測量而不是原始燭台時非常有用。