• プロダクト
  • コミュニティ
  • マーケット
  • ブローカー
  • 詳細
始めましょう
  • コミュニティ
  • /インジケーターとストラテジー
  • /Smafix

Smafix

Awesome Oscillator with AntiStep CorrectionHere is the well-known Awesome Oscillator (AO), which I use to present the real purpose of this post: a function that provides step correction for simple moving averages (SMAs). We all know that any indicator based on moving averages lags real-time movement. Normally this is fine, but just after large ("step") changes in level, the pre-step values that are still within the SMA window cause the result to falsely reflect continued movement, even when real-time values remain flat. To counter this, when a step change of a configurable size is detected, I temporarily shrink the SMA window size to include only those values occurring since the step change, and then allow the size to increase to normal length as we move away from the step change. This is accomplished within the antistep_sma() function. Note that this will cause SMAs of different lengths (e.g. those used in the AO) to be temporarily equal, until the shorter of the two reaches its normal size and begins to leave the longer one behind again. You can see this above, where the AO, which is the difference of two SMAs, goes to 0 immediately after a sufficiently large step change--configured to 0.5% in this case.
Pine Script® インジケーター
Lemrinの投稿
更新済
11

市場データ提供元: ICE Data services.その他データ提供元: FactSet. Copyright © 2025 FactSet Research Systems Inc.© 2025 TradingView, Inc.

主要プロダクト
  • スーパーチャート
スクリーナー
  • 株式
  • ETF
  • 債券
  • 暗号コイン
  • CEXペア
  • DEXペア
  • Pine
ヒートマップ
  • 株式
  • ETF
  • 暗号
カレンダー
  • 経済
  • 決算
  • 配当
その他プロダクト
  • イールドカーブ
  • オプション
  • ニュースフロー
  • Pine Script®
アプリ
  • モバイル
  • デスクトップ
コミュニティ
  • ソーシャルネットワーク
  • ラブウォール
  • お友達紹介
  • ハウスルール
  • モデレーター
アイデア
  • トレーディング
  • 教育
  • エディターズ・ピック
Pineスクリプト
  • インジケーターとストラテジー
  • 魔術師
  • フリーランサー
ツールとサブスクリプション
  • 機能
  • 価格
  • マーケットデータ
トレーディング
  • 概要
  • ブローカー
スペシャルオファー
  • CMEグループ先物
  • Eurex先物
  • 米国株バンドルデータ
会社情報
  • 私たちについて
  • スペースミッション
  • ブログ
  • キャリア
  • メディアキット
商品
  • TradingViewストア
  • タロットカード
  • C63 TradeTime
ポリシーとセキュリティ
  • 利用規約
  • 免責事項
  • プライバシーポリシー
  • Cookieポリシー
  • アクセシビリティ宣言
  • セキュリティのヒント
  • バグバウンティ・プログラム
  • ステータスページ
ビジネスソリューション
  • ウィジェット
  • チャートライブラリ
  • Lightweight Charts™
  • 高機能チャート
  • トレーディングプラットフォーム
成長機会
  • 広告
  • ブローカーシステムの統合
  • パートナープログラム
  • 教育プログラム
コミュニティ
  • ソーシャルネットワーク
  • ラブウォール
  • お友達紹介
  • ハウスルール
  • モデレーター
アイデア
  • トレーディング
  • 教育
  • エディターズ・ピック
Pineスクリプト
  • インジケーターとストラテジー
  • 魔術師
  • フリーランサー
ビジネスソリューション
  • ウィジェット
  • チャートライブラリ
  • Lightweight Charts™
  • 高機能チャート
  • トレーディングプラットフォーム
成長機会
  • 広告
  • ブローカーシステムの統合
  • パートナープログラム
  • 教育プログラム
Look FirstLook First