本文へ移動
AlertaChartAlertaScript / docs
AlertaScript / ユーザー定義型とメソッド
このページの内容仕組み実践コード例

AlertaScript / ドキュメント

ユーザー定義型とメソッド

関連するデータと操作をまとめる。

仕組み

type はフィールドを定義し、コンストラクターがインスタンスを作成します。メソッドの最初の型付き引数が受け手です。

実践

価格帯や取引状態に利用できます。chart.point は組み込み型であり、価格系列変数ではありません。

コード例

AlertaScript
indicator("Price range", overlay=false)type PriceRange    float hi    float lomethod width(PriceRange this) =>    this.hi - this.lorange = PriceRange.new(high, low)plot(range.width(), "Range")
AlertaScript

結果が見つかりません。

名前、別名、キーワードで検索できます。