「移動平均線乖離率(SMAからの乖離)」を計算します。
定義
ta.dev(source, length)
引数
| 引数名 |
内容 |
初期値 |
Warning: Undefined variable $tr in /home/tradetech1/tradetech.online/public_html/wp-content/themes/tradetechonline_swell/single-dict-pine-v5.php on line 77
Warning: foreach() argument must be of type array|object, null given in /home/tradetech1/tradetech.online/public_html/wp-content/themes/tradetechonline_swell/single-dict-pine-v5.php on line 77
source |
対象の価格 |
|
Warning: Undefined variable $tr in /home/tradetech1/tradetech.online/public_html/wp-content/themes/tradetechonline_swell/single-dict-pine-v5.php on line 77
Warning: foreach() argument must be of type array|object, null given in /home/tradetech1/tradetech.online/public_html/wp-content/themes/tradetechonline_swell/single-dict-pine-v5.php on line 77
length |
対象の単純移動平均線(SMA)の計算期間 |
|
戻り値
float : 移動平均線の値
サンプルコード
終値と20日移動平均線の乖離率を計算
ma_dev = ta.dev(close, 20)